How to check the product has only default variant

how to hide the product has not variant that time show the default title on the


variant dropdown

2 Likes

Hello @AvidBrio ,

Use this condition :- {% if product.has_only_default_variant %} {% endif %}

5 Likes

I fixed this one

{% if product.has_only_default_variant %}
      
    {% else %}
      
      {% endif %}

@IttantaTech thanks i fixed before the answer thank lot for the answers