OnTargetPro Posted October 4, 2010 Share Posted October 4, 2010 I know you can discount individual items and create discount codes using vouchers, but is there a way to put everything in the store, or everything in one category on sale all at once?Thanks, Link to comment Share on other sites More sharing options...
rocky Posted October 5, 2010 Share Posted October 5, 2010 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 More sharing options...
babyewok Posted January 4, 2011 Share Posted January 4, 2011 Hi Rocky. How can you do this for the whole shop and set an end- date for the sale? Link to comment Share on other sites More sharing options...
rocky Posted January 5, 2011 Share Posted January 5, 2011 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 More sharing options...
babyewok Posted January 5, 2011 Share Posted January 5, 2011 Thanks Rocky - and would 'on_sale' be returned to 0 when the sale ends too? Link to comment Share on other sites More sharing options...
rocky Posted January 5, 2011 Share Posted January 5, 2011 Yes, that's right. Link to comment Share on other sites More sharing options...
babyewok Posted January 6, 2011 Share Posted January 6, 2011 Hi Rocky, I just tried this out on my test server and it seems to mark the item as ON SALE before the date set for the discount so doesn't seem to take any notice of the dates Link to comment Share on other sites More sharing options...
babyewok Posted January 6, 2011 Share Posted January 6, 2011 Maybe there is something that I can put on the product page and category page templates that says that the ON SALE should only show if there is a price reduction??? Link to comment Share on other sites More sharing options...
babyewok Posted January 6, 2011 Share Posted January 6, 2011 OK with a bit of tweeking, I've managed to hide the on sale when there is no reduction, but I will need to manually uncheck the on sale box after. Link to comment Share on other sites More sharing options...
rocky Posted January 6, 2011 Share Posted January 6, 2011 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 More sharing options...
babyewok Posted January 6, 2011 Share Posted January 6, 2011 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 More sharing options...
babyewok Posted January 6, 2011 Share Posted January 6, 2011 Hmmm no idea what I did, but it seems to be working OK now. Link to comment Share on other sites More sharing options...
troyrob Posted April 13, 2011 Share Posted April 13, 2011 Hmmmm i can't seem to do it in PS1.4 has the table structure changed? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now