Is there a way to get the number of items of a specific product by its id? For example, I added to my cart 5 green apples and 10 lemons. I want to get the number of green apples in cart (which is 5), by the id of the green apple product.
Is there a simple way to achieve? Thanks
2
Answers
Ok I cracked it:
You can use the following function to get product quantity of a particular product