Creating shopping cart price rule.
Go to Admin Panel >> Promotions >> Shopping Cart Price Rules >> Add New Rule. Choose "Coupon – Specific Coupon“. Check "Use Auto Generation" or enter your coupon code. Set "Uses per coupon" and "Uses per customer" to 1.
Joining coupon and newsletter subscription form
Go to Admin Panel >> System >> Configuration >> MageTrend Extensions >> Exit Popup >> Coupon Settings >> Shopping Cart Price Rule >> Choose your before created coupon and save settings.
Add coupon code to newsletter success email
Note: If you are using mailChimp service, you can skip this step.
First go to Admin Panel >> System >> Transactional Emails >> Add New OR edit your already existing template. Insert this code in your template: {{var subscriber.exit_offer_coupon_code}}
Avoid re-subscribers
Note: If you are using mailChimp service, you can skip this step.
To avoid new coupon generation for already subscribed or resubscribed emails, use this code in template:
{{if subscriber.isObjectNew()}} {{var subscriber.exit_offer_coupon_code}} {{/if}}
Set newsletter success email template
Note: If you are using mailChimp service, you can skip this step.
Set before already created template as primary template. Go to Admin Panel >> System >> Configuration >> Newsletter >> Subscription Options >> Success Email Template >> Choose your template.