Ecommerce for Statamic

Vanity Coupons

Bison 1.5 adds a new apply_coupon tag, which enables a small, yet cool feature. Vanity coupons.

Firstly, the new tag lets you create URLs like this: mysite.com/apply-coupon?code=iwenttofoocon.
You could set this route up to load a template containing:

{{ bison:apply_coupon code="{get:coupon}" }}

Now, at your special event, you can give out coupons directing your attendees to mysite.com/apply-coupon?code=iwenttofoocon. But, thats a bit ugly, right?

Just pair that with a vanity route and you’re set. Enter this in your vanity.yaml file:

/FooCon: /apply-coupon?code=iwenttofoocon

Now when you visit mysite.com/FooCon, it’ll apply the coupon and your customer will never see the URL.

Comments