<!-- TITLE: Newsletter Widget - Magento 2 module documentation -->
<!-- SUBTITLE: Author: Jakub Szczubełek -->
# Newsletter Widget Module
## Module overview
The module allows you to display a pop-up that will allow customers to subscribe tothe Newsletter via their email address. In the confirmation email you can send a unique code with a discount.
## Module compatibility
This module is compatibile with Magento Community versions: **2.3**.
## How it works
After installing the module, go to the Admin Panel in **Stores > Settings >Configuration > Aurora > Newsletter popup** it is possible to configure the module
![Newsletter Widget 1](/uploads/newsletter-widget/newsletter-widget-1.png "Newsletter Widget 1")
**Enable Newsletter Popup** - Enable / disable Newsletter Popup.
**Newsletter Popup Delay** - Time in seconds after which Popup Newsletter is to bedisplayed.
**Default Coupon Rule** - Contains Cart price rule with automatically generated coupons.
**Coupon Block** - The included code allows you to place a coupon code in an email(remember to replace 'ruleId' with the correct identifier of the rule).
To create a new price rule, in **Marketing > Cart Price Rules** click ‘**Add New Rule**’
![Newsletter Widget 2](/uploads/newsletter-widget/newsletter-widget-2.png "Newsletter Widget 2")
On the rule creation page, complete all necessary information, remember to check theoption: **Coupon** on **Specific Coupon** and the **Use Auto Generation** checkbox
![Newsletter Widget 3](/uploads/newsletter-widget/newsletter-widget-3.png "Newsletter Widget 3")
To create a new price rule, in **Marketing > Cart Price Rules** click ‘**Add New Rule**’. On the rule creation page, complete all necessary information, remember to check theoption: **Coupon** on **Specific Coupon** and the **Use Auto Generation** checkbox, If everything is configured correctly, the generated promotional codes should be displayed atthe bottom of the page.
![Newsletter Widget 4](/uploads/newsletter-widget/newsletter-widget-4.png "Newsletter Widget 4")
For codes to be sent to subscribers in e-mails, the code from **Coupon Block** should beprovided to the template responsible for confirming the subscription.
![Newsletter Widget 5](/uploads/newsletter-widget/newsletter-widget-5.png "Newsletter Widget 5")
Popup view
![Newsletter Widget 6](/uploads/newsletter-widget/newsletter-widget-6.png "Newsletter Widget 6")
## Demo
demo1.magecreation.com
## Installation
### Composer
1. Add repo to composer.json:
```text
"repositories": [
...
{
"type": "vcs",
"url": "git@git.auroracreation.com:magento2/newsletter-widget.git"
}
...
],
```
2. Add package to composer.json:
```text
"require": {
...
"aurora/newsletter-widget": "*"
...
},
```
3. In Magento root folder run commands:
```text
composer update aurora/newsletter-widget
php bin/magento module:enable Aurora_Newsletter
php bin/magento setup:upgrade
```
### Manual
1. Unzip archive.
2. Upload extension files on your server to:
```text
{Magento root}
└── app/
└── code
```
3. In Magento root folder run commands:
```text
php bin/magento module:enable Aurora_Newsletter
php bin/magento setup:upgrade
```
### Thank you for your interest in our products!
## Changelog
### v1.0
- Updated Readme
### v1.1
- Enabled module on magento/module-newsletter ^100.2.0
- Removed php version constraint
### v1.2
- Updated module version
### v1.2.1
- Added copyrights
### v1.2.2
- Updated module version
### v1.2.3
- Enabled module on Magento 2.3
- Updated copyrights
### v1.3.0
- Added gitlabci
- Improved PHPDocs
### v1.3.1
- Improved Readme
### v1.3.2
- Improved gitlabci
### v1.4.1
- Added UnitTests
### v1.4.2
- Added styles
- Improved modal title
- Removed modal cancel button from js
### v1.4.3
- Improved styles
### v1.4.4
- Improved styles
### v1.4.5
- Improved styles
### v1.4.6
- Improved styles
- Added subscribe template
### v1.4.7
- Added newsletter popup as widget
- Widget title is get from cupon code description
### v1.4.8
- Added styles: modal slide
### v1.4.9
- Updated version
### v1.4.10
- Updated copyrights
- Added acl
- Added strict_types
- Added type hints
- Improved PHPDocs
- Improved PSR
### v1.4.11
- Fixed error - cupon code not exist
### v1.4.12
- Improved PSR
### v1.5.0
- Fix code syntex with standards
- Add extra unit tests
### v1.5.1
- Added functionality - confirmation of subscription without reloading the page
- Adding tests to the new functionality
- Added translations
- Improved PSR and copyrights