我正在尝试在购物车表单中设置 Shopify 变体下拉菜单。由于某种原因,信息没有通过。我不断收到:“我们无法将此商品添加到您的购物车,因为没有将变体 ID 传递给我们。”
有任何想法吗?
<form action="/cart/add" method="post" enctype="multipart/form-data" style="width: 100%">
<h2>Order Your Painting</h2>
<div id="order-form">
<div class="steps left">
<h3>1. Choose your canvas size</h3>
<div class="selector-wrapper">
<select class="single-option-selector" id="product-select-option-0">
<option value="11“x14” Canvas">11“x14” Canvas</option>
<option value="12”x16” Canvas">12”x16” Canvas</option>
</select>
</div>
</div>
<div class="steps right">
<h3>2. Select a color family</h3>
<div class="selector-wrapper">
<select class="single-option-selector" id="product-select-option-1">
<option value="Blue Tones">Blue Tones</option>
<option value="Sepia Tones">Sepia Tones</option>
</select>
</div>
</div>
<div class="steps left">
<h3>3. Upload your photo</h3>
<div>Select a File to Upload</div>
<p><input type="file" id="photo" name="properties[Photo]" /></p>
</div>
<div class="steps right" id="payment">
<h3>4. Checkout with payment</h3>
<div id="cc">
<input type="hidden" name="return_to" value="/checkout" />
<input type="submit" name="add" id="add" value="Add to cart">
</div>
</div>
</div>
</form>