The only support it has is: (via URL)
?add-to-cart=variation&product_id=1100
So you need to make a hidden form element called Qty:
<input name="quantity" data-min="1" data-max="0" value="1" size="4" title="Qty" class="input-text qty text" maxlength="12">
But since you have more than one. You would do
<form action="/shop/?add-to-cart=variation&product_id=1100" class="variations_form cart" method="post" enctype="multipart/form-data">
Size
<select>
<option value="">Choose an option…</option>
<option value="large">Large</option>
<option value="medium">Medium</option>
<option value="small" selected="selected">Small</option>
<option value="x-large">X-Large</option>
</select>
Colour
<select id="pa_colour" name="attribute_pa_colour" style="opacity:0">
<option value="">Choose an option…</option>
<option value="black" selected="selected">Black</option>
</select>
<input type="hidden" name="variation_id" value="1104">
<input name="quantity" data-min="1" data-max="0" value="1"
size="4" title="Qty" class="input-text qty text" maxlength="12">
<button type="submit" class="button alt">Add to cart</button>
<input type="hidden" name="product_id" value="1100"></div>
</form>
Just make sure your Ids
and Names
are unique, make an jQuery Ajax field which updates that Qty
value. You can only submit through the form method UNLESS you edit the core PHP
values and allow REQUEST
rather than GET
.