This article only applies to the Cratejoy Storefront Plan. Not sure if you have a storefront? Check here.
This is a common request from our merchants. The typical use case is that they want to have a sale which is done via coupon, and they want a single link which will add the product and the coupon to the cart. The solution presented here will allow you to go from any page to having a customer with a product and a coupon on the checkout page with just one click!
1. Create the Coupon.
First off head on over to our "How to Create a Coupon" guide HERE to set up the coupon. Remember the Code for the coupon in question.
2. Figure out the URL.
Now to add the coupon to a customer's account you would add a link to the following URL: <my store>.cratejoy.com/ac/<coupon code>. So if your store was MyStore, and your code was CODE your URL would be: MyStore.cratejoy.com/ac/CODE.
OPTIONAL: Add a path to redirect to.
If you would like the customer to redirect to a specific page after applying the coupon add ?next=/somepathtogoto
Link customer directly to the cart with product terms or variants selected:
Subscription product and term selected:
Subscription product, term and variant selected:
3. Have the customer click on the link!
What happens when this link is clicked? Our subscribe flow will determine which product and/or term you have selected as applicable for your coupon, and will automatically select any values that it can. For example: If you only allow for one product for this coupon then it will be automatically added to the cart. However if you have two products then the customer will be presented with the two product options.
Once the product is successfully added to the cart then the customer will be automatically redirected to the checkout page.
To send someone straight to a cart with a particular product in it but has no coupon code applied:
- the URL is yourstore.cratejoy.com/subscribe/<PRODUCT_ID>/<VARIANT_CHOICE_1_ID>/<VARIANT_CHOICE_2_ID>/
- You can figure out those ids by just going through your subscribe flow
- The last link you click on (which eventually takes you to checkout) - use the URL of that link and that right there is the full URL you need to use
Looking to do this for a 'One-Time-Product'? Check out this help page to create a link that will add the 'One-Time-Product' to the customer's cart and apply a coupon code.