Solved

How Can I Add a Link that Automatically Applies a Coupon Code to a Shopify Cart?

  • 27 December 2020
  • 1 reply
  • 73 views

Badge

Hi, how are you doing guys? I'm here to find a solution about Klaviyo Coupon Code that applies on a template.

If that says specifically that is Add Link that Automatically Applies a Coupon Code to a Shopify Cart.

Previously, I was trying like this way.

EXAMPLE COUPON CODE: SAVE30

I add this on a text block in template like this:

{% coupon_code 'SAVE30' %}

EXAMPLE PRODUCT LINK: https://www.trupawsco.com/products/tru-multivitamin-1

I add this link on a button in template like this:

https://www.trupawsco.com/discount/{% coupon_code 'SAVE30' %}?redirect=/products/tru-multivitamin-1

After that, I previewed the template on my email. But the button shows errors like " 404 Bad Gateway".

What did I do wrong here?

icon

Best answer by Paul S 28 December 2020, 21:40

Hi @arifulayon,

 

Could you try https://www.trupawsco.com/discount/{% coupon_code 'SAVE30' %}&redirect=/products/tru-multivitamin-1 

and see if that works?

 

Curious if by switching out the “?” with an “&” would reflect a change. 

View original

1 reply

Userlevel 4
Badge +3

Hi @arifulayon,

 

Could you try https://www.trupawsco.com/discount/{% coupon_code 'SAVE30' %}&redirect=/products/tru-multivitamin-1 

and see if that works?

 

Curious if by switching out the “?” with an “&” would reflect a change. 

Reply