How to Auto-Add Products & Discount to Shopify Cart via URL
See how to quickly build custom links to use in emails, landing pages, and more to auto-add products and discounts to the cart.
Landing pages have been quite the craze with the growth of tools like Shogun, Zipify Pages, Click Funnels, etc. We’re seeing more and more prospecting campaigns driving traffic directly to these pages promoting only one (or a few) products vs a full collection page of products.
These can be very successful especially those with great storytelling like we’ve seen with Truvani (aka The Food Babe) and Ylonn.
Success on this type of landing page can vary widely. A big part of this is the audience you are sending here – how qualified are they for this specific offering?
If you have found yourself creating landing pages or thinking about it – then creating a seamless experience for the user to add to cart, apply a discount, and redirect to the checkout is a no-brainer.
This prevents the awkward experience where you are sending users to the product page to add from the landing page. Or gasp if you are trying to use the Buy Now button channel!
This quick tip shows how to auto-add a product to your cart and automatically redirect to the Shopify checkout page (Shopify calls it a cart permalink).
Step 1: Pick your product
Inside of your Shopify admin find your product that you want to auto-add to cart and go to your browser bar:
Step 2: Add .xml to the end of your product URL
Once you’ve found your product then add .xml to the end of the URL and refresh your browser. This should bring up an XML (code) looking page:
Step 3: Find and save the variant ID
Once you’ve loaded the XML version of the page then look for the <id> nested under the variant details as shown highlighted in the image above.
Step 4: Build your Link
Now save this ID for one or more products and start building your link.
The link should be your myshopify.com store URL version like this:
http://brevitedesign.myshopify.com/cart/2942460854298:1
Where the bolded number is the variant ID from step 3 and then use a :1 for the quantity added. In this example above I am adding a quantity of 1 to the cart.
Step 5: Optionally add a discount code
If you want to auto-apply a discount then you can do this by adding a parameter to the end: ?checkout[reduction_code]=discountcode
Where discountcode is your discount code.
So in this example our URL would now be:
http://brevitedesign.myshopify.com/cart/2942460854298:1?checkout[reduction_code]=discountcode
Step 6: Test your link
Now test your link! Open a new browser window => paste your URL => and verify the product is added to the cart for you.
That’s it!
You can now auto-add products to the cart, with a discount, using a simple URL.
This can be done on blogs, landing pages, emails, etc.
Good luck!
Amazing, now I want to do this for bundles eg buy 2 for $x can this be done and what additions would need to added? So clicking the link would add two of the same product to the cart with the discount applied.
Thank you.
Do you know how to go to the cart and not to the checkout?
Thank you
Hi Sebastian! I don’t believe this is possible to send users to the cart instead of checkout..
Hi Brad, can we use this with two items in the cart/checkout? Because we are doing BOGO discount now and two items must be added.
Can you do this on a product with different sizes? Is this only applicable on the sku?
Not very customizable shopify is it? All people want me to do is buy an app for that specific query. what a joke.
or You can just to this.
https://YOUR_STORE_HERE.com/cart/add?id=PRODUCT_VARIANT_ID&quantity=1
Or you can do this link bellow also
https://YOUR_STORE_HERE.com/cart/add?id=PRODUCT_VARIANT_ID&quantity=1
Can i use that add to cart link on a facebook ad link? does it will be tracked correctly with utm?
Can you get a URL that takes the customer to the home page with 1 item in the cart?
Hi,
I have done like this only and its showing “Out Of Stock” same like above video how to get rid of that?
Can you redirect back to the homepage or does it have to be the checkout page?
Has anyone got this “?checkout[reduction_code]=discountcode” part of the URL working as it does nothing for me
Thanks
how to make customer land on homepage of shopify and the product automatically gets added
Hi Mino thats a great link https://YOUR_STORE_HERE.com/cart/add?id=PRODUCT_VARIANT_ID&quantity=1 but do you know how to add more than one product in this same way. For example product id 1 qty1 & product id 2 qty1 in the same url
Try “http://brevitedesign.myshopify.com/cart/2942460854298:1?[discount]=discountcode” with your website, your variant ID and your discount code.
That reply was for Sam (June 10, 2021 at 12:13 pm). I’m using the Supply theme.
Hi Sam, this one works better:
“https://www.your-website.com/discount/your-discount-code?redirect=%2Fcart/your-variant-ID:quantity”. Here’s an example with discount code “2for1″ and 2 of the product added to the cart:
“https://www.brevitedesign.myshopify.com /discount/2for1?redirect=%2Fcart/2942460854298:2”
I’m the 6th person to ask this but how do we do this and then open the home page instead of the cart or checkout pages?
Thanks, it is very useful.
This type of link is directly to the checkout page:
“https://www.your-website.com/discount/your-discount-code?redirect=/cart/your-variant-ID:quantity”
This type of link is directly to the product page and will auto apply the discount when goes to the checkout page:
“https://www.your-website.com/discount/your-discount-code?redirect=/products/your-product-handle”
If you want to take a great deal from this post then youu have to apply such methods
to your won wweb site.
my web blog :: moviedailynews
Woah! I’m really enjoying the template/theme of this website.
It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between user friendliness and
visual appearance. I must say you’ve done a amazing job with this.
Additionally, the blog loads very quick for me on Safari.
Excellent Blog!
Do you know how to use this but adding two products to the cart?
“https://www.your-website.com/discount/your-discount-code?redirect=%2Fcart/your-variant-ID:quantity”.
Thanks
If some one wants to be updated with most recent technologies after that he must be pay a visit this web site and
be up to date daily.
Hi there! I just wanted to ask if you ever have any trouble with hackers?
My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup.
Do you have any methods to stop hackers?
Hi, I desire to subscribe for this website to obtain most recent
updates, so where can i do it please help out.
This is a topic that’s close to my heart…
Cheers! Where are your contact details though?
If some one wants to be updated with most recent technologies then he must
be pay a visit this site and be up to date daily.
Asking questions are in fact nice thing if you are not understanding anything
totally, except this post provides good understanding even.
Hello! Quick question that’s entirely off topic. Do you know
how to make your site mobile friendly? My blog looks weird when viewing from my apple iphone.
I’m trying to find a template or plugin that might be able to fix
this issue. If you have any recommendations,
please share. Many thanks!
I am sure this article has touched all the internet users, its
really really nice post on building up new blog.
You really make it appear so easy together with your presentation however I to find this matter to be actually one thing that I feel I’d by no means understand.
It seems too complex and extremely vast for me. I’m looking ahead for
your subsequent put up, I’ll attempt to get the
hold of it!
You’re so interesting! I do not suppose I’ve read a single thing like this before.
So nice to find someone with some unique thoughts
on this issue. Really.. thank you for starting this up.
This website is something that’s needed on the internet, someone with some originality!
Thanks for sharing such a fastidious thought, article is pleasant, thats why i
have read it fully
Its like you read my mind! You appear to know a lot about this, like
you wrote the book in it or something. I think that you can do with some pics
to drive the message home a bit, but instead of that, this is
great blog. An excellent read. I will definitely be back.
Currently it looks like Expression Engine is the top blogging
platform out there right now. (from what I’ve read) Is that
what you’re using on your blog?
We’re a gaggle of volunteers and starting a new scheme in our community.
Your site offered us with helpful info to work on. You
have performed an impressive activity and our entire community might be grateful to
you.
There’s definately a lot to know about this topic. I love all the
points you made.
Hi there, everything is going perfectly here and ofcourse
every one is sharing facts, that’s really excellent,
keep up writing.
Pretty! This has been an incredibly wonderful article.
Many thanks for supplying these details.
I know this if off topic but I’m looking into starting my own weblog and was wondering what all is required to
get setup? I’m assuming having a blog like yours would cost a pretty penny?
I’m not very internet smart so I’m not 100% sure. Any suggestions or advice would be greatly appreciated.
Cheers
As the admin of this site is working, no question very shortly it will
be well-known, due to its feature contents.
Hmm it looks like your site ate my first comment (it was
super long) so I guess I’ll just sum it up what I had written and say,
I’m thoroughly enjoying your blog. I as well am an aspiring blog blogger but
I’m still new to the whole thing. Do you have
any points for beginner blog writers? I’d genuinely
appreciate it.
Wow that was unusual. I just wrote an really long comment but after I clicked submit my comment didn’t appear.
Grrrr… well I’m not writing all that over again. Anyway, just wanted to say wonderful blog!
It’s hard to come by well-informed people about this subject, but you seem
like you know what you’re talking about! Thanks
Greetings! I know this is kinda off topic however I’d figured
I’d ask. Would you be interested in trading links or maybe guest writing a blog post
or vice-versa? My blog addresses a lot of the same topics as yours and I believe we could greatly benefit from each
other. If you’re interested feel free to send me an email.
I look forward to hearing from you! Superb blog by
the way!
Good article! We are linking to this great article on our website.
Keep up the great writing.
I’m gone to say to my little brother, that he should
also visit this weblog on regular basis to obtain updated
from hottest reports.
Thank you for the auspicious writeup. It in fact was a amusement account it.
Look advanced to far added agreeable from you!
However, how can we communicate?
Your style is unique in comparison to other people
I have read stuff from. Many thanks for posting when you
have the opportunity, Guess I will just bookmark this web site.
I am actually glad to read this webpage posts which carries
lots of valuable information, thanks for providing these kinds of data.
Whats up this is somewhat of off topic but I was wondering
if blogs use WYSIWYG editors or if you have to manually
code with HTML. I’m starting a blog soon but have no coding skills so I wanted to get guidance from someone
with experience. Any help would be enormously appreciated!
This is really attention-grabbing, You’re a very skilled blogger.
I’ve joined your rss feed and sit up for in the hunt for extra of your excellent post.
Additionally, I’ve shared your website in my social networks
My family members always say that I am killing my time here at net, but I know I
am getting know-how every day by reading thes fastidious articles or
reviews.
Thanks for a marvelous posting! I definitely enjoyed reading it, you are a great author.
I will remember to bookmark your blog and definitely will come back
at some point. I want to encourage continue your great job,
have a nice afternoon!
If you are going for most excellent contents like myself, only
pay a visit this website daily since it offers feature contents, thanks
I am truly happy to read this weblog posts which consists of lots
of helpful data, thanks for providing these kinds of
data.
I am genuinely thankful to the holder of this site who
has shared this fantastic article at here.
It’s nearly impossible to find knowledgeable people in this
particular topic, but you sound like you know what you’re
talking about! Thanks
Incredible points. Sound arguments. Keep up the amazing spirit.
It’s a pity you don’t have a donate button! I’d
without a doubt donate to this fantastic blog!
I suppose for now i’ll settle for book-marking and adding
your RSS feed to my Google account. I look forward to fresh updates and will talk
about this site with my Facebook group. Chat soon!
A motivating discussion is worth comment. I believe that you need to
publish more on this subject, it may not be a taboo matter but generally people don’t speak about these
issues. To the next! Cheers!!
Right here is the right web site for everyone who wishes to find out about this topic.
You understand a whole lot its almost tough to argue
with you (not that I actually will need to…HaHa). You definitely put a new spin on a subject that’s
been written about for many years. Wonderful stuff,
just wonderful!
I’m now not positive the place you are getting your info, however great topic.
I must spend some time learning more or working out more.
Thank you for magnificent information I was looking for this information for my mission.
Your mode of telling all in this paragraph is actually fastidious, every
one be able to easily understand it, Thanks a lot.
Today, while I was at work, my cousin stole my iphone and tested to see if it can survive a 40 foot drop,
just so she can be a youtube sensation. My iPad is
now broken and she has 83 views. I know this is completely off topic but
I had to share it with someone!
Thank you, I have recently been looking for information about this subject for ages and
yours is the greatest I have came upon so far. However, what
about the bottom line? Are you sure concerning the supply?
I’m really impressed along with your writing talents as well as with the format for your weblog.
Is this a paid subject matter or did you customize it yourself?
Either way keep up the nice quality writing, it is uncommon to peer a nice weblog like this one nowadays..
I could not refrain from commenting. Exceptionally well written!
Hello to every body, it’s my first pay a visit of this website;
this web site contains amazing and really fine data for readers.
Great article! That is the type of information that are supposed to be shared
around the net. Shame on Google for not positioning this publish higher!
Come on over and consult with my website . Thank you =)