Jump to content

1.6 show "On sale" products on "price-drop" page


Recommended Posts

  • 1 month later...

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

  • 7 months later...

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

  • 4 months later...

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

  • 5 weeks later...

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

  • 1 year later...
  • 3 months later...
  • 4 weeks later...
  • 3 months later...

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
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

×
×
  • Create New...