[Hack] Build Shopify cart link with automatic discount coupon

Becki shared the hack to build a link that takes customers directly to a filled cart, and even automatically apply a discount code.

Build a link:

https://yourstore . com/cart/{variant_id}:{quantity}

Add the variant ID + quantity, then remove the curly brackets.

So your link should look like:

https://yourstore . com/cart/61546758362}:1

Here’s how you find your Variant ID:

  1. Navigate to your product page.
  2. Add ‘.xml’ to the end of the URL.
  3. Find the section that says <variant> <id type=”integer”>42130968150234</id>
  4. That long no. is your Variant ID!

Want to auto-add a discount?

Just append ?discount={discountcode} to the end of your URL.

(Don’t forget to remove the curly brackets!)

So your final URL would be something like: https://yourstore . com/cart/61546758362}:1?discount=TIKTOK10

If you found this hack useful, make sure to thank Becki.

Leave a comment

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