Hi, we sell individual items in our store and have a Sold collection on the site, it's useful to show that the shop is healthy and is selling stock well.
Currently the Sold collection is ordered by 'Newest', but this orders it by the date the sold Product is added, not date it was sold. Can I tinker with some code somewhere so only this one collection is ordered by purchase date so the most recently sold item is always shown first?
Solved! Go to the solution
The information when a product was sold is only contained in an order, to which you don't have access in Liquid outside of customer accounts. The product object doesn't expose any data relating to an order or when its inventory reached zero. The only dates attached to a product are the creation and publication dates.