"Required parameter missing or invalid: items" for SOLD OUT

Hi everyone,

I would like to remove this message when I click on the button “SOLD OUT”. By the way, can we also make the button non-clickable?

Sorry, looks like something went wrong. Please correct the following and submit again: Required parameter missing or invalid: items

Hi @wonghae

Aibek is here from Speedimize.io agency.

If it is a Sold Out button, then logically it should not be clickable. Since there is a click event on this button, an ajax request is sent without a variant_id. And so the error Required parameter missing or invalid: items are shown.

Instead of a button, you can put just text or remove the click event. If there is a tag, specify the href=“javascript:void(0)” attribute.

If you give us a link to this product, we will tell you exactly what you need to do.

Show More

You can add css to your theme for pointer-events. Find the class .product-area .options .disabled and append pointer-events: none;

Show More

For e.g mine looks like below

Show More

.product-area .options .disabled {

Show More

cursor: default;

Show More

background-color: #cdd5d5;

Show More

border-color: #cdd5d5;

Show More

pointer-events: none;

Show More

}