Jump to content

Modify the amount of days best selling products


joelphil

Recommended Posts

Hello,

My theme shows the best selling products, but it's from a long range, probably even more than 1 year. I'd like to show more current bestsellers, like the best selling products of the previous 3 months.

Where can I modify this? (PrestaShop 1.7)


Thanks!

Link to comment
Share on other sites

You can set a number of products to be displayed and add a sort by date on which products have been added.

Adding in 

modules/ps_bestsellers/ps_bestsellers.php

In the function getBestSellers a sort, eg

->setSortOrder(new SortOrder('product', 'date_add', 'desc'));

 

Link to comment
Share on other sites

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...