Jump to content

Offering a Site or Category-wide sale


Recommended Posts

No, not without manually executing an SQL query. For example:

UPDATE `ps_product` SET `reduction_percent` = 10, `on_sale` = 1 WHERE `id_category_default` = 2



Change ps_ to your database prefix, 10 to the sale percentage and 2 to the ID of the category you want to change. This will give all products with default category 2 a 10% reduction and mark them as "on sale". You can then run the following query to remove the reductions once the sale is over:

UPDATE `ps_product` SET `reduction_percent` = 0, `on_sale` = 0 WHERE `id_category_default` = 2

Link to comment
Share on other sites

  • 2 months later...

Take off the WHERE clause and add a reduction_from and reduction_to date. For example:

UPDATE `ps_product` SET `reduction_percent` = 10, `reduction_from` = '2011-01-01 00:00:00', `reduction_to` = '2011-01-31 23:59:59', `on_sale` = 1



This will give all your products a 10% discount in January 2011 only.

Link to comment
Share on other sites

You can check whether there is a price reduction before displaying "On sale" by changing line 12 of product-list.tpl from:

{if $product.on_sale}



to:

{if $product.on_sale && ($product.reduction_price != 0 || $product.reduction_percent != 0)}

Link to comment
Share on other sites

Thanks - now I've solved one issue, I've found another! On the product list page, the price is showing as the pre-discounted price. On the product page, the discounted price is shown as it should. What would cause that? I have

{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}



for the price on product-list.tpl

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...