We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: Parameter missing or invalid: Required parameter missing or invalid: items

Parameter missing or invalid: Required parameter missing or invalid: items

barks-meow
Visitor
1 0 0

I am having an issue with my shopify store (my theme is dawn). Sometimes when i go to add a product to cart it works fine and i can checkout normally, then other times i will go to add a product to cart and i will receive a page with a message saying "Parameter Missing or Invalid: Required parameter missing or invalid : items". Or sometimes the add to cart button goes grey and i can't click it at all. I have tried everything to resolve the issue but have had no luck. I can work out why it works fine sometimes and not others. I'm in desperate need of this issue being resolved as i fear its stopping customers buying from my store. Has anybody had the same issue ? and know how to fix?

 

Thanks in advance

Replies 4 (4)

Iris
Shopify Staff
826 67 110

Hi @barks-meow ,

 

Thank you for posting this question. 

 

I’m sorry to hear about this issue. What theme do you use?

 

This error occurs when you don't submit a variant ID or quantity amount with your Add to Cart form.

 

There are a few possible reasons for this:

  • You might have badly-formed HTML in your customized template. You can check your HTML by submitting your code to the W3C Validator.
  • You might have tried hiding the default option for a product with only one variant by removing the dropdown menu or single radio button. You must replace whatever you have removed with a hidden field that will pass the variant ID of the first variant to Shopify.
  • You might use radio buttons for product variants in your customized theme, but no button is checked by default. You must select the first radio button in your HTML using selected="selected". If your customer does not select a variant, and no variant is selected by default, no variant ID is submitted with the form.

 

Also, if you cannot fix this error using these methods, you can roll back your product.liquid template to an earlier version.

 

In case you don’t feel comfortable editing the template code yourself, you can always reach out to our Support team. Our team may be able to work on this for you if you use Shopify free theme and your store has enough complimentary design time left.  

 

You can reach out to our Contact Us page at this link. Then log in to your store. It will allow us to verify you as the store owner securely. Once you have successfully logged in, you should be able to reach out to a Support Advisor.

 

Iris | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

P1Commerce
Shopify Partner
129 17 68

For other people who come across this, I've been able to reproduce it on the default Dawn theme. The issue seems to be that the add to cart form submission relies on javascript, so when an internet connection is a bit slow, the page loads and looks fully rendered, but the a javascript hasn't finished loading, so when the person hits the add to cart button, it fails due to javascript not having executed. Why it happens for some people some times, and not others, has to do with the speed of the internet connection.

Appreciate the assistance? Please hit the Like and Accepted Solution buttons.
--
P1 Commerce is your trusted partner for eCommerce growth.
p1commerce.com
StephenOnochie
Shopify Partner
1 0 0

Just ran into this issue and can confirm internet connection is a possible cause of this.

erik_lindberg_s
Shopify Partner
23 3 8

The issue could be that

quick-add.js

and/or

product-form.js

is missing or not loaded. Check your network tab in the browser console.

You can also check the hidden input

class="product-variant-id"

just above the add to cart button. If it has disabled it's properly because quick-add.js isn't loaded.

In my current DAWN theme main-search.liquid dos not load the above JS which creates the issue. If I add a featured section in "search" in the costumizer it fixes the issue bc the featured collection section loads the required JS.