You now have an array of all the IDs of products ordered the 10 last days, you are free to load a product collection filtered with this array, like that :
To reply to your comment : the code in my answer above this one will give you a collection of the last 10 days sold products that you can exploit. If you want to filter products that are out of stock, use this piece of code on the collection above :
2
Answers
It’s not very difficult with the report classes :
You now have an array of all the IDs of products ordered the 10 last days, you are free to load a product collection filtered with this array, like that :
To reply to your comment : the code in my answer above this one will give you a collection of the last 10 days sold products that you can exploit. If you want to filter products that are out of stock, use this piece of code on the collection above :
You can add a category filter too if you need :