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.
Magento – add discount coupon code in newsletter subscription
magento-1.9newsletter
Best Answer
1) Manual solution:
Create a coupon with your desired rules
Set the number of uses to 1 per customer and unlimited for general usage.
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
ornewsletter_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:
Then modify the newsletter subscription e-mail template to include this:
Reference.