viluletka Posted December 1, 2013 Posted December 1, 2013 Hello all, I have a question about the order that is used for displaying the home featured products. My customer already added about 400 items to category Home and would like on homepage to see the 8 last added products. At the moment it seems to show the the oldest 8. I checked my homefeatured.php file and the category foreach is reversed ($products = array_reverse($category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 10))); ). How can I accompish this - > display on homepage the last 8 products added to category home? Any help would be highly apprecaited. Thank you! Share this post Link to post Share on other sites More sharing options...
vekia Posted December 1, 2013 Posted December 1, 2013 well, array reverse code should work. If it doesn't work, try to clear cache Share this post Link to post Share on other sites More sharing options...
viluletka Posted December 1, 2013 Posted December 1, 2013 Thank you for answering, but it was set by default (array_reverse), but does not did the trick. It shows 8 products but the oldest ones. When adding new ones they don't show up. Any other suggestions ? This is the link to my website if this helps:http://bizzaro-bg.com/ Share this post Link to post Share on other sites More sharing options...
vekia Posted December 2, 2013 Posted December 2, 2013 so why not to remove array_reverse command? Share this post Link to post Share on other sites More sharing options...
viluletka Posted December 2, 2013 Posted December 2, 2013 Tried! As well it only switches the 2 rows that you can see on the homepage... I am like stuck in this ;/ Share this post Link to post Share on other sites More sharing options...
Nishith Nesdiya Posted December 3, 2013 Posted December 3, 2013 (edited) hello.... i hope this help for you http://www.prestashop.com/forums/topic/282431-product-order-on-the-home-page/ http://www.prestashop.com/forums/topic/30770-home-featured-module/ Edited December 3, 2013 by Nishith (see edit history) Share this post Link to post Share on other sites More sharing options...
vekia Posted December 3, 2013 Posted December 3, 2013 definitely this topic: http://www.prestashop.com/forums/topic/291921-solved-homefeatured-products-cheapest-first/?hl=%2Bgetproducts&do=findComment&comment=1472173 instead of "price" you can use product date_add or just id Share this post Link to post Share on other sites More sharing options...
viluletka Posted December 3, 2013 Posted December 3, 2013 Many thanks! That works like a charm! Thank you vekia Share this post Link to post Share on other sites More sharing options...
vekia Posted December 4, 2013 Posted December 4, 2013 you're welcome i marked this topic as [solved] with regards, Milos Share this post Link to post Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now