How to send a discount code only if a specific product has been purchased?
Using Personal Discount, you can add a unique discount code to the order confirmation email that Shopify sends after every purchase. However, you may want to offer a discount based on certain conditions. For example, you may want to send a coupon code only if a customer purchased a specific SKU.
Normally, Personal Discount gives you a code snippet like below to insert in the order confirmation email template:
To send a coupon only if a particular item was purchased, you need to add two lines above and to lines below the code snippet:
Please note that you need to replace A123 with the SKU of the product that you want to target.
The order confirmation email will now include a discount code only if the SKU has been added to the order. Other customers who have not purchased the specific item won't receive the discount.
Last updated