Module of Magento 2. You can add subscribers to a MailChimp email list, a send campaings for email to people in the list. For example create in your store a list of clients to send promotions.
You need change the API_KEY, ID_LIST_MAILCHIMP(Info) and SERVER that MailChimp provide you. You can get more info in their official documentation.
- API_KEY: Model/View/Request.php #L21
protected $KEY = "<KEY_MAILCHIMP>";
// After - example
protected $KEY = "459d667871186d19bd0322c35623178d-us20";
- ID_LIST_MAILCHIMP: Controller/View/Add.php #L52
$response = $this->_requestManager->addSubscriberList(json_encode($params), '<ID_LIST_MAILCHIMP>');
// After - example
$response = $this->_requestManager->addSubscriberList(json_encode($params), '33fd85651a');
- SERVER: Model/View/Request.php #L27
protected $URL = "https://<SERVER>.api.mailchimp.com/3.0/lists/";
// After - example
protected $URL = "https://us20.api.mailchimp.com/3.0/lists/";
Practice about development of a module from scratch. Probably the code and some practices aren't the corrects, but I excuse me, I'm process of learning, also Magento 2 have a large curve of learning and I don't know all standars of development in this great framework , so, I includeds a few common tasks
In the process of development this module I learned;
- Workflow of modules in Magento 2.
- Structure of folders.
- Add custom routes in a module.
- Add custom JS in a module.
- Add custom CSS in a module.
- Create an API call, Mailchimp in this case.
Sorry for the redaction, I'm trying to improve my english. So, is now or never.