Liquid, JavaScript, themes, sales channels
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? 😞
Hey! I have the same problem, did you find a solution?
User | RANK |
---|---|
38 | |
29 | |
13 | |
12 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023