How to Create a Shopify Permalink for Adding Multiple Products to Cart with Discounts (and Show the Cart Page Instead of Going Straight to Checkout)
If you’re trying to create a Shopify permalink to add multiple products to the cart, apply discount codes, and show the cart page instead of going straight to checkout, this guide is for you. I spent hours figuring this out, and neither Shopify Support nor existing community posts had the solution. Here’s what worked for me.
The Solution:
1.Show the Cart Page:
To display the cart page (not the checkout), you need to append ?storefront=true to the link.
2.Use Variant IDs, Not Product IDs:
Shopify permalinks require Variant IDs, even for products without variants. If you try to use a Product ID, it won’t work.
How to find the Variant ID:
-
Open the product page in your store.
-
Right-click and select Inspect (or “View Page Source”).
-
Use CTRL+F (Windows) or CMD+F (Mac) and search for variant.
-
Look for the Variant ID, which is a long numeric string (e.g., 12345678901234).
3.Apply Multiple Discount Codes:
While Shopify officially only supports one discount code per link, I found that adding multiple codes separated by commas does work in the cart permalink. For example:
&discount=CODE1,CODE2.
Example Permalink:
Here’s a working example with two products and two discount codes:
https://your-shopify-store.com/cart/12345678901234:1,98765432109876:1?storefront=true&discount=DISCOUNT1,DISCOUNT2
Replace:
-
12345678901234 and 98765432109876 with your Variant IDs.
-
DISCOUNT1 and DISCOUNT2 with your discount codes.
Notes:
-
If multiple discounts don’t work for you, try apps like Multi Discount Rocket. But it should work none the less with 2 codes
-
Make sure all products and discounts are active in your Shopify Admin.
Final Thoughts:
This solution worked for me after a lot of trial and error. Shopify, I love your platform, but I was disappointed that neither support nor existing guides could provide a clear solution. I hope this post saves others time and frustration. You can Check this as solved and i hope i can save some people the hours I’ve wasted…
Good luck, Shopify developers and e-commerce managers! May your permalinks work flawlessly! ![]()