selected variant item not adding to cart on Debut theme

selected variant item not adding to cart on Debut theme

AvidBrio
Shopify Partner
295 17 29

I have a debut theme latest version. 
Variant Select Option code 

 <select class="--single-option-selector single-option-selector-{{ section.id }} product-form__input pd-vants round-- classic"
                  id="SingleOptionSelector{{ forloop.index }}"
                  data-index="option{{ forloop.index }}"
                >
                <option value="selected_the_size"> Select the size first   </option>
                  {% for value in option.values %}
                  {%- comment -%}  {%- endcomment -%}
                    <option {%- if variant == current_variant %} selected="selected" {%- endif -%} value="{{ value | escape }}" data-index="{{ value | handle}}">{{ value }} 
                       <b> {{ cart.currency.symbol }} </b>
                    </option>
                   
                  {% endfor %}
                 
                </select>

 

 

but the all product first varint added to cart. 

If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
Replies 3 (3)

hfound
Excursionist
23 0 3

I have the same problem.  Ever find a fix?

AvidBrio
Shopify Partner
295 17 29

issue with no-js section code i removed  this is solution for " DEBUT THEME "       the code inside -> product-template.liquid   

 

 

{% form 'product', product, class:form_classes, novalidate: 'novalidate', data-product-form: '' %}

 

 

find the product form add beloved code  inside the product form tag 

 

  <select name="id" id="ProductSelect-{{ section.id }}" class="product-form__variants no-js">
               <option selected="selected" value="selected"> Select the Option </option>
              {% for variant in product.variants %}
                <option value="{{ variant.id }}"
                  {%- if variant == current_variant %} selected="selected" {%- endif -%}
                >
                  {{ variant.title }}  {%- if variant.available == false %} - {{ 'products.product.sold_out' | t }}{% endif %}
                </option>
              {% endfor %}
            </select>

 



If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
Elisaw
Explorer
79 2 11

@AvidBrioI have a similar problem but I can't seem to solve it. I am not sure where to insert the code above, when I tried it didn't work. Would you be able to help? Thanks so much! This is my website: https://tartar-berlin.com