Jump to content

prices-drop do not show products with quantity 0


espacious

Recommended Posts

Hi,

can anyone point me to the right solution to NOT show products with quantity 0 on prices-drop page?

I was able to modify the sorting order altering PricesDropController.php in \controllers\front\listing\

But cant find a solution to remove products with no quantity.

I use prestashop 1.7.5.1

Thanks in advance

Edited by espacious (see edit history)
Link to comment
Share on other sites

Ok i found a way.

i modified 2 files:

classes/Product.php around line 2905

AND stock.`quantity` > 0

and to change sort order:

controllers/front/listing/PricesDropController.php around line 49

->setSortOrder(new SortOrder('product', 'price', 'desc'))

Hope helps someone.

Link to comment
Share on other sites

  • 2 years 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...