Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-28T16:27:43.660Z
Answers.LastActivityDate: 2020-12-28T16:27:43.660Z
Answers.UserDisplayName: ZealousWeb
Body: <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>
  
Tags: <craft3><plugin-craftcommerce>
Title: How can I get the cart total item? I tried using a “length” filter but it’s not working with that
ThreadText: # 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 }}
  
  ```
  
  
  ---
  
  