How to assemble the cart URL
1 min read
In some situations, customers ask stores for the link to the shopping cart already assembled with all products. To mount the cart URL you need to use /checkout/cart/add? at the end of the website's default URL, followed by these parameters:
- Sales Policy:
sc={Sales Policy ID}
- SKU:
sku={SKU ID}
- Quantity:
qty={Quantity of the product}
- Seller:
seller={Seller ID}
It's worth noting that it is only necessary to use the sales policy once in the URL. The other three parameters (SKU, Quantity and Seller) must be repeated every time a new product is added to the cart.
When you join each of them in the URL, you must separate them by "&". In the end, the URL looks like this:
https://www.yourwebsite.com.br/checkout/cart/add?sc={Sales Policy ID}&sku={SKU ID}&qty={Quantity}&seller={Seller ID}
See below two examples:
- With 1 product in the cart:
https://www.yourwebsite.com.br/checkout/cart/add?sc=1&sku=22&qty=1&seller=1
- With 2 products in the cart:
https://www.yourwebsite.com.br/checkout/cart/add?sc=1&sku=22&qty=1&seller=1&sku=73&qty=3&seller=1