Jump to content

Same category module: sort items by newest first


Recommended Posts

Hello everyone,

 

I would like to change the "Same Category" module to display the newest items first. I plan on reducing the number of displayed items to the 5 latest only, to limit the number of on page links created by the module.

 

Does anyone know how to make this module sort the products by newest first?

 

Your help would be much appreciated!

 

Kind regards,

 

Dan

Link to comment
Share on other sites

  • 2 years later...

HI Mister Denial, I 'm looking for the same, did you have any luck with this? I also want to show first the new items..., but no idea about how to do it... Thanks!!

 

Hi Jota,

 

I never found a solution to this, and eventually abandoned displaying items from the same category. Instead, I manually select items using the "accessories" function, until I find a better solution for cross-promotion. I honestly haven't checked the modules for 1.6 yet, so maybe there is one available now that does exactly that.

Link to comment
Share on other sites

  • 1 year later...

maybe this will help

 

edit the productscategory.php

// webmaster changes start
// $category_products = $category->getProducts($this->context->language->id, 1, 100); /* 100 products max. */
$category_products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), null, null, false, true, true, ($nb ? $nb : 8)); /* 100 products max. */
// webmaster changes end

this will result to 8 product from same category ramdomly

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