Answers.Body: <p>Assuming you've already got the product (which is a <a href="https://craftcommerce.com/docs/product-model#variants" rel="nofollow">ProductModel</a>) in Twig, it's a simple as:</p>
  
  <pre><code>This product is available in {{ product.variants|length }} colors.
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-24T22:26:32.040Z
Answers.LastActivityDate: 2016-08-24T22:26:32.040Z
Answers.UserDisplayName: Brad Bell
Body: <p>Is it possible to display the number of variants a product has?</p>
  
  <p>This would be in order to achieve the following:</p>
  
  <blockquote>
    <p>This product is available in <strong>3</strong> colors</p>
  </blockquote>
  
Tags: <plugin-craftcommerce>
Title: Display number of variants as a value
ThreadText: # Display number of variants as a value
  
  (Asked by: username_0 on 2016-08-24)
  
  Is it possible to display the number of variants a product has?
  
  This would be in order to achieve the following:
  
  > This product is available in **3** colors
  
  **Tags:** plugin-craftcommerce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-08-24. Score: 1 | Accepted answer
  
  Assuming you've already got the product (which is a [ProductModel](https://craftcommerce.com/docs/product-model#variants)) in Twig, it's a simple as:
  
  ```
  This product is available in {{ product.variants|length }} colors.
  
  ```
  
  
  ---
  
  