How to check if discount is applied (and show notification bar before checkout)

How to check if discount is applied (and show notification bar before checkout)

Mystform
Visitor
3 0 0

I want to display notification bar on top of every page if discount is applied (mostly for email marketing and automatically applied discounts), but I can't find a way to check if a discount is active (no need to display any dynamic, just "Your discount is applied"). Or atleast display it on first page after redirection. Is it possible to check if url contains a string without javascript?

Replies 3 (3)

LitExtension
Shopify Partner
4860 1002 1151

Hi @Mystform,

You can only check the discount while on the cart or checkout page, you can't check it on every page.

Can you explain your requirement more, I will help you to check it.

 

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
ThangCQ
Shopify Partner
30 3 7

I meet same problem. I just want that when customer apply a discount automatically through automatic url discount, the text "discount is applied" will appear in banner. I've use 

"cart.discount_applications" but it's not work correctly (customer have to go to checkout page and comeback for it to appear). Do you have any suggestion for this case.
Thank you in advance
BMekiker
Visitor
1 0 0

I would like to do something similar. Have you found a solution for this?