<p>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.</p>
<p>Right now for your answer use below totalQty method to get total item count.</p>
<pre><code>{{ craft.commerce.carts.cart.totalQty }}
</code></pre>

CC BY-SA 4.0
2020-12-28T16:27:43.660Z
2020-12-28T16:27:43.660Z
ZealousWeb
<p>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?</p>

<craft3><plugin-craftcommerce>
How can I get the cart total item? I tried using a “length” filter but it’s not working with that
# How can I get the cart total item? I tried using a “length” filter but it’s not working with that

(Asked by: username_0 on 2020-12-28)

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?

**Tags:** craft3, plugin-craftcommerce

---

## 1 answers

### Answer by username_1 on 2020-12-28. Score: 2 | Accepted answer

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 }}


---

