Featured Product update based on latest product
-
12-12-2019 - |
Question
I want to know about featured product update. I have limited the number of featured product to 25. So, the currently 25 products are showing. Now i added more 25 products as featured product now the total number of featured product is 50. I want to show 25 featured product on home page which have been added recently and previous featured product should automatically goes off from home page. One more thing, there is different sort by options like price, name are available in featured widget but i want to have sort by latest product.
So the question is: How to order the products on homepage by the date I added the "featured" flag?
Solution
The most easy way to achieve this by limiting the number of products to show on featured product category to 25 products. And then you can give correct "position" to sort the newly added products at the top (see screenshot for reference)
OTHER TIPS
There is no easy way, because you have no date, which represents this change.
But you can add an attribute which is filled with now()
when this attribute is updated through an observer.