Answers.Body: <p><code>product.variants|length</code> will in fact give you the exact number of variants the product has. If it is giving you an unexpected response, you’re probably just not looking at the right product in the first place. Try outputting the following to create a URL to the product’s edit page in the Control Panel:</p>
  
  <pre><code>&lt;a href="{{ product.getCpEditUrl() }}"&gt;{{ product.title }}&lt;/a&gt;
  </code></pre>
  
  <p>Then click on that link from your browser to see the actual product you’re dealing with.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-14T14:43:34.710Z
Answers.Text: It goes to the correct product so i don't think that's the issue.
Answers.UserDisplayName: Christopher Healey
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-14T14:53:53.923Z
Answers.Text: Well it's magically working now. I'll create another question for the portion of my question you deleted because that's still not working.
Answers.UserDisplayName: Christopher Healey
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-14T14:38:52.190Z
Answers.LastActivityDate: 2015-12-14T14:38:52.190Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>I'm trying to test if a product has multiple variants AND/OR test for specific product variants. </p>
  
  <pre><code>{% if product.variants|length &gt; 1 %}
  </code></pre>
  
  <p>That does not seem to work, even if it is a non-variant product. I understand that even for products without variants there is a 'default' variant, but shouldn't this return false if its a product type without variants given it should have only 1?</p>
  
Tags: <conditional><plugin-craftcommerce>
Title: Test for specific or multiple product variants
ThreadText: # Test for specific or multiple product variants
  
  (Asked by: username_0 on 2015-12-14)
  
  I'm trying to test if a product has multiple variants AND/OR test for specific product variants.
  
  ```
  {% if product.variants|length > 1 %}
  
  ```
  
  That does not seem to work, even if it is a non-variant product. I understand that even for products without variants there is a 'default' variant, but shouldn't this return false if its a product type without variants given it should have only 1?
  
  **Tags:** conditional, plugin-craftcommerce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-12-14. Score: 1 | Accepted answer
  
  `product.variants|length` will in fact give you the exact number of variants the product has. If it is giving you an unexpected response, you’re probably just not looking at the right product in the first place. Try outputting the following to create a URL to the product’s edit page in the Control Panel:
  
  ```
  <a href="{{ product.getCpEditUrl() }}">{{ product.title }}</a>
  
  ```
  
  Then click on that link from your browser to see the actual product you’re dealing with.
  
  > **Comments:**
  > **username_0**: It goes to the correct product so i don't think that's the issue.  
  > **username_0**: Well it's magically working now. I'll create another question for the portion of my question you deleted because that's still not working.  
  
  ---
  
  