HELP please - Required parameter missing or invalid: id

Solved
Excursionist
40 2 0

Hi, recently I have been getting an error when items are clicked to be added to cart. I have an older verson of the theme that doesn't have the error (which is the one current live on the website - littletingles.com). I have tried to look at the differences between my older working theme, and my new not-working theme, however I have had no luck with fixing the cause of the error. Unfortunately I have close to zero programming knowledge. Can someone please help me fix this? Thank you. 

123132.png

0 Likes
Shopify Expert
2490 417 525

Hi @littletingles 

As i can see in this product its working fine, let me know if still any issue and send me product link.

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Excursionist
40 2 0

@Jasoliya Hi, try now. I have updated it to the non-working theme 

0 Likes
Shopify Expert
2490 417 525

Hi 

You have problem with you variants select box that generating on product page (Section->product-template.liquid) find name="id" and check its code are wrong compare to old working theme.

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like
Excursionist
40 2 0
 <select name="id" id="ProductSelect-{{ section.id }}" class="product-form__variants no-js">
              {% for variant in product.variants %}
                {% if variant.available %}
                  <option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} value="{{ variant.id }}">
                    {{ variant.title }}
                  </option>
                {% else %}
                  <option disabled="disabled">{{ variant.title }} - {{ 'products.product.sold_out' | t }}</option>
                {% endif %}
              {% endfor %}
            </select>
 <select name="id" id="ProductSelect-{{ section.id }}" class="product-form__variants no-js">
              {% for variant in product.variants %}
                {% if variant.available %}
                  <option {%- assign featured_image = current_variant.featured_image | default: product.featured_image -%} value="{{ variant.id }}">
                    {{ variant.title }}
                  </option>
                {% else %}
                  <option disabled="disabled">{{ variant.title }} - {{ 'products.product.sold_out' | t }}</option>
                {% endif %}
              {% endfor %}
            </select>

Top is working, bottom is not. I tried replacing/switching but it didn't help

0 Likes
Shopify Expert
2490 417 525

Then need to check in code cant find whats affecting or wrong with code from just console.

Add me as staff(jasoliyabrijesh123@gmail.com) i will  check if any code wrong. 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like
Excursionist
40 2 0

Hi, I have done so. Thank you

0 Likes

Success.

Shopify Expert
2490 417 525

You have not added bellow code in your variants code:

{% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %}

That use for variants selection in background.

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like
Excursionist
40 2 0

Hi, thank you so much for your help. It appears to be working now

0 Likes