Fix “Parameter Missing or Invalid” errors
When adding an item to the cart, you may have encountered the error Parameter Missing or Invalid: Required parameter missing or invalid. 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 to hide the default option for a product that has 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. If you have any trouble with this, post a question in the Shopify Community forums.
You might use radio buttons for product variants in your customized theme, but there is no button checked by default. You have to select the first radio button in your HTML using
selected="selected". If your customer does not select a variant, and there is no variant selected by default, no variant ID is submitted with the form.
If you are unable to fix this error using these methods, you can roll back your
product.liquid template to an earlier version.