RockyS Posted March 24, 2014 Share Posted March 24, 2014 Hi, how can we add products that are ON SALE to price-drop page without faking discounts? NOT: PS 1.6 Link to comment Share on other sites More sharing options...
RockyS Posted March 27, 2014 Author Share Posted March 27, 2014 Bump Link to comment Share on other sites More sharing options...
mehnihma Posted May 10, 2014 Share Posted May 10, 2014 Hi, yes you can take a look here In classes folder find Product.php. On line 2326 find: WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 And replace with: WHERE product_shop.`active` = 1 AND p.quantity > 0 OR p.on_sale = 1 AND product_shop.`show_price` = 1 So here we added check for quantity and if product is set to be on sale it will show it on prices drop page. But I get only one page not all pages with products on sale, did not get how to fix that? Link to comment Share on other sites More sharing options...
zaurus Posted December 19, 2014 Share Posted December 19, 2014 Hi Guys, that problem has another fix in presta 1.6.x: in /classes/Product.php line: 2292 must become '.$sql_groups.'OR p.`on_sale` = 1') ; and line: 2331 is going to '.$sql_groups.' OR p.`on_sale` = 1 so, you will have "On sale" products on "price-drop" page Link to comment Share on other sites More sharing options...
vicaalvarez Posted May 7, 2015 Share Posted May 7, 2015 Hi Guys, that problem has another fix in presta 1.6.x: in /classes/Product.php line: 2292 must become '.$sql_groups.'OR p.`on_sale` = 1') ; and line: 2331 is going to '.$sql_groups.' OR p.`on_sale` = 1 so, you will have "On sale" products on "price-drop" page where exactly? i have something else on those lines Link to comment Share on other sites More sharing options...
thrillmetoo Posted June 6, 2015 Share Posted June 6, 2015 I had the same problem. I wanted to only show products that are marked 'on sale' and not all products that have a discount (which is most of my products). I changed in classes/product.php line 2349 WHERE product_shop. 'active' = 1 AND product_shop. 'show_price' = 1 to: WHERE product_shop.'active'= 1 AND p.quantity > 0 AND p-on_sale = 1 AND product_shop.'show_price' = 1 after that, do the same on line 2390 Link to comment Share on other sites More sharing options...
prolink Posted June 7, 2016 Share Posted June 7, 2016 where exactly? i have something else on those lines Has anyone found a solution for presta 1.6.x ? I have 1.6.1.3 and struggling with the same issue Link to comment Share on other sites More sharing options...
chosie Posted September 27, 2016 Share Posted September 27, 2016 For 1.6.0.8, you may refer to line 2290 and 2330 in classes/product.php to modify the script. Hope this helps who is still looking for the solution. Link to comment Share on other sites More sharing options...
Truffelstunter Posted October 24, 2016 Share Posted October 24, 2016 anybody with a more recent fix for this? i dont have the mentioned lines at that place, for both of the fixes Link to comment Share on other sites More sharing options...
Jedrzej z Komijo Posted February 9, 2017 Share Posted February 9, 2017 2545 '.((!$beginning && !$ending) ? 'AND p.`id_product` IN('.((is_array($tab_id_product) && count($tab_id_product)) ? implode(', ', $tab_id_product) : 0).')' : '').' OR p.on_sale = 1 2583 '.((!$beginning && !$ending) ? ' AND p.`id_product` IN ('.((is_array($tab_id_product) && count($tab_id_product)) ? implode(', ', $tab_id_product) : 0).')' : '').' OR p.on_sale = 1 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts