I am using the craft commerce plugin and I want to fetch total qty of the cart items. I have tried the length filter but its not working. Is there any other filter that can help in it?


You can use the totalQty method to fetch total items from the cart. It’s a predefined method in the commerce plugin to get total items. Also you can find other methods like this in the documentation of the craft commerce plugin.

Right now for your answer use below totalQty method to get total item count.

{{ craft.commerce.carts.cart.totalQty }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.