By rsofthelpdynamos on October 31, 2019
Here you can learn how to add custom “add to cart” URL in WooCommerce Development. This will be very helpful if you need to add “Add to Cart ” button according to your custom needs.
<a href=”https://youdomainname/?add-to-cart=30″>Add to Cart</a>
30 is the prdouct ID which you want to add into the cart.
<a href=”https://youdomainname/?add-to-cart=30&quantity=5″>Add to Cart</a>
30 is the product ID and 5 is the product quantity.
<a href=”https://youdomainname/cart/?add-to-cart=30″>Add to Cart</a>
<a href=”https://youdomainname/checkout/?add-to-cart=30″>Add to Cart</a>
<a href=”https://youdomainname/?add-to-cart=90″>Add to Cart</a>
90 is the variation ID.
<a href=”http://yourdomainname/?add-to-cart=90&quantity=5″>Add to Cart</a>
90 is the variation ID and 5 is the quantity. You can also redirect to Cart, Checkout and another page like simple products:
<a href=”http:// yourdomainname.com/cart/?add-to-cart=90″>Add to Cart</a>
<a href=”http:// yourdomainname.com/checkout/?add-to-cart=90″>Add to Cart</a>
<a href=”http:// yourdomainname.com/anyurl/?add-to-cart=90″>Add to Cart</a>
Recent Comments