How to add a unique coupon code for newsletter subscriber. I am beginner in magento so please help how to send subscription email with this coupon code. please help.

1 Answer 1


1) Manual solution:

  1. Create a coupon with your desired rules

  2. Set the number of uses to 1 per customer and unlimited for general usage.

  3. Copy the coupon code in the newsletter email

Path: app/design/frontend/{your package}/{your theme}/locale/language_ISO/template/email/newsletter_subscr_confirm.html for exemple.

2) The dynamic one:

Create an observer on the newsletter_subscriber_save_before or newsletter_subscriber_save_after that checks if the customer subscribes and if so, it creates a coupon with your desired settings. See this for creating coupons by code.
Then rewrite the method Mage_Newsletter_Model_Subscriber::sendConfirmationSuccessEmail so you can pass that code as a parameter to the e-mail template.
Something like this:

        array('subscriber'=>$this, 'coupon_code'=>THE COUPON GENERATED IN THE EVENT)

Then modify the newsletter subscription e-mail template to include this:

Your coupon code is: {{var coupon_code}}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.