Home » WooCommerce » WooCommerce Add to cart URL with Quantity

WooCommerce Add to cart URL with Quantity

Woocommerce add to cart url with quantity and redirect after checkout page. Bellow explain How to add product to cart page by using query string.

How Add product to WooCommerce cart?

https://yourdomain.com/?add-to-cart=

&quantity=1
eg: https://yourdomain.com/?add-to-cart=1230&quantity=1

How Add product to WooCommerce cart and redirect to checkout page?

https://yourdomain.com/checkout/?add-to-cart=

&quantity=1
eg: https://yourdomain.com/checkout/?add-to-cart=1230&quantity=1

Note: for this to work, you should check the “Enable AJAX add to cart buttons on archives”
WooCommerce –> Settings –> Products -> General 

Enable Redirect to Checkout
How Add product to WooCommerce cart and redirect to custom URL?

https://yourdomain.com/custom-url/?add-to-cart=

&quantity=1

References

Duminda Wijerathna

An all round web designer building websites Over 18 years. Interested in achieving a suitable placement in the field of IT in a growth oriented organization which offers diverse job responsibilities in order to utilize and improve my skills, Knowledge and experience.

Leave a Comment

Your email address will not be published. Required fields are marked *