Why is my custom checkbox causing a cart error on checkout?

lokisanae
Excursionist
16 0 9

I made a custom checkbox and dropdown menu for my customers before checkout

Everytime theyclick a checkbox on my cart page it always says this:

 

There was an error while updating your cart. Please try again.

 

codes i used pasted in main-cart-items.liquid (dawn theme)

 

<p class="cart-attribute__field">
<input type="hidden" name="attributes[Storage]" value="No">
<input type="checkbox" name="attributes[Storage]" value="Yes"{% if cart.attributes["Storage"] == "Yes" %} checked{% endif %}>
<label>Storage</label>
</p>

<p class="cart-attribute__field">
<label>Storage</label><br>
<select id="storage" name="attributes[Storage]">
<option value="Batch 1"{% if cart.attributes["Storage"] == "Batch 1" %} selected{% endif %}>Batch 1</option>
<option value="Batch 2"{% if cart.attributes["Storage"] == "Batch 2" %} selected{% endif %}>Batch 2</option>
<option value="Batch 3"{% if cart.attributes["Storage"] == "Batch 3" %} selected{% endif %}>Batch 3</option>
<option value="Batch 4"{% if cart.attributes["Storage"] == "Batch 4" %} selected{% endif %}>Batch 4</option>
<option value="Batch 5"{% if cart.attributes["Storage"] == "Batch 5" %} selected{% endif %}>Batch 5</option>
</select>
</p>

 

and when you checkout even that error message appeared, no "Additional details" were added on the Order page, meaning that the checkboxes and drop-down menu didnt do anything or did not work.

 

Can anyone please help me fix this? 😞

Reply 1 (1)

herastore
Excursionist
21 1 4

Hey! I have the same problem, did you find a solution?