This article covers how to add a product and coupon to a cart at the same time. The typical use case is that a merchant wants 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.
Navigate 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.
Next, add a coupon code to the end 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
Example: mystore.cratejoy.com/ac/COUPONCODE?next=/howitworks
Link customer directly to the cart with product terms or variants selected:
Subscription product and term selected:
Subscription product, term and variant selected:
3. Share 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.