Jump to content

[SOLVED] Featured Products Order


Recommended Posts

All of the products that will be added to my site by multiple sellers will be "Featured Products". The "Featured Products" module lists them automatically from the oldest at the top of the list to newest. You can reorder them with the arrows in the back office but this will be impossible as I hope to have 100+ sellers adding their products. I would like to change it where they are showing on the home page from the newest to oldest added (reverse of what the module does now).

Any ideas on how to achieve that?

Link to comment
Share on other sites

open homefeatured.php file and change:

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

to:

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

 

i just added one line: $products = array_reverse($products);

Link to comment
Share on other sites

  • 1 month later...

Thank you, that helped enormously!  I also need to be able to move products around.  I have done the following thanks to Pascal who gave me these instructions earlier this year on the forum:

-------------------------------

Q:  In Catalog > Products, Is there a way to changing the ID order? For instance, I want the item #12 listed as #2?

A:  Go to catalog->Products, and select just above the products list on the left the option filter by category. Then select a category for which you want to change the order. Some arrows will appear in the products list on the right (just next to 'action' column)
Then drag/click the products, using these arrows, to the desired position.

Also check: Preferences->Products: Pagination block: Default order by: Set this to 'Position inside category'

---------------------------------

I have done this ^^^^ above but the products do not move on the home page.  Am I missing something?  

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

 

Thank you, that helped enormously!  I also need to be able to move products around.  I have done the following thanks to Pascal who gave me these instructions earlier this year on the forum:

-------------------------------

Q:  In Catalog > Products, Is there a way to changing the ID order? For instance, I want the item #12 listed as #2?

 

A:  Go to catalog->Products, and select just above the products list on the left the option filter by category. Then select a category for which you want to change the order. Some arrows will appear in the products list on the right (just next to 'action' column)

Then drag/click the products, using these arrows, to the desired position.

 

Also check: Preferences->Products: Pagination block: Default order by: Set this to 'Position inside category'

---------------------------------

I have done this ^^^^ above but the products do not move on the home page.  Am I missing something?  

 

 

hello i replied in your another topic related to this question. i think that we can close this topic and continue discussion there

with regards.

Milos

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...