uabassguy / brandastic-newsletter-coupon
N/A
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: 7.0.2|7.0.4|~7.0.6|~7.1.0
- magento/module-newsletter: 100.2.*
This package is not auto-updated.
Last update: 2024-10-03 13:33:16 UTC
README
Magento 2 plugin to generate a coupon upon newsletter subscription
Installation
composer require uabassguy/brandastic-newsletter-coupon ~1.0.5
Further instructions
Refresh your caches
Add a simple product to the magento catalog with the sku Simple1, give it qty and assign it to a category, verify that it appears on the frontend
Navigate to MARKETING > Communications > Email Templates
Add New Template
Load Template : Choose (under Magento_Newsletter) Subscription Success (or choose existing Subscription Success email), and click Load Template
Add this line to the template anywhere:
<a href='{{config path="web/unsecure/base_url"}}addpromo'>Click here to save 15% on ProductName<a/>
It just needs to link to the controller, the coupon code is already stashed in the customer session.
Change product name to match yours (in the code the sku being used is simple1).
TODO:
Make the sku able to be chosen in admin