This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Add to cart for a specific form

#52628
Ernest MarcinkoErnest Marcinko
Keymaster

I remembered someone asked about quantity before and found this topic.

Apparently it’s possible and it was working for him with this:

<div class="woocommerce">
	<div class="quantity">
		<input type="number" step="1" min="1" max="" name="quantity" value="1" title="Quantity" class="input-text qty text" size="4" pattern="[0-9]*" inputmode="numeric">
	</div>
	<a href="<?php echo $link; ?>"
	   class="button product_type_simple add_to_cart_button<?php echo $ajax; ?>"
	   data-product_id="<?php echo $r->id; ?>" data-product_sku=""
	   rel="nofollow"><?php echo $text; ?></a>
</div>

The script does not have to be changed.