Woo-easy Add To Cart Link Generator

Raja Osama
2 min readDec 23, 2020

Lately, I have been working with eCommerce Mobile applications to treat Shopify and woo-commerce as a headless CMS. Display Projects and the ability to add to Cart and to checkout to place a successful order.

After completing the Cart, the only problem I had was making a similar checkout system that both Shopify and WordPress support. After a couple of research hours, I decided to use web view and handle checkout steps directly from the website.

We all know that Shopify supports add to cart directly from the link, So http://<You Store>.myshopify.com/cart/<varaiant Id>:<quantity> this will let you add an item the current session of the website and proceed with the checkout process.
You can learn more about it on How to Auto-Add Products & Discount to Shopify Cart via URL | Elevar (getelevar.com)

But it was not possible to do such a thing with Woocommerce, Since the only link to the cart that woo-commerce provide just let you add just one product at a time. So I had to Custom Build a plugin and clone the functionality of Shopify add to cart link.

Simple Add To Cart is a plugin that will let you easily add multiple products into a cart of your browser’s current section and their quantity.

You can install the plugin from here.

And After Activating the plugin, you will be able to
1- Append Products on a cart
http://<domain>/checkout/?add-to-cart=<variant Id>:<quantity>

2- Reset products and add products to the cart.
http://<domain>/checkout/?add-to-cart=<variant Id>:<quantity>&new



Raja Osama

👋 Hi, I'm Raja Osama, a polyglot rockstar software engineer who loves to create fascinating applications using JavaScript-based tech stack. 💻