How to integrate the promotion bar with custom javascript

The promotion bar can be integrated with custom javascript as follows.

Here's a snippet of javascript that you can call wherever you would like to apply a coupon to the customer's cart.  Let's say for example if you want a coupon to be applied to everyone's cart for Black Friday, you could add this to every page:

You may want to test it out by running it in your console manually:

Once the coupon is enabled, you'll see the promotion bar pop up.  Note that the coupon label (not the name) will show up in bold if it's present.

And once items are added to the cart, the coupon will be applied:

Still need help? Contact Us Contact Us