Jump to content

New products page - wrong sort direction!


Recommended Posts

Hi all - I've had a few customers come back and tell me my new products page is not working. I checked it out myself and it looks as if the products are being sorted with the oldest first!

Shouldn't they be sorted by productid DESC? The newest products appear at the end of the list!
Any help appreciated.

Thanks!

Link to comment
Share on other sites

I think the "New products" page using the "Default order way" on the Preferences > Products tab. Try changing that to "Descending". That will affect other product listings too though. If you need to override that value just for the new products page, you will need to change line 13 of new-products.php (in PrestaShop v1.3.3) from:

'products' => Product::getNewProducts(intval($cookie->id_lang), intval($p) - 1, intval($n), false, $orderBy, $orderWay),



to:

'products' => Product::getNewProducts(intval($cookie->id_lang), intval($p) - 1, intval($n), false, $orderBy, 'DESC'),

  • Like 1
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...