Jump to content

get products in order


Recommended Posts

[sOLVED]Hi guys
How can i put the products on my front page in order that i want??
When i go into BO and click catalog tab all my products are there for the home page, now when i move them up or down the list they should stay there but they don't has anyone got any idea why they do not save in there new position.

Thanks.

Link to comment
Share on other sites

Nevermind, in all versions...

In /modules/homefeatured/homefeature.php, change this line in the hookHome() function:

$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10));


to

$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10), 'id_product', 'ASC');

Link to comment
Share on other sites

oops, you want them in the positions you arrange them in the Catalog Home category, right?
Then for some reason, it is not set the the orderby to the default position.

Change it to this:

$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10), 'position', 'ASC'); 

Link to comment
Share on other sites

×
×
  • Create New...