it would be nice to add a new method to the cart object to get the total number of items based on quantity, eg.
// Cart contains two items A and B, A with quantity 1, B with quantity 3
cart()->count() // Returns 2, because 2 items
cart()->countQuantity() // Return 4, because 1 A and 3 B
One could use this method to display the total number of items in cart in the page header.
Might be better added to ProductList rather than cart.
Hello,
it would be nice to add a new method to the cart object to get the total number of items based on quantity, eg.
One could use this method to display the total number of items in cart in the page header. Might be better added to
ProductList
rather than cart.Cheerio