Jump to content

[Solved] Homefeatured product sorting for 1.6


renjii

Recommended Posts

Hi 

In Prestashop i used to replaced the following code to reserve the product to display the newly added product on top in featured product. However, i can no longer do this in 1.6 due to the code change in the module. 

Can code expert help to make this workable on 1.6 again ? 

 

//$products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8));to:

$products = array_reverse($products);

 

 

Thanks

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

Hi 

 

I tried to change to 

 

HomeFeatured::$cache_products = array_reverse($category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), 'position'));

 

but it's still not working. am i missing anything there ? Or the code i changed is incorrect.

 

i notice in the live edit is showing the reverse but when in actual site it doesn't reverse ( see the 2 attach picture) am I missing some code ?

 

 

 

Thanks 

post-43959-0-94041800-1395548617_thumb.png

post-43959-0-56230600-1395548638_thumb.png

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

  • 2 weeks later...
×
×
  • Create New...