Full Code of mailchimp/mc-magento2 for AI

develop-2.3 b510447126bf cached
230 files
915.5 KB
223.4k tokens
759 symbols
1 requests
Download .txt
Showing preview only (983K chars total). Download the full file or copy to clipboard to get everything.
Repository: mailchimp/mc-magento2
Branch: develop-2.3
Commit: b510447126bf
Files: 230
Total size: 915.5 KB

Directory structure:
gitextract_1npkxmtb/

├── Block/
│   ├── Adminhtml/
│   │   ├── Customer/
│   │   │   └── Edit/
│   │   │       └── Tabs/
│   │   │           ├── Mailchimp.php
│   │   │           └── View/
│   │   │               └── Customer.php
│   │   ├── Stores/
│   │   │   ├── Edit/
│   │   │   │   ├── Form.php
│   │   │   │   ├── Tab/
│   │   │   │   │   ├── Address.php
│   │   │   │   │   └── Info.php
│   │   │   │   └── Tabs.php
│   │   │   └── Edit.php
│   │   └── System/
│   │       └── Config/
│   │           ├── Account.php
│   │           ├── CreateAbandonedCart.php
│   │           ├── CreateWebhook.php
│   │           ├── Date.php
│   │           ├── DeleteStore.php
│   │           ├── Fieldset/
│   │           │   └── Hint.php
│   │           ├── FixMailchimpJS.php
│   │           ├── Form/
│   │           │   └── Field/
│   │           │       ├── CustomerMap.php
│   │           │       ├── MailchimpMap.php
│   │           │       └── VarsMap.php
│   │           ├── OauthWizard.php
│   │           ├── ResetErrors.php
│   │           ├── ResetErrorsNoRetry.php
│   │           ├── ResetStore.php
│   │           ├── ResyncProducts.php
│   │           └── ResyncSubscriber.php
│   ├── Catcher.php
│   ├── Checkout/
│   │   └── Success.php
│   ├── Loadquote.php
│   ├── Mailchimpjs.php
│   ├── Newsletter.php
│   └── Subscribe.php
├── CHANGELOG.md
├── CONTRIBUTING.md
├── Controller/
│   ├── Adminhtml/
│   │   ├── Batch/
│   │   │   ├── GetResponse.php
│   │   │   └── Index.php
│   │   ├── Carts/
│   │   │   └── Index.php
│   │   ├── Cron/
│   │   │   └── Index.php
│   │   ├── Ecommerce/
│   │   │   ├── CreateWebhook.php
│   │   │   ├── DeleteStore.php
│   │   │   ├── FixMailchimpJS.php
│   │   │   ├── GetInterest.php
│   │   │   ├── Getaccountdetails.php
│   │   │   ├── Register.php
│   │   │   ├── ResetLocalErrors.php
│   │   │   ├── ResetLocalErrorsNoRetry.php
│   │   │   ├── ResetStore.php
│   │   │   ├── ResyncProducts.php
│   │   │   ├── ResyncSubscribers.php
│   │   │   └── SyncLog.php
│   │   ├── Errors/
│   │   │   ├── Getresponse.php
│   │   │   └── Index.php
│   │   ├── Lists/
│   │   │   └── Get.php
│   │   ├── Orders/
│   │   │   ├── Campaign.php
│   │   │   └── Member.php
│   │   ├── Stores/
│   │   │   ├── Delete.php
│   │   │   ├── Edit.php
│   │   │   ├── Get.php
│   │   │   ├── Index.php
│   │   │   └── Save.php
│   │   └── Stores.php
│   ├── Campaign/
│   │   └── Check.php
│   ├── Cart/
│   │   └── Loadquote.php
│   ├── Checkout/
│   │   └── Success.php
│   └── WebHook/
│       └── Index.php
├── Cron/
│   ├── BatchesClean.php
│   ├── Ecommerce.php
│   ├── ErrorsClean.php
│   ├── GenerateStatistics.php
│   ├── SyncStatistics.php
│   ├── Webhook.php
│   └── WebhookClean.php
├── Helper/
│   ├── Data.php
│   ├── Http.php
│   ├── Sync.php
│   └── VarsMap.php
├── ISSUE_TEMPLATE.md
├── LICENSE.txt
├── Model/
│   ├── Api/
│   │   ├── Cart.php
│   │   ├── Customer.php
│   │   ├── Order.php
│   │   ├── Product.php
│   │   ├── PromoCodes.php
│   │   ├── PromoRules.php
│   │   ├── Result.php
│   │   └── Subscriber.php
│   ├── Config/
│   │   ├── Backend/
│   │   │   ├── ApiKey.php
│   │   │   ├── MonkeyList.php
│   │   │   ├── MonkeyStore.php
│   │   │   └── VarsMap.php
│   │   ├── ModuleVersion.php
│   │   └── Source/
│   │       ├── ApiKey.php
│   │       ├── CampaignAction.php
│   │       ├── CleanPeriod.php
│   │       ├── Cmspage.php
│   │       ├── Details.php
│   │       ├── Interest.php
│   │       ├── MonkeyList.php
│   │       ├── MonkeyStore.php
│   │       ├── Months.php
│   │       ├── Timeout.php
│   │       └── WebhookDelete.php
│   ├── HTTP/
│   │   └── Client/
│   │       └── Curl.php
│   ├── Logger/
│   │   ├── Handler.php
│   │   └── Logger.php
│   ├── MailChimpErrors.php
│   ├── MailChimpInterestGroup.php
│   ├── MailChimpStores.php
│   ├── MailChimpSyncBatches.php
│   ├── MailChimpSyncEcommerce.php
│   ├── MailChimpSyncEcommerceFactory.php
│   ├── MailChimpWebhookRequest.php
│   ├── MailchimpNotification.php
│   ├── Plugin/
│   │   ├── AccountManagement.php
│   │   ├── Coupon.php
│   │   ├── Creditmemo.php
│   │   ├── Invoice.php
│   │   ├── Newsletter/
│   │   │   └── Save.php
│   │   ├── Quote.php
│   │   ├── Ship.php
│   │   └── Subscriber.php
│   └── ResourceModel/
│       ├── Carts/
│       │   └── Collection.php
│       ├── MailChimpErrors.php
│       ├── MailChimpInterestGroup/
│       │   └── Collection.php
│       ├── MailChimpInterestGroup.php
│       ├── MailChimpStores/
│       │   ├── Collection.php
│       │   └── Grid/
│       │       └── Collection.php
│       ├── MailChimpStores.php
│       ├── MailChimpSyncBatches/
│       │   └── Collection.php
│       ├── MailChimpSyncBatches.php
│       ├── MailChimpSyncEcommerce/
│       │   └── Collection.php
│       ├── MailChimpSyncEcommerce.php
│       ├── MailChimpWebhookRequest/
│       │   └── Collection.php
│       ├── MailChimpWebhookRequest.php
│       ├── MailchimpNotification/
│       │   └── Collection.php
│       ├── MailchimpNotification.php
│       └── Schedule/
│           └── Collection.php
├── Observer/
│   ├── Adminhtml/
│   │   ├── Customer/
│   │   │   └── SaveAfter.php
│   │   └── Product/
│   │       ├── DeleteAfter.php
│   │       ├── ImportAfter.php
│   │       └── SaveAfter.php
│   ├── ConfigObserver.php
│   ├── Customer/
│   │   └── SaveBefore.php
│   ├── Sales/
│   │   └── Order/
│   │       ├── SaveAfter.php
│   │       ├── SubmitAfter.php
│   │       └── SubmitBefore.php
│   ├── SalesRule/
│   │   └── Rule/
│   │       ├── DeleteAfter.php
│   │       └── SaveAfter.php
│   └── Subscriber/
│       └── SaveAfter.php
├── README.md
├── Setup/
│   ├── InstallData.php
│   ├── InstallSchema.php
│   ├── Uninstall.php
│   ├── UpgradeData.php
│   └── UpgradeSchema.php
├── Ui/
│   └── Component/
│       ├── Batch/
│       │   └── Grid/
│       │       └── Column/
│       │           └── Batches.php
│       ├── Carts/
│       │   └── Grid/
│       │       └── Column/
│       │           ├── Actions.php
│       │           ├── Customer.php
│       │           └── Mailchimp.php
│       ├── Errors/
│       │   └── Grid/
│       │       └── Column/
│       │           └── Batch.php
│       ├── Listing/
│       │   └── Column/
│       │       ├── Customers.php
│       │       ├── Monkey.php
│       │       └── Products.php
│       └── Stores/
│           └── Grid/
│               └── Column/
│                   └── Actions.php
├── composer.json
├── etc/
│   ├── acl.xml
│   ├── adminhtml/
│   │   ├── events.xml
│   │   ├── menu.xml
│   │   ├── routes.xml
│   │   └── system.xml
│   ├── config.xml
│   ├── cron_groups.xml
│   ├── crontab.xml
│   ├── di.xml
│   ├── events.xml
│   ├── fieldset.xml
│   ├── frontend/
│   │   ├── di.xml
│   │   ├── events.xml
│   │   └── routes.xml
│   └── module.xml
├── i18n/
│   ├── es_ES.csv
│   ├── fr_FR.csv
│   └── it_IT.csv
├── modman
├── registration.php
└── view/
    ├── adminhtml/
    │   ├── layout/
    │   │   ├── customer_index_edit.xml
    │   │   ├── default.xml
    │   │   ├── mailchimp_batch_index.xml
    │   │   ├── mailchimp_carts_index.xml
    │   │   ├── mailchimp_cron_index.xml
    │   │   ├── mailchimp_errors_index.xml
    │   │   ├── mailchimp_stores_edit.xml
    │   │   ├── mailchimp_stores_grid.xml
    │   │   └── mailchimp_stores_index.xml
    │   ├── requirejs-config.js
    │   ├── templates/
    │   │   ├── customer/
    │   │   │   └── edit/
    │   │   │       └── tabs/
    │   │   │           └── mailchimp.phtml
    │   │   ├── system/
    │   │   │   └── config/
    │   │   │       ├── create_abandonedcart_automation.phtml
    │   │   │       ├── createwebhook.phtml
    │   │   │       ├── deletestore.phtml
    │   │   │       ├── fieldset/
    │   │   │       │   └── hint.phtml
    │   │   │       ├── fixmailchimpjs.phtml
    │   │   │       ├── js.phtml
    │   │   │       ├── oauth_wizard.phtml
    │   │   │       ├── reseterrors.phtml
    │   │   │       ├── reseterrorsnoretry.phtml
    │   │   │       ├── resetstore.phtml
    │   │   │       ├── resyncproducts.phtml
    │   │   │       └── resyncsubscriber.phtml
    │   │   └── tab/
    │   │       └── view.phtml
    │   ├── ui_component/
    │   │   ├── customer_listing.xml
    │   │   ├── mailchimp_batch_grid.xml
    │   │   ├── mailchimp_carts_grid.xml
    │   │   ├── mailchimp_cron_grid.xml
    │   │   ├── mailchimp_errors_grid.xml
    │   │   ├── mailchimp_stores_grid.xml
    │   │   ├── product_listing.xml
    │   │   └── sales_order_grid.xml
    │   └── web/
    │       ├── css/
    │       │   └── styles.css
    │       └── js/
    │           ├── apikey.js
    │           ├── configapikey.js
    │           └── mailchimpconfirmation.js
    └── frontend/
        ├── layout/
        │   ├── checkout_onepage_success.xml
        │   ├── default.xml
        │   ├── mailchimp_cart_loadquote.xml
        │   └── newsletter_manage_index.xml
        ├── requirejs-config.js
        ├── templates/
        │   ├── catcher.phtml
        │   ├── checkout/
        │   │   └── order/
        │   │       └── success.phtml
        │   ├── footer.phtml
        │   ├── form/
        │   │   └── newsletter.phtml
        │   ├── loadquote.phtml
        │   └── mailchimpjs.phtml
        └── web/
            └── js/
                └── campaigncatcher.js

================================================
FILE CONTENTS
================================================

================================================
FILE: Block/Adminhtml/Customer/Edit/Tabs/Mailchimp.php
================================================
<?php
/**
 * MailChimp Magento Component
 *
 * @category Ebizmarts
 * @package MailChimp
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 11/29/17 1:55 PM
 * @file: Mailchimp.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\Customer\Edit\Tabs;

use Magento\Customer\Controller\RegistryConstants;
use Magento\Ui\Component\Layout\Tabs\TabInterface;
use Magento\Backend\Block\Widget\Form;
use Magento\Backend\Block\Widget\Form\Generic;

class Mailchimp extends \Magento\Backend\Block\Template implements TabInterface
{
    /**
     * @var \Magento\Store\Model\System\Store
     */
    protected $_systemStore;
    /**
     * @var \Magento\Framework\Registry
     */
    protected $_coreRegistry;

    /**
     * Mailchimp constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Magento\Framework\Registry $registry
     * @param \Magento\Framework\Data\FormFactory $formFactory
     * @param \Magento\Store\Model\System\Store $systemStore
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Data\FormFactory $formFactory,
        \Magento\Store\Model\System\Store $systemStore,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {
        $this->_coreRegistry = $registry;
        $this->_systemStore = $systemStore;
        parent::__construct($context, $data);
    }

    public function getCustomerId()
    {
        return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
    }

    /**
     * @return \Magento\Framework\Phrase
     */
    public function getTabLabel()
    {
        return __('MailChimp');
    }

    /**
     * @return \Magento\Framework\Phrase
     */
    public function getTabTitle()
    {
        return __('MailChimp');
    }

    /**
     * @return bool
     */
    public function canShowTab()
    {
        if ($this->getCustomerId()) {
            return true;
        }
        return false;
    }

    /**
     * @return bool
     */
    public function isHidden()
    {
        if ($this->getCustomerId()) {
            return false;
        }
        return true;
    }

    /**
     * Tab class getter
     *
     * @return string
     */
    public function getTabClass()
    {
        return '';
    }

    /**
     * Return URL link to Tab content
     *
     * @return string
     */
    public function getTabUrl()
    {
        return '';
    }

    /**
     * Tab should be loaded trough Ajax call
     *
     * @return bool
     */
    public function isAjaxLoaded()
    {
        return false;
    }
}


================================================
FILE: Block/Adminhtml/Customer/Edit/Tabs/View/Customer.php
================================================
<?php
/**
 * MailChimp Magento Component
 *
 * @category Ebizmarts
 * @package MailChimp
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 11/29/17 2:49 PM
 * @file: Customer.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\Customer\Edit\Tabs\View;

class Customer extends \Magento\Backend\Block\Template
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var \Magento\Newsletter\Model\SubscriberFactory
     */
    protected $subscriberFactory;

    /**
     * @var \Magento\Framework\Registry
     */
    protected $registry;

    /**
     * Customer constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
     * @param \Magento\Framework\Registry $registry
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
        \Magento\Framework\Registry $registry,
        array $data
    ) {
    
        parent::__construct($context, $data);
        $this->helper               = $helper;
        $this->subscriberFactory    = $subscriberFactory;
        $this->registry             = $registry;
    }

    public function getInterest()
    {
        $subscriber = $this->subscriberFactory->create();
        $customerId = $this->registry->registry(\Magento\Customer\Controller\RegistryConstants::CURRENT_CUSTOMER_ID);
        $subscriber->loadByCustomerId($customerId);
        return $this->helper->getSubscriberInterest($subscriber->getSubscriberId(), $subscriber->getStoreId());
    }
}


================================================
FILE: Block/Adminhtml/Stores/Edit/Form.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/10/17 4:04 PM
 * @file: Form.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\Stores\Edit;

use Magento\Backend\Block\Widget\Form\Generic;

class Form extends Generic
{
    protected function _prepareForm()
    {
        /** @var \Magento\Framework\Data\Form $form */
        $form = $this->_formFactory->create(
            [
                'data' => [
                    'id'    => 'edit_form',
                    'action' => $this->getData('action'),
                    'method' => 'post'
                ]
            ]
        );
        $form->setUseContainer(true);
        $this->setForm($form);

        return parent::_prepareForm();
    }
}


================================================
FILE: Block/Adminhtml/Stores/Edit/Tab/Address.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/12/17 5:07 PM
 * @file: Address.php
 */
namespace Ebizmarts\MailChimp\Block\Adminhtml\Stores\Edit\Tab;

use Magento\Backend\Block\Widget\Form\Generic;
use Magento\Backend\Block\Widget\Tab\TabInterface;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;
use Magento\Framework\Data\FormFactory;

class Address extends Generic implements TabInterface
{
    /**
     * @var \Magento\Directory\Model\Config\Source\Country
     */
    protected $_country;

    /**
     * Address constructor.
     * @param Context $context
     * @param Registry $registry
     * @param FormFactory $formFactory
     * @param \Magento\Directory\Model\Config\Source\Country $country
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Data\FormFactory $formFactory,
        \Magento\Directory\Model\Config\Source\Country $country,
        array $data = []
    ) {
    
        $this->_country = $country;
        parent::__construct($context, $registry, $formFactory, $data);
    }

    protected function _prepareForm()
    {
        $model  = $this->_coreRegistry->registry('mailchimp_stores');
        $form   = $this->_formFactory->create();
        $form->setHtmlIdPrefix('stores_');
        $form->setFieldNameSuffix('stores');
        $fieldset = $form->addFieldset(
            'base_fieldset',
            ['legend' => __('Address')]
        );
        if ($model->getId()) {
            $fieldset->addField(
                'id',
                'hidden',
                ['name' => 'id']
            );
        }
        $fieldset->addField(
            'address_address_one',
            'text',
            [
                'name'        => 'address_address_one',
                'label'    => __('Street'),
                'required'     => true
            ]
        );
        $fieldset->addField(
            'address_address_two',
            'text',
            [
                'name'        => 'address_address_two',
                'label'    => __('Street'),
                'required'     => false
            ]
        );
        $fieldset->addField(
            'address_city',
            'text',
            [
                'name'        => 'address_city',
                'label'    => __('City'),
                'required'     => true
            ]
        );
        $fieldset->addField(
            'address_postal_code',
            'text',
            [
                'name'        => 'address_postal_code',
                'label'    => __('Postal Code'),
                'required'     => false
            ]
        );
        $country = $this->_country->toOptionArray();
        $countryArray = [''=> __('Select one')];
        foreach ($country as $c) {
            $countryArray[$c['value']] = $c['label'];
        }
        $fieldset->addField(
            'address_country_code',
            'select',
            [
                'name'        => 'address_country_code',
                'label'    => __('Country'),
                'required'     => true,
                'options'   => $countryArray
            ]
        );

        $data = $model->getData();
        $form->setValues($data);
        $this->setForm($form);

        return parent::_prepareForm();
    }
    public function getTabLabel()
    {
        return __('Store Address Info');
    }
    public function getTabTitle()
    {
        return __('Store Address Info');
    }
    public function canShowTab()
    {
        return true;
    }
    public function isHidden()
    {
        return false;
    }
}


================================================
FILE: Block/Adminhtml/Stores/Edit/Tab/Info.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/12/17 11:03 AM
 * @file: Info.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\Stores\Edit\Tab;

use Magento\Backend\Block\Widget\Form\Generic;
use Magento\Backend\Block\Widget\Tab\TabInterface;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;
use Magento\Framework\Data\FormFactory;

class Info extends Generic implements TabInterface
{
    /**
     * @var \Magento\Config\Model\Config\Source\Locale\Timezone
     */
    protected $_timezone;
    /**
     * @var \Magento\Config\Model\Config\Source\Yesno
     */
    protected $_yesno;
    /**
     * @var \Magento\Config\Model\Config\Source\Locale\Currency
     */
    protected $_currency;
    /**
     * @var \Magento\Config\Model\Config\Source\Locale
     */
    protected $_locale;
    /**
     * @var \Ebizmarts\MailChimp\Model\Config\Source\ApiKey
     */
    protected $_apikey;

    /**
     * Info constructor.
     * @param Context $context
     * @param Registry $registry
     * @param FormFactory $formFactory
     * @param \Magento\Config\Model\Config\Source\Locale\Timezone $timezone
     * @param \Magento\Config\Model\Config\Source\Yesno $yesno
     * @param \Magento\Config\Model\Config\Source\Locale\Currency $currency
     * @param \Magento\Config\Model\Config\Source\Locale $locale
     * @param \Ebizmarts\MailChimp\Model\Config\Source\ApiKey $apiKey
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Data\FormFactory $formFactory,
        \Magento\Config\Model\Config\Source\Locale\Timezone $timezone,
        \Magento\Config\Model\Config\Source\Yesno $yesno,
        \Magento\Config\Model\Config\Source\Locale\Currency $currency,
        \Magento\Config\Model\Config\Source\Locale $locale,
        \Ebizmarts\MailChimp\Model\Config\Source\ApiKey $apiKey,
        array $data = []
    ) {
    
        $this->_timezone    = $timezone;
        $this->_yesno       = $yesno;
        $this->_currency    = $currency;
        $this->_locale      = $locale;
        $this->_apikey      = $apiKey;
        parent::__construct($context, $registry, $formFactory, $data);
    }

    protected function _prepareForm()
    {
        $model  = $this->_coreRegistry->registry('mailchimp_stores');
        $form   = $this->_formFactory->create();
        $form->setHtmlIdPrefix('stores_');
        $form->setFieldNameSuffix('stores');

        $fieldset = $form->addFieldset(
            'base_fieldset',
            ['legend' => __('General')]
        );
        if ($model->getId()) {
            $fieldset->addField(
                'id',
                'hidden',
                ['name' => 'id']
            );
            $fieldset->addField(
                'apikey',
                'hidden',
                ['name' => 'apikey']
            );
            $fieldset->addField(
                'storeid',
                'hidden',
                ['name' => 'storeid']
            );
        } else {
            $this->_apikey->getAllApiKeys();
            $apikey = $this->_apikey->toOptionArray();
            $apikeyArray = [];
            foreach ($apikey as $a) {
                $apikeyArray[$a['value']] = $a['label'];
            }
            $url = $this->_urlBuilder->getUrl('mailchimp/stores/getList');
            $fieldset->addField(
                'apikey',
                'select',
                [
                    'name'      => 'apikey',
                    'label'     => __('Apikey'),
                    'required'  => true,
                    'options'   => $apikeyArray,
                ]
            );
            $listArray = [''=>__('Select first an ApiKey')];
            $fieldset->addField(
                'list_id',
                'select',
                [
                    'name'      => 'list_id',
                    'label'     => __('List'),
                    'required'  => true,
                    'options'   => $listArray,
                ]
            );
        }

        $fieldset->addField(
            'name',
            'text',
            [
                'name'        => 'name',
                'label'    => __('Name'),
                'required'     => true
            ]
        );

        $fieldset->addField(
            'domain',
            'text',
            [
                'name'        => 'domain',
                'label'    => __('Domain'),
                'required'     => true
            ]
        );

        $fieldset->addField(
            'email_address',
            'text',
            [
                'name'        => 'email_address',
                'label'    => __('Email'),
                'required'     => true
            ]
        );
        $currency = $this->_currency->toOptionArray();
        $currencyArray = [''=> __('Select one')];
        foreach ($currency as $c) {
            $currencyArray[$c['value']] = $c['label'];
        }
        $fieldset->addField(
            'currency_code',
            'select',
            [
                'name'      => 'currency_code',
                'label'     => __('Currency'),
                'required'  => true,
                'options'   => $currencyArray
            ]
        );
        $locale = $this->_locale->toOptionArray();
        $localeArray = [''=> __('Select one')];
        foreach ($locale as $l) {
            $localeArray[$l['value']] = $l['label'];
        }

        $fieldset->addField(
            'primary_locale',
            'select',
            [
                'name'      => 'primary_locale',
                'label'     => __('Locale'),
                'required'  => true,
                'options'   => $localeArray
            ]
        );
        $timezone = $this->_timezone->toOptionArray();
        $timezoneArray = [''=> __('Select one')];
        foreach ($timezone as $t) {
            $timezoneArray[$t['value']] = $t['label'];
        }
        $fieldset->addField(
            'timezone',
            'select',
            [
                'name'        => 'timezone',
                'label'    => __('TimeZone'),
                'required'     => true,
                'options'   => $timezoneArray
            ]
        );
        $fieldset->addField(
            'phone',
            'text',
            [
                'name'        => 'phone',
                'label'    => __('Phone'),
                'required'     => true
            ]
        );

        $data = $model->getData();
        $form->setValues($data);
        $this->setForm($form);

        return parent::_prepareForm();
    }
    public function getTabLabel()
    {
        return __('Store Info');
    }
    public function getTabTitle()
    {
        return __('Store Info');
    }
    public function canShowTab()
    {
        return true;
    }
    public function isHidden()
    {
        return false;
    }
}


================================================
FILE: Block/Adminhtml/Stores/Edit/Tabs.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/12/17 11:01 AM
 * @file: Tabs.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\Stores\Edit;

use Magento\Backend\Block\Widget\Tabs as WidgetTabs;

class Tabs extends WidgetTabs
{
    /**
     * Class constructor
     *
     * @return void
     */
    protected function _construct()
    {
        parent::_construct();
        $this->setId('stores_edit_tabs');
        $this->setDestElementId('edit_form');
        $this->setTitle(__('Mailchimp Store Information'));
    }

    /**
     * @return $this
     */
    protected function _beforeToHtml()
    {
        $this->addTab(
            'stores_info',
            [
                'label' => __('General'),
                'title' => __('General'),
                'content' => $this->getLayout()->createBlock(
                    \Ebizmarts\MailChimp\Block\Adminhtml\Stores\Edit\Tab\Info::class
                )->toHtml(),
                'active' => true
            ]
        );
        $this->addTab(
            'stores_address',
            [
                'label' => __('Address'),
                'title' => __('Address'),
                'content' => $this->getLayout()->createBlock(
                    \Ebizmarts\MailChimp\Block\Adminhtml\Stores\Edit\Tab\Address::class
                )->toHtml(),
                'active' => false
            ]
        );

        return parent::_beforeToHtml();
    }
}


================================================
FILE: Block/Adminhtml/Stores/Edit.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/10/17 1:08 PM
 * @file: Edit.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\Stores;

use Magento\Backend\Block\Widget\Form\Container;
use Magento\Backend\Block\Widget\Context;
use Magento\Framework\Registry;

class Edit extends Container
{
    /**
     * @var Registry
     */
    protected $_coreRegistry;
    /**
     * Edit constructor.
     * @param Context $context
     * @param Registry $registry
     * @param array $data
     */
    public function __construct(
        Context $context,
        Registry $registry,
        array $data = []
    ) {
    
        $this->_coreRegistry = $registry;
        parent::__construct($context, $data);
    }
    protected function _construct()
    {
        $this->_objectId = 'id';
        $this->_controller = 'adminhtml_stores';
        $this->_blockGroup = 'Ebizmarts_MailChimp';

        parent::_construct();

        $this->buttonList->update('save', 'label', __('Save'));
        $this->buttonList->add(
            'saveandcontinue',
            [
                'label' => __('Save and Continue Edit'),
                'class' => 'save',
                'data_attribute' => [
                    'mage-init' => [
                        'button' => [
                            'event' => 'saveAndContinueEdit',
                            'target' => '#edit_form'
                        ]
                    ]
                ]
            ],
            -100
        );
        $this->buttonList->update('delete', 'label', __('Delete'));
    }

    /**
     * Retrieve text for header element depending on loaded news
     *
     * @return string
     */
    public function getHeaderText()
    {
        $storeRegistry = $this->_coreRegistry->registry('mailchimp_stores');
        if ($storeRegistry->getId()) {
            $storeTitle = $this->escapeHtml($storeRegistry->getTitle());
            return __("Edit Store '%1'", $storeTitle);
        } else {
            return __('Add Store');
        }
    }
}


================================================
FILE: Block/Adminhtml/System/Config/Account.php
================================================
<?php
/**
 * Ebizmarts_MailChimp Magento JS component
 *
 * @category    Ebizmarts
 * @package     Ebizmarts_MailChimp
 * @author      Ebizmarts Team <info@ebizmarts.com>
 * @copyright   Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class Account extends \Magento\Config\Block\System\Config\Form\Field
{
    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $values = $element->getValues();
        $html = '<div id="mailchimp_general_account_details">';
        $html .= '<ul class="checkboxes" id="mailchimp_general_account_details_ul">';
        if ($values) {
            foreach ($values as $dat) {
                if ($dat['value']!=='') {
                    $html .= "<li>{$dat['label']}: {$dat['value']}</li>";
                } else {
                    $html .= "<li>{$dat['label']}</li>";
                }
            }
        }

        $html .= '</ul>';
        $html .= '</div>';

        return $html;
    }
}


================================================
FILE: Block/Adminhtml/System/Config/CreateAbandonedCart.php
================================================
<?php
/**
 * Ebizmarts_MailChimp Magento JS component
 *
 * @category    Ebizmarts
 * @package     Ebizmarts_MailChimp
 * @author      Ebizmarts Team <info@ebizmarts.com>
 * @copyright   Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class CreateAbandonedCart extends \Magento\Config\Block\System\Config\Form\Field
{
    protected $_template    = 'system/config/create_abandonedcart_automation.phtml';

    private $_url     = "https://admin.mailchimp.com/#/create-campaign/explore/abandonedCart";

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();

        $label = $originalData['button_label'];

        $this->addData([
            'button_label' => __($label),
            'button_url'   => $this->authorizeRequestUrl(),
            'html_id' => $element->getHtmlId(),
        ]);
        return parent::_toHtml();
        ;
    }
    public function authorizeRequestUrl()
    {
        return $this->_url;
    }
}

================================================
FILE: Block/Adminhtml/System/Config/CreateWebhook.php
================================================
<?php
/**
 * Created by PhpStorm.
 * User: gonzalo
 * Date: 3/12/18
 * Time: 2:12 PM
 */
namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class CreateWebhook extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {

        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/createwebhook.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'button_url' => $this->getAjaxCheckUrl(),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }

    public function getButtonHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $label = $originalData['button_label'];
        $this->addData([
            'button_label' => __($label),
            'button_url'   => $this->getAjaxCreateWebhookUrl(),
            'html_id' => $element->getHtmlId(),
        ]);
        return $this->_toHtml();
    }
    public function getAjaxCreateWebhookUrl()
    {
        $params = $this->getRequest()->getParams();
        $scope = [];
        if (isset($params['website'])) {
            $scope = ['website'=>$params['website']];
        } elseif (isset($params['store'])) {
            $scope = ['store'=>$params['store']];
        }
        return $this->_urlBuilder->getUrl('mailchimp/ecommerce/CreateWebhook', $scope);
    }
}


================================================
FILE: Block/Adminhtml/System/Config/Date.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 9/30/16 2:38 PM
 * @file: Date.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class Date extends \Magento\Config\Block\System\Config\Form\Field
{
    public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $element->setDateFormat(\Magento\Framework\Stdlib\DateTime::DATE_INTERNAL_FORMAT);
        $element->setTimeFormat(null);
        return parent::render($element);
    }
}


================================================
FILE: Block/Adminhtml/System/Config/DeleteStore.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/20/17 3:25 PM
 * @file: ResetErrors.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class DeleteStore extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {
    
        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/deletestore.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'button_url' => $this->getAjaxCheckUrl(),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }

    public function getButtonHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $label = $originalData['button_label'];
        $this->addData([
            'button_label' => __($label),
            'button_url'   => $this->getAjaxCheckUrl(),
            'html_id' => $element->getHtmlId(),
        ]);
        return $this->_toHtml();
    }
    public function getAjaxCheckUrl()
    {
        $params = $this->getRequest()->getParams();
        $scope = [];
        if (isset($params['website'])) {
            $scope = ['website'=>$params['website']];
        } elseif (isset($params['store'])) {
            $scope = ['store'=>$params['store']];
        }
        return $this->_urlBuilder->getUrl('mailchimp/ecommerce/DeleteStore', $scope);
    }
}


================================================
FILE: Block/Adminhtml/System/Config/Fieldset/Hint.php
================================================
<?php
/**
 * Ebizmarts_MailChimp Magento JS component
 *
 * @category    Ebizmarts
 * @package     Ebizmarts_MailChimp
 * @author      Ebizmarts Team <info@ebizmarts.com>
 * @copyright   Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Fieldset;

class Hint extends \Magento\Backend\Block\Template implements
    \Magento\Framework\Data\Form\Element\Renderer\RendererInterface
{
    /**
     * @var string
     */
    protected $_template = 'Ebizmarts_MailChimp::system/config/fieldset/hint.phtml';
    /**
     * @var \Magento\Framework\App\ProductMetadataInterface
     */
    private $_metaData;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;
    /**
     * @var \Magento\Backend\Block\Template\Context
     */
    private $_context;
    /**
     * @var \Ebizmarts\MailChimp\Model\Config\ModuleVersion
     */
    private $_moduleVersion;

    /**
     * Hint constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Magento\Framework\App\ProductMetadataInterface $productMetaData
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Ebizmarts\MailChimp\Model\Config\ModuleVersion $moduleVersion
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\App\ProductMetadataInterface $productMetaData,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Ebizmarts\MailChimp\Model\Config\ModuleVersion $moduleVersion,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->_metaData = $productMetaData;
        $this->_helper = $helper;
        $this->_moduleVersion   = $moduleVersion;
        $this->_context = $context;
    }
    /**
     * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
     * @return mixed
     */
    public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        return $this->toHtml();
    }

    public function getModuleVersion()
    {
        return $this->_moduleVersion->getModuleVersion('Ebizmarts_MailChimp');
    }
    public function getHasApiKey()
    {
        $apikey = $this->_helper->getApiKey($this->_context->getStoreManager()->getStore()->getId());
        if ($apikey) {
            return true;
        } else {
            return false;
        }
    }
    public function getScope()
    {
        $params = $this->getRequest()->getParams();
        $scope = 'default';
        if (isset($params['website'])) {
            $scope = 'website';
        } elseif (isset($params['store'])) {
            $scope = 'store';
        }
        return $scope;
    }
    public function getScopeId()
    {
        $params = $this->getRequest()->getParams();
        $scopeId = 0;
        if (isset($params['website'])) {
            $scopeId = $params['website'];
        } elseif (isset($params['store'])) {
            $scopeId = $params['store'];
        }
        return $scopeId;
    }
    public function getRegisterToken()
    {
        $scopeId = $this->getScopeId();
        $scope = $this->getScope();
        $token = $this->_helper->getConfigValue(\Ebizmarts\MailChimp\Helper\Data::XML_STATISTICS_TOKEN, $scopeId, $scope);
        return $token;
    }
}


================================================
FILE: Block/Adminhtml/System/Config/FixMailchimpJS.php
================================================
<?php
/**
 * Created by PhpStorm.
 * User: gonzalo
 * Date: 3/12/18
 * Time: 2:12 PM
 */
namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class FixMailchimpJS extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {

        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/fixmailchimpjs.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }
}


================================================
FILE: Block/Adminhtml/System/Config/Form/Field/CustomerMap.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 10/27/17 12:01 PM
 * @file: CustomerMap.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field;

class CustomerMap extends \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray
{
    /**
     * @var VarsMap
     */
    protected $_varsRenderer=null;
    protected $_mailchimpRenderer=null;

    protected function _getVarsRenderer()
    {
        if (!$this->_varsRenderer) {
            $this->_varsRenderer = $this->getLayout()->createBlock(
                \Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field\VarsMap::class,
                '',
                ['data' => ['is_render_to_js_template' => true]]
            );
            $this->_varsRenderer->setClass('customer_field_select');
        }
        return $this->_varsRenderer;
    }
    protected function _getMailchimpRenderer()
    {
        if (!$this->_mailchimpRenderer) {
            $this->_mailchimpRenderer = $this->getLayout()->createBlock(
                \Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field\MailchimpMap::class,
                '',
                ['data' => ['is_render_to_js_template' => true]]
            );
            $this->_mailchimpRenderer->setClass('mailchimp_field_select');
        }
        return $this->_mailchimpRenderer;
    }

    protected function _prepareToRender()
    {
//        $this->addColumn('mailchimp', ['label' => __('Mailchimp')]);
        $this->addColumn(
            'mailchimp_field_id',
            ['label' => __('Mailchimp'), 'renderer' => $this->_getMailchimpRenderer()]
        );
        $this->addColumn(
            'customer_field_id',
            ['label' => __('Magento'), 'renderer' => $this->_getVarsRenderer()]
        );
        $this->_addAfter = false;
        $this->_addButtonLabel = __('Add');
    }
    protected function _prepareArrayRow(\Magento\Framework\DataObject $row)
    {
        $optionExtraAttr = [];
        $optionExtraAttr['option_' . $this->_getVarsRenderer()->calcOptionHash($row->getData('customer_field_id'))] =
            'selected="selected"';
        $optionExtraAttr['option_' . $this->_getMailchimpRenderer()->calcOptionHash(
            $row->getData('mailchimp_field_id')
        )
        ] =
            'selected="selected"';
        $row->setData(
            'option_extra_attrs',
            $optionExtraAttr
        );
    }
}


================================================
FILE: Block/Adminhtml/System/Config/Form/Field/MailchimpMap.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 10/9/18 1:17 PM
 * @file: MailchimpMap.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field;

class MailchimpMap extends \Magento\Framework\View\Element\Html\Select
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;
    /**
     * @var \Magento\Framework\App\RequestInterface
     */
    protected $_request;

    /**
     * MailchimpMap constructor.
     * @param \Magento\Framework\View\Element\Context $context
     * @param \Magento\Store\Model\StoreManagerInterface $storeManager
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Context $context,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {

        parent::__construct($context, $data);
        $this->_helper          = $helper;
        $this->_storeManager    = $storeManager;
        $this->_request         = $context->getRequest();
    }

    protected function _getMailchimpTags()
    {
        $ret = [];
        $storeId = (int) $this->_request->getParam("store", 0);
        if ($this->_request->getParam('website', 0)) {
            $scope = 'website';
            $storeId = $this->_request->getParam('website', 0);
        } elseif ($this->_request->getParam('store', 0)) {
            $scope = 'stores';
            $storeId = $this->_request->getParam('store', 0);
        } else {
            $scope = 'default';
        }

        $api = $this->_helper->getApi($storeId, $scope);
        try {
            $merge = $api->lists->mergeFields->getAll(
                $this->_helper->getConfigValue(
                    \Ebizmarts\MailChimp\Helper\Data::XML_PATH_LIST,
                    $storeId,
                    $scope
                ),
                null,
                null,
                \Ebizmarts\MailChimp\Helper\Data::MAX_MERGEFIELDS
            );
            if (is_array($merge) && key_exists('merge_fields', $merge)) {
                foreach ($merge['merge_fields'] as $item) {
                    $ret[$item['tag']] = $item['tag'] . ' (' . $item['name'] . ' : ' . $item['type'] . ')';
                }
            }
        } catch (\Mailchimp_Error | \Mailchimp_HttpError $e) {
            $this->_helper->log($e->getFriendlyMessage());
        }
        return $ret;
    }
    public function setInputName($value)
    {
        return $this->setName($value);
    }

    /**
     * Render block HTML
     *
     * @return string
     */
    public function _toHtml()
    {
        if (!$this->getOptions()) {
            foreach ($this->_getMailchimpTags() as $attId => $attLabel) {
                $this->addOption($attId, $this->escapeHtmlAttr($attLabel));
            }
        }
        return parent::_toHtml();
    }
}


================================================
FILE: Block/Adminhtml/System/Config/Form/Field/VarsMap.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 10/27/17 3:41 PM
 * @file: VarsMap.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field;

class VarsMap extends \Magento\Framework\View\Element\Html\Select
{
    /**
     * @var \Magento\Customer\Model\ResourceModel\Attribute\CollectionFactory
     */
    private $_attCollection;
    /**
     * VarsMap constructor.
     * @param \Magento\Framework\View\Element\Context $context
     * @param \Magento\Customer\Model\ResourceModel\Attribute\CollectionFactory $attCollection
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Context $context,
        \Magento\Customer\Model\ResourceModel\Attribute\CollectionFactory $attCollection,
        array $data = []
    ) {

        parent::__construct($context, $data);
        $this->_attCollection = $attCollection;
    }
    protected function _getAddressAtt()
    {
        $ret = [];
        $ret['default_shipping##zip']     = __('Shipping Zip Code');
        $ret['default_shipping##country'] = __('Shipping Country');
        $ret['default_shipping##city']    = __('Shipping City');
        $ret['default_shipping##state']   = __('Shipping State');
        $ret['default_shipping##telephone']   = __('Shipping Telephone');
        $ret['default_shipping##company']   = __('Shipping Company');
        $ret['default_shipping##street']   = __('Shipping Street');

        $ret['default_billing##zip']      = __('Billing Zip Code');
        $ret['default_billing##country']  = __('Billing Country');
        $ret['default_billing##city']     = __('Billing City');
        $ret['default_billing##state']    = __('Billing State');
        $ret['default_billing##telephone']   = __('Billing Telephone');
        $ret['default_billing##company']   = __('Billing Company');
        $ret['default_billing##street']   = __('Billing Street');

        return $ret;
    }

    protected function _getBindableAttributes()
    {
        $systemAtt = $this->_getCustomerAtt();
        $extraAtt = $this->_getAddressAtt();

        // Note: We cannot use array_merge here because we need to hold
        // numeric indexes as they are
        $ret = $systemAtt + $extraAtt;

        natsort($ret);
        return $ret;
    }

    protected function _getCustomerAtt()
    {
        $ret = [];
        $collection = $this->_attCollection->create();
        /**
         * @var $item \Magento\Customer\Model\Attribute
         */
        foreach ($collection as $item) {
            $ret[$item->getId()] = $item->getFrontendLabel();
        }

        natsort($ret);
        return $ret;
    }

    public function setInputName($value)
    {
        return $this->setName($value);
    }

    /**
     * Render block HTML
     *
     * @return string
     */
    public function _toHtml()
    {
        if (!$this->getOptions()) {
            foreach ($this->_getBindableAttributes() as $attId => $attLabel) {
                $this->addOption($attId, $this->escapeHtmlAttr($attLabel));
            }
        }
        return parent::_toHtml();
    }
}


================================================
FILE: Block/Adminhtml/System/Config/OauthWizard.php
================================================
<?php
/**
 * Ebizmarts_MailChimp Magento JS component
 *
 * @category    Ebizmarts
 * @package     Ebizmarts_MailChimp
 * @author      Ebizmarts Team <info@ebizmarts.com>
 * @copyright   Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class OauthWizard extends \Magento\Config\Block\System\Config\Form\Field
{
    protected $_template    = 'system/config/oauth_wizard.phtml';

    private $_authorizeUri     = "https://login.mailchimp.com/oauth2/authorize";
    private $_accessTokenUri   = "https://login.mailchimp.com/oauth2/token";
    private $_redirectUri      = "https://ebizmarts.com/magento/mc-magento2/oauth2/complete.php";
    private $_clientId         = 390007044048;

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();

        $label = $originalData['button_label'];

        $this->addData([
            'button_label' => __($label),
            'button_url'   => $this->authorizeRequestUrl(),
            'html_id' => $element->getHtmlId(),
        ]);
        return parent::_toHtml();
        ;
    }
    public function authorizeRequestUrl()
    {

        $url = $this->_authorizeUri;
        $redirectUri = urlencode($this->_redirectUri);

        return "{$url}?redirect_uri={$redirectUri}&response_type=code&client_id={$this->_clientId}";
    }
}


================================================
FILE: Block/Adminhtml/System/Config/ResetErrors.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/20/17 3:25 PM
 * @file: ResetErrors.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class ResetErrors extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {
    
        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/reseterrors.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'button_url' => $this->getAjaxCheckUrl(),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }

    public function getButtonHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $label = $originalData['button_label'];
        $this->addData([
            'button_label' => __($label),
            'button_url'   => $this->getAjaxCheckUrl(),
            'html_id' => $element->getHtmlId(),
        ]);
        return $this->_toHtml();
    }
    public function getAjaxCheckUrl()
    {
        $params = $this->getRequest()->getParams();
        $scope = [];
        if (isset($params['website'])) {
            $scope = ['website'=>$params['website']];
        } elseif (isset($params['store'])) {
            $scope = ['store'=>$params['store']];
        }
        return $this->_urlBuilder->getUrl('mailchimp/ecommerce/ResetLocalErrors', $scope);
    }
}


================================================
FILE: Block/Adminhtml/System/Config/ResetErrorsNoRetry.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/20/17 3:25 PM
 * @file: ResetErrors.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class ResetErrorsNoRetry extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {
    
        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/reseterrorsnoretry.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'button_url' => $this->getAjaxCheckUrl(),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }

    public function getButtonHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $label = $originalData['button_label'];
        $this->addData([
            'button_label' => __($label),
            'button_url'   => $this->getAjaxCheckUrl(),
            'html_id' => $element->getHtmlId(),
        ]);
        return $this->_toHtml();
    }
    public function getAjaxCheckUrl()
    {
        $params = $this->getRequest()->getParams();
        $scope = [];
        if (isset($params['website'])) {
            $scope = ['website'=>$params['website']];
        } elseif (isset($params['store'])) {
            $scope = ['store'=>$params['store']];
        }
        return $this->_urlBuilder->getUrl('mailchimp/ecommerce/ResetLocalErrorsNoRetry', $scope);
    }
}


================================================
FILE: Block/Adminhtml/System/Config/ResetStore.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/20/17 3:25 PM
 * @file: ResetErrors.php
 */

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class ResetStore extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {
    
        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/resetstore.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'button_url' => $this->getAjaxCheckUrl(),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }

    public function getButtonHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $label = $originalData['button_label'];
        $this->addData([
            'button_label' => __($label),
            'button_url'   => $this->getAjaxCheckUrl(),
            'html_id' => $element->getHtmlId(),
        ]);
        return $this->_toHtml();
    }
    public function getAjaxCheckUrl()
    {
        $params = $this->getRequest()->getParams();
        $scope = [];
        if (isset($params['website'])) {
            $scope = ['website'=>$params['website']];
        } elseif (isset($params['store'])) {
            $scope = ['store'=>$params['store']];
        }
        return $this->_urlBuilder->getUrl('mailchimp/ecommerce/ResetStore', $scope);
    }
}


================================================
FILE: Block/Adminhtml/System/Config/ResyncProducts.php
================================================
<?php
/**
 * Created by PhpStorm.
 * User: gonzalo
 * Date: 3/12/18
 * Time: 2:12 PM
 */
namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class ResyncProducts extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {

        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/resyncproducts.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }
}


================================================
FILE: Block/Adminhtml/System/Config/ResyncSubscriber.php
================================================
<?php
/**
 * Created by PhpStorm.
 * User: gonzalo
 * Date: 3/12/18
 * Time: 2:12 PM
 */
namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class ResyncSubscriber extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $_helper;

    /**
     * ResetErrors constructor.
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data = []
    ) {

        $this->_helper = $helper;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('system/config/resyncsubscriber.phtml');
    }

    protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $originalData = $element->getOriginalData();
        $this->addData(
            [
                'button_label' => __($originalData['button_label']),
                'html_id' => $element->getHtmlId(),
            ]
        );
        return $this->_toHtml();
    }
}


================================================
FILE: Block/Catcher.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/25/17 3:35 PM
 * @file: Catcher.php
 */
namespace Ebizmarts\MailChimp\Block;

use Magento\Framework\View\Element\Template;

class Catcher extends Template
{
    /**
     * @var string $_template
     */
    protected $_template = "catcher.phtml";

    // write your methods here...
}


================================================
FILE: Block/Checkout/Success.php
================================================
<?php
/**
 * MailChimp Magento Component
 *
 * @category Ebizmarts
 * @package MailChimp
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 11/13/17 4:41 PM
 * @file: Success.php
 */
namespace Ebizmarts\MailChimp\Block\Checkout;

class Success extends \Magento\Framework\View\Element\Template
{
    /**
     * @var \Magento\Checkout\Model\Session
     */
    protected $_checkoutSession;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;
    /**
     * @var \Magento\Newsletter\Model\SubscriberFactory
     */
    protected $_subscriberFactory;
    /**
     * @var \Ebizmarts\MailChimp\Model\MailChimpInterestGroupFactory
     */
    protected $_interestGroupFactory;
    /**
     * @var \Magento\Framework\View\Element\Template\Context
     */
    protected $_context;

    /**
     * Success constructor.
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Magento\Checkout\Model\Session $checkoutSession
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
     * @param \Ebizmarts\MailChimp\Model\MailChimpInterestGroupFactory $interestGroupFactory
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
        \Ebizmarts\MailChimp\Model\MailChimpInterestGroupFactory $interestGroupFactory,
        array $data
    ) {
    
        parent::__construct($context, $data);
        $this->_checkoutSession     = $checkoutSession;
        $this->_helper              = $helper;
        $this->_subscriberFactory   = $subscriberFactory;
        $this->_interestGroupFactory= $interestGroupFactory;
        $this->_context             = $context;
    }

    public function getInterest()
    {
        $order = $this->_checkoutSession->getLastRealOrder();
        /**
         * @var $subscriber \Magento\Newsletter\Model\Subscriber
         */
        $subscriber = $this->_subscriberFactory->create();
        $subscriber->loadByEmail($order->getCustomerEmail());

        return $this->_helper->getSubscriberInterest($subscriber->getSubscriberId(), $subscriber->getStoreId());
    }
    protected function getValues($category)
    {
        $rc =[];
        foreach ($category as $c) {
            $rc[] = ['value'=>$c['id'],'label'=>$c['name']];
        }
        return $rc;
    }
    public function getMessageBefore()
    {
        return $this->_helper->getConfigValue(\Ebizmarts\MailChimp\Helper\Data::XML_INTEREST_SUCCESS_HTML_BEFORE);
    }
    public function getMessageAfter()
    {
        return $this->_helper->getConfigValue(\Ebizmarts\MailChimp\Helper\Data::XML_INTEREST_SUCCESS_HTML_AFTER);
    }
    public function getFormUrl()
    {
        $order = $this->_checkoutSession->getLastRealOrder();
        return $this->_helper->getSuccessInterestUrl($order->getStoreId());
    }
    public function _toHtml()
    {
        if (!$this->_helper->isMailChimpEnabled($this->_context->getStoreManager()->getStore()->getId())) {
            return "";
        }
        return parent::_toHtml();
    }
}


================================================
FILE: Block/Loadquote.php
================================================
<?php
/**
 * Loadquote
 *
 * @copyright Copyright © 2017 Ebizmarts Corp.. All rights reserved.
 * @author    info@ebizmarts.com
 */

namespace Ebizmarts\MailChimp\Block;

use Magento\Framework\View\Element\Template;

class Loadquote extends Template
{
    /**
     * @var string $_template
     */
    protected $_template = "loadquote.phtml";

    // write your methods here...
}


================================================
FILE: Block/Mailchimpjs.php
================================================
<?php
/**
 * MailChimp Magento Component
 *
 * @category Ebizmarts
 * @package MailChimp
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 5/8/17 12:00 PM
 * @file: Mailchimpjs.php
 */

namespace Ebizmarts\MailChimp\Block;

use Magento\Store\Model\ScopeInterface;

class Mailchimpjs extends \Magento\Framework\View\Element\Template
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;

    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;

    /**
     * Mailchimpjs constructor.
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data
    ) {
        parent::__construct($context, $data);
        $this->_helper          = $helper;
        $this->_storeManager    = $context->getStoreManager();
    }

    public function getJsUrl()
    {
        $storeId = $this->_storeManager->getStore()->getId();

        $url = $this->_scopeConfig->getValue(
            \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_JS_URL, ScopeInterface::SCOPE_STORES,
            $storeId
        );
        $active = $this->_scopeConfig->getValue(
            \Ebizmarts\MailChimp\Helper\Data::XML_PATH_ACTIVE, ScopeInterface::SCOPE_STORES,
            $storeId
        );

        // if we have URL cached or integration is disabled
        // then avoid initialization of Mailchimp Helper and all linked classes (~30 classes)
        if ($active && !$url) {
            $url = $this->_helper->getJsUrl($storeId);
        }

        return $url;
    }
}


================================================
FILE: Block/Newsletter.php
================================================
<?php
/**
 * MailChimp Magento Component
 *
 * @category Ebizmarts
 * @package MailChimp
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 11/23/17 4:40 PM
 * @file: Newsletter.php
 */

namespace Ebizmarts\MailChimp\Block;

class Newsletter extends \Magento\Framework\View\Element\Template
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;
    /**
     * @var \Magento\Newsletter\Model\SubscriberFactory
     */
    protected $subscriberFactory;
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $customerSession;

    /**
     * Newsletter constructor.
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Magento\Customer\Model\Session $customerSession
     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        array $data
    ) {
    
        parent::__construct($context, $data);
        $this->_helper  = $helper;
        $this->subscriberFactory = $subscriberFactory;
        $this->customerSession = $customerSession;
    }

    public function getInterest()
    {
        $subscriber = $this->subscriberFactory->create();
        $subscriber->loadByCustomerId($this->customerSession->getCustomerId());
//        $subscriber = $this->getSubscriptionObject();
        return $this->_helper->getSubscriberInterest($subscriber->getSubscriberId(), $subscriber->getStoreId());
    }
    public function getFormUrl()
    {
        return  $this->getUrl('mailchimp/accountmanage/save');
    }
}


================================================
FILE: Block/Subscribe.php
================================================
<?php

namespace Ebizmarts\MailChimp\Block;

use Magento\Framework\View\Element\Template;
use \Ebizmarts\MailChimp\Helper\Data as MailchimpHelper;

class Subscribe extends \Magento\Newsletter\Block\Subscribe
{
    /**
     * @var Template\Context
     */
    protected $context;
    /**
     * @var MailchimpHelper
     */
    protected $helper;

    /**
     * @param Template\Context $context
     * @param MailchimpHelper $helper
     * @param array $data
     */
    public function __construct(
        Template\Context $context,
        MailchimpHelper $helper,
        array $data = []
    )
    {
        parent::__construct($context, $data);
        $this->context = $context;
        $this->helper = $helper;
    }

    public function getPopupUrl()
    {

        $storeId = $this->context->getStoreManager()->getStore()->getId();
        return $this->helper->getConfigValue(MailchimpHelper::XML_POPUP_URL,$storeId);
    }
}

================================================
FILE: CHANGELOG.md
================================================
# Change Log

## [102.3.78](https://github.com/mailchimp/mc-magento2/tree/102.3.78)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.77...102.3.78)

**Fixed bugs:**

- Error when delete the current mailchimp store and access the configuration [\#2268](https://github.com/mailchimp/mc-magento2/issues/2268)
- New order/cart send product as new [\#2262](https://github.com/mailchimp/mc-magento2/issues/2262)
- Products permanently stuck in SYNCERROR or NEEDTORESYNC [\#2256](https://github.com/mailchimp/mc-magento2/issues/2256)
- Array to string conversion warning [\#2250](https://github.com/mailchimp/mc-magento2/issues/2250)

## [102.3.77](https://github.com/mailchimp/mc-magento2/tree/102.3.77)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.76...102.3.77)

**Implemented enhancements:**

- Send an event every time visit an abandoned cart [\#2233](https://github.com/mailchimp/mc-magento2/issues/2233)

**Fixed bugs:**

- Ebizmarts\MailChimp\Model\Api\Product.php can break during iteration [\#2239](https://github.com/mailchimp/mc-magento2/issues/2239)
- Incorrect DATETIME value: '' [\#2227](https://github.com/mailchimp/mc-magento2/issues/2227)

## [102.3.76](https://github.com/mailchimp/mc-magento2/tree/102.3.76)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.75...102.3.76)

**Implemented enhancements:**

- Feature Request: Store customers email in logs for abandoned baskets. [\#2084](https://github.com/mailchimp/mc-magento2/issues/2084)

**Fixed bugs:**

- Error cleaning the mailchimp\_statistics table [\#2210](https://github.com/mailchimp/mc-magento2/issues/2210)

## [102.3.75](https://github.com/mailchimp/mc-magento2/tree/102.3.75)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.74...102.3.75)

**Implemented enhancements:**

- Add total amount of subscribers to the registration [\#2199](https://github.com/mailchimp/mc-magento2/issues/2199)
- Add data to the registration [\#2192](https://github.com/mailchimp/mc-magento2/issues/2192)

## [102.3.74](https://github.com/mailchimp/mc-magento2/tree/102.3.74)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.73...102.3.74)

**Implemented enhancements:**

- Add flag to sync not salable products [\#2181](https://github.com/mailchimp/mc-magento2/issues/2181)

## [102.3.73](https://github.com/mailchimp/mc-magento2/tree/102.3.73)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.72...102.3.73)

**Implemented enhancements:**

- Change the way that the statistics are synced [\#2167](https://github.com/mailchimp/mc-magento2/issues/2167)

## [102.3.72](https://github.com/mailchimp/mc-magento2/tree/102.3.72)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.71...102.3.72)

**Implemented enhancements:**

- Add support for grouped products [\#2156](https://github.com/mailchimp/mc-magento2/issues/2156)

## [102.3.71](https://github.com/mailchimp/mc-magento2/tree/102.3.71)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.70...102.3.71)

**Implemented enhancements:**

- Add the bundle product itself to the lines of the cart [\#2142](https://github.com/mailchimp/mc-magento2/issues/2142)
- Add the bundle product itself to the lines of the order [\#2136](https://github.com/mailchimp/mc-magento2/issues/2136)


## [102.3.70](https://github.com/mailchimp/mc-magento2/tree/102.3.70)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.69...102.3.70)

**Implemented enhancements:**

- Add clean period for mailchimp\_notification table [\#2118](https://github.com/mailchimp/mc-magento2/issues/2118)
- Add bundle products support [\#2112](https://github.com/mailchimp/mc-magento2/issues/2112)

**Fixed bugs:**

- Add translation for options mergevar [\#2124](https://github.com/mailchimp/mc-magento2/issues/2124)

## [102.3.69](https://github.com/mailchimp/mc-magento2/tree/HEAD)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.68...102.3.69)

**Fixed bugs:**

- Huge memory usage from ebizmarts\_generate\_statistics cron [\#2098](https://github.com/mailchimp/mc-magento2/issues/2098)

# [102.3.68](https://github.com/mailchimp/mc-magento2/tree/102.3.68)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.67...102.3.68)

**Fixed bugs:**

- SyncStatistics error when the data in mailchimp\_notification is not a valid json [\#2083](https://github.com/mailchimp/mc-magento2/issues/2083)

## [102.3.67](https://github.com/mailchimp/mc-magento2/tree/102.3.67)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.66...102.3.67)

**Fixed bugs:**

- Cron is taking long time \(special price related\) [\#2063](https://github.com/mailchimp/mc-magento2/issues/2063)
- Deprecated Warning in Order.php - Null passed to hash\(\) on orders without email \(PHP 8.3\) [\#2062](https://github.com/mailchimp/mc-magento2/issues/2062)

## [102.3.66](https://github.com/mailchimp/mc-magento2/tree/102.3.66)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.65...102.3.66)

**Implemented enhancements:**

- Include the Billing and Shipping street in the maps fields [\#2043](https://github.com/mailchimp/mc-magento2/issues/2043)
- Generate support data [\#2041](https://github.com/mailchimp/mc-magento2/issues/2041)
- Put a config to sync only customers with orders [\#2035](https://github.com/mailchimp/mc-magento2/issues/2035)

## [102.3.65](https://github.com/mailchimp/mc-magento2/tree/102.3.65)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.64...102.3.65)

**Implemented enhancements:**

- missing i18n translation [\#1983](https://github.com/mailchimp/mc-magento2/issues/1983)

**Fixed bugs:**

- Merge field value is deleted on the Magento store, but not on Mailchimp [\#1388](https://github.com/mailchimp/mc-magento2/issues/1388)
- Wrong total revenue in MailChimp [\#395](https://github.com/mailchimp/mc-magento2/issues/395)

## [102.3.64](https://github.com/mailchimp/mc-magento2/tree/102.3.64)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.63...102.3.64)

**Fixed bugs:**

- Manage deleted and not salable products [\#2003](https://github.com/mailchimp/mc-magento2/issues/2003)
- Configuration page in Magento's backend takes a long time to load in certain cases [\#2002](https://github.com/mailchimp/mc-magento2/issues/2002)

## [102.3.63](https://github.com/mailchimp/mc-magento2/tree/102.3.63)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.62...103.3.63)

**Implemented enhancements:**

- Add the date to the error grid [\#1972](https://github.com/mailchimp/mc-magento2/issues/1972)

**Fixed bugs:**

- Order status change is not synced when done through webapi [\#1985](https://github.com/mailchimp/mc-magento2/issues/1985)
- Column not found: 1054 Unknown column 'mailchimp\_sync' in 'order clause' [\#1981](https://github.com/mailchimp/mc-magento2/issues/1981)

## [102.3.62](https://github.com/mailchimp/mc-magento2/tree/102.3.62)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.61...102.3.62)

**Fixed bugs:**

- Bad financial status in mailchimp [\#1962](https://github.com/mailchimp/mc-magento2/issues/1962)


## [101.2.61](https://github.com/mailchimp/mc-magento2/tree/102.3.61)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.60...102.3.61)

**Implemented enhancements:**

- Put the inventory\_quantity = 0 when delete a product in magento [\#1945](https://github.com/mailchimp/mc-magento2/issues/1945)

**Fixed bugs:**

- Doesn't search for customer activity for modified orders [\#1951](https://github.com/mailchimp/mc-magento2/issues/1951)
- Abandoned cart button doesn't load the cart when click on it [\#1939](https://github.com/mailchimp/mc-magento2/issues/1939)

## [102.3.60](https://github.com/mailchimp/mc-magento2/tree/102.3.60)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.59...102.3.60)

**Fixed bugs:**

- The token change and can't retrieve the cart from the abandoned cart email [\#1930](https://github.com/mailchimp/mc-magento2/issues/1930)
- Abs fail when discount amount is null [\#1921](https://github.com/mailchimp/mc-magento2/issues/1921)
- Error table prefix [\#1920](https://github.com/mailchimp/mc-magento2/issues/1920)
- Check in webhook cron if the listid is OK when get the groups [\#1914](https://github.com/mailchimp/mc-magento2/issues/1914)

## [102.3.58](https://github.com/mailchimp/mc-magento2/tree/102.3.58)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.57...102.3.58)

**Implemented enhancements:**

- Add controls to the webhook cron to exclude stores with no mailchimp store [\#1880](https://github.com/mailchimp/mc-magento2/issues/1880)
- Use the activity API end point to fill the campaign id [\#1866](https://github.com/mailchimp/mc-magento2/issues/1866)

**Fixed bugs:**

- Sometimes the mailchimp\_sync\_modified and mailchimp\_sent fields in mailchimp\_sync\_ecommerce are not synchronized [\#1891](https://github.com/mailchimp/mc-magento2/issues/1891)
- SQL Error on config page right after installation [\#1865](https://github.com/mailchimp/mc-magento2/issues/1865)
- Trinidad & Tobago country incorrectly synced [\#1863](https://github.com/mailchimp/mc-magento2/issues/1863)
- Unescaped output  [\#1841](https://github.com/mailchimp/mc-magento2/issues/1841)
- Cannot save some customers [\#1840](https://github.com/mailchimp/mc-magento2/issues/1840)
- Error "Resource Not Found for Api Call:" when try to access batches grid [\#1834](https://github.com/mailchimp/mc-magento2/issues/1834)
- Magento subscription email sent despite 'Magento always managed emails' set to 'No' [\#1311](https://github.com/mailchimp/mc-magento2/issues/1311)


## [102.3.57](https://github.com/mailchimp/mc-magento2/tree/102.3.57)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.56...102.3.57)

**Fixed bugs:**

- The order is not marked as modified when cancel [\#1822](https://github.com/mailchimp/mc-magento2/issues/1822)
- Unable to assign a customer to another website [\#1818](https://github.com/mailchimp/mc-magento2/issues/1818)

## [102.3.56](https://github.com/mailchimp/mc-magento2/tree/102.3.56)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.55...102.3.56)

**Implemented enhancements:**

- MailChimp Customer Tab Empty [\#1804](https://github.com/mailchimp/mc-magento2/issues/1804)

## [102.3.55](https://github.com/mailchimp/mc-magento2/tree/102.3.55)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.54...102.3.55)

**Fixed bugs:**

- Checkout is broken (error in the etc/di.xml) [\#1790](https://github.com/mailchimp/mc-magento2/issues/1790)

## [102.3.54](https://github.com/mailchimp/mc-magento2/tree/102.3.54)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.53...102.3.54)

**Implemented enhancements:**

- Performance: Excessive SQL usage in Sales and Products Grid [\#1759](https://github.com/mailchimp/mc-magento2/issues/1759)
- Remove unused code in Heper/Data.php [\#1753](https://github.com/mailchimp/mc-magento2/issues/1753)

**Fixed bugs:**

- Upgrade to 103.4.53 caused UPDATE on over 60% of the existing \(old\) orders [\#1772](https://github.com/mailchimp/mc-magento2/issues/1772)
- ebizmarts\_ecommerce job unchecks "Use Default Value" checkbox for some product attributes [\#1758](https://github.com/mailchimp/mc-magento2/issues/1758)
- Check if the Abandoned cart is enabled, the ecommerce must be enabled [\#1745](https://github.com/mailchimp/mc-magento2/issues/1745)

## [102.3.53](https://github.com/mailchimp/mc-magento2/tree/102.3.53)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.52...102.3.53)

**Fixed bugs:**

- Cannot upgrade to latest version due to patch error [\#1732](https://github.com/mailchimp/mc-magento2/issues/1732)

## [102.3.52](https://github.com/mailchimp/mc-magento2/tree/102.3.52)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.51...102.3.52)

**Implemented enhancements:**

- Optimize the product grid to avoid access the ecommerce table [\#1714](https://github.com/mailchimp/mc-magento2/issues/1714)
- Optimize the order grid to avoid access the ecommerce table [\#1708](https://github.com/mailchimp/mc-magento2/issues/1708)
- Add an option in the configuration page to modify the timeout in the Mailchimp api connections [\#1697](https://github.com/mailchimp/mc-magento2/issues/1697)
- Add links to campaign and member in mailchimp in the order grid [\#1690](https://github.com/mailchimp/mc-magento2/issues/1690)

**Fixed bugs:**

- The sync of orders fails if the order has no billing address [\#1720](https://github.com/mailchimp/mc-magento2/issues/1720)


## [102.3.51](https://github.com/mailchimp/mc-magento2/tree/102.3.51)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.50...102.3.51)

**Implemented enhancements:**

- Put tracking\_number when the order is shipped [\#1667](https://github.com/mailchimp/mc-magento2/issues/1667)
- Create a grid to show our cronjobs in the cron\_schedule  [\#1648](https://github.com/mailchimp/mc-magento2/issues/1648)
- Create JS code that automatically enables ecommerce syncing when abandoned cart syncing is disabled [\#1633](https://github.com/mailchimp/mc-magento2/issues/1633)

**Fixed bugs:**

- Invoice and shipment pluging doesn't work [\#1668](https://github.com/mailchimp/mc-magento2/issues/1668)
- Error fetching store ID row in batch grid [\#1656](https://github.com/mailchimp/mc-magento2/issues/1656)
- Duplicate entries in the stores grid [\#1650](https://github.com/mailchimp/mc-magento2/issues/1650)
- Resync subscribers and Resync products always resyncs default store [\#1640](https://github.com/mailchimp/mc-magento2/issues/1640)
- Database schema needed for batch grid won't be created after upgrading module as opposed to installing it [\#1627](https://github.com/mailchimp/mc-magento2/issues/1627)
- Bad class name [\#1613](https://github.com/mailchimp/mc-magento2/issues/1613)
- Fail phpcs test [\#1607](https://github.com/mailchimp/mc-magento2/issues/1607)

## [102.3.50](https://github.com/mailchimp/mc-magento2/tree/102.3.50)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.49...102.3.50)

**Implemented enhancements:**

- Clean the error table automatically based on a configuration setting [\#1577](https://github.com/mailchimp/mc-magento2/issues/1577)
- Slow-query optimization for product special prices [\#1569](https://github.com/mailchimp/mc-magento2/issues/1569)
- Create grid in admin that shows batch information [\#1465](https://github.com/mailchimp/mc-magento2/issues/1465)

**Fixed bugs:**

- The carts are not deleted from mailchimp when are converted in an order [\#1595](https://github.com/mailchimp/mc-magento2/issues/1595)
- Add a button to fix the chimpstatic js in the frontend [\#1584](https://github.com/mailchimp/mc-magento2/issues/1584)

## [102.3.49](https://github.com/mailchimp/mc-magento2/tree/102.3.49)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.48...102.3.49)

**Implemented enhancements:**

- Query optimization for special prices [\#1535](https://github.com/mailchimp/mc-magento2/issues/1535)

**Fixed bugs:**

- Wrong query when load the configuration page and use db prefix [\#1557](https://github.com/mailchimp/mc-magento2/issues/1557)
- The subcribe at the bottom doesn't work [\#1551](https://github.com/mailchimp/mc-magento2/issues/1551)
- "Magento always manage emails" configuration blocking default Magento newsletter confirm email sending [\#1545](https://github.com/mailchimp/mc-magento2/issues/1545)
- Wrong column name in mailchimp\_stores [\#1533](https://github.com/mailchimp/mc-magento2/issues/1533)

## [102.3.48](https://github.com/mailchimp/mc-magento2/tree/102.3.48) (2022-08-18)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.47...102.3.48)

**Implemented enhancements:**

- Point the wiki to the github wiki [\#1522](https://github.com/mailchimp/mc-magento2/issues/1522)

**Fixed bugs:**

- Observer name "sales\_order\_save\_after" is too generic. [\#1516](https://github.com/mailchimp/mc-magento2/issues/1516)
- Error saving configuration when install the extension for the first time [\#1510](https://github.com/mailchimp/mc-magento2/issues/1510)

## [102.3.47](https://github.com/mailchimp/mc-magento2/tree/102.3.47) (2022-08-15)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.46...102.3.47)

**Implemented enhancements:**

- Add a button to truncate the error table BUT not to retry the objects with erros [\#1498](https://github.com/mailchimp/mc-magento2/issues/1498)
- Change the footer subscribe button and open a popup with the mailchimp form to subscribe [\#1487](https://github.com/mailchimp/mc-magento2/issues/1487)
- Large mailchimp\_sync\_ecommerce table with unused registers [\#1475](https://github.com/mailchimp/mc-magento2/issues/1475)

**Fixed bugs:**

- Custom boolean customer attribute not synced correctly to Mailchimp [\#1474](https://github.com/mailchimp/mc-magento2/issues/1474)
- Migrate the update data to the patches approach [\#1472](https://github.com/mailchimp/mc-magento2/issues/1472)

## [102.3.46](https://github.com/mailchimp/mc-magento2/tree/102.3.46) (2022-07-19)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.45...102.3.46)

**Implemented enhancements:**

- Rewrite "This MailChimp account is not connected to Magento" label to make it more clear [\#1448](https://github.com/mailchimp/mc-magento2/issues/1448)
- Add a synchorization column in the customer grid [\#1439](https://github.com/mailchimp/mc-magento2/issues/1439)
- Add a synchorization column in the product grid [\#1438](https://github.com/mailchimp/mc-magento2/issues/1438)
- Add button on backend to create the abandoned cart automation [\#1432](https://github.com/mailchimp/mc-magento2/issues/1432)

**Fixed bugs:**

- Missing fields in Cart.php on db call [\#1460](https://github.com/mailchimp/mc-magento2/issues/1460)
- Wrong field map value when is null [\#1425](https://github.com/mailchimp/mc-magento2/issues/1425)
- Can't get the response file from a batch [\#1414](https://github.com/mailchimp/mc-magento2/issues/1414)
- Unmark the modified flag in the ecommerce table when an object is synced [\#1408](https://github.com/mailchimp/mc-magento2/issues/1408)
- Don't use Zend\_Db\_Select::COLUMNS [\#1405](https://github.com/mailchimp/mc-magento2/issues/1405)

## [102.3.45](https://github.com/mailchimp/mc-magento2/tree/102.3.45)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.44...102.3.45)

**Implemented enhancements:**

- Query optimization for ecommerce table [\#1391](https://github.com/mailchimp/mc-magento2/issues/1391)
- Add the possibility  to send the company as a merge field [\#1369](https://github.com/mailchimp/mc-magento2/issues/1369)
- Make uninstall [\#1347](https://github.com/mailchimp/mc-magento2/issues/1347)
- Performance Issue During Product Import [\#1309](https://github.com/mailchimp/mc-magento2/issues/1309)

**Fixed bugs:**

- Subscribers are not added to mailchimp [\#1359](https://github.com/mailchimp/mc-magento2/issues/1359)
- The sync fails when an order contains a deleted product [\#1330](https://github.com/mailchimp/mc-magento2/issues/1330)
- Problem syncing country with customer address [\#1329](https://github.com/mailchimp/mc-magento2/issues/1329)
- Chimpstatic wrong url when change the mailchimp store [\#1322](https://github.com/mailchimp/mc-magento2/issues/1322)
- Error creating the webhook, wrong webhook url [\#1316](https://github.com/mailchimp/mc-magento2/issues/1316)

## [102.3.44](https://github.com/mailchimp/mc-magento2/tree/102.3.44)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.43...102.3.44)

**Implemented enhancements:**

- Add option in the error grid to link to the register with error [\#1279](https://github.com/mailchimp/mc-magento2/issues/1279)

**Fixed bugs:**

- Incorrect image url with some extensions \(p.e. cloudinary extension\) [\#1288](https://github.com/mailchimp/mc-magento2/issues/1288)
- Modify order totals to $0 when order is cancelled [\#1272](https://github.com/mailchimp/mc-magento2/issues/1272)
- Typo at https://github.com/mailchimp/mc-magento2/blob/develop-2.3/Model/Api/Order.php\#L29 [\#1249](https://github.com/mailchimp/mc-magento2/issues/1249)
- Deleting error records causes database lockup [\#1242](https://github.com/mailchimp/mc-magento2/issues/1242)
- Change the echo with helper-\>log in https://github.com/mailchimp/mc-magento2/blob/develop-2.3/Observer/Adminhtml/Product/ImportAfter.php\#L40 [\#1228](https://github.com/mailchimp/mc-magento2/issues/1228)
- ImportAfter observer is throwing exceptions if the \_store column is not present in the import data [\#1224](https://github.com/mailchimp/mc-magento2/issues/1224)
- Error retrieving the response of a batch from mailchimp [\#1204](https://github.com/mailchimp/mc-magento2/issues/1204)
- Avoid duplicate entries in the stores grid [\#1217](https://github.com/mailchimp/mc-magento2/issues/1217)
- Unable to create a new Mailchimp Store in admin [\#1208](https://github.com/mailchimp/mc-magento2/issues/1208)

## [102.3.43](https://github.com/mailchimp/mc-magento2/tree/102.3.43)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.42...102.3.43)

**Implemented enhancements:**

- Add a button in the admin to resync all products [\#1184](https://github.com/mailchimp/mc-magento2/issues/1184)
- Missing indexes on mailchimp\_errors [\#1162](https://github.com/mailchimp/mc-magento2/issues/1162)
- Ignore modified items when flagging store as synced [\#1140](https://github.com/mailchimp/mc-magento2/issues/1140)
- Only fetch specific columns from sales\_order [\#1134](https://github.com/mailchimp/mc-magento2/issues/1134)
- Error table never getting cleaned up [\#1107](https://github.com/mailchimp/mc-magento2/issues/1107)

**Fixed bugs:**

- Change the low value for date sync to a valid one [\#1192](https://github.com/mailchimp/mc-magento2/issues/1192)
- Exclude the bundle and grouped products for the product collection [\#1191](https://github.com/mailchimp/mc-magento2/issues/1191)
- The product image url don't contain the secure url if Use Secure URLs on Storefront is ON [\#1179](https://github.com/mailchimp/mc-magento2/issues/1179)
- Mark products as modified when use import products from the admin [\#1167](https://github.com/mailchimp/mc-magento2/issues/1167)
- Issue with "Magento Always Manage Emails" when Unsubscribing from a Customer Account [\#1157](https://github.com/mailchimp/mc-magento2/issues/1157)
- errors in cron related to ebizmarts\_webhooks [\#1152](https://github.com/mailchimp/mc-magento2/issues/1152)
- Ecommerce order send loop [\#1112](https://github.com/mailchimp/mc-magento2/issues/1112)
- Allow more than 10 interest inside a group [\#1103](https://github.com/mailchimp/mc-magento2/issues/1103)
- observer name that breaks Magento 2 DOM XML [\#1102](https://github.com/mailchimp/mc-magento2/issues/1102)
- CSP Whitelist Support [\#1097](https://github.com/mailchimp/mc-magento2/issues/1097)
- Infinite loop on customer account creation if email present in newsletter subscribers list [\#1090](https://github.com/mailchimp/mc-magento2/issues/1090)
- Ecommerce Cron error "Requested country is not available." [\#1084](https://github.com/mailchimp/mc-magento2/issues/1084)
- Subscribing for a second time does not work. [\#1078](https://github.com/mailchimp/mc-magento2/issues/1078)

## [102.3.42](https://github.com/mailchimp/mc-magento2/tree/102.3.42)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.41...102.3.42)

**Implemented enhancements:**

- Create custom field mapping [\#1025](https://github.com/mailchimp/mc-magento2/issues/1025)

**Fixed bugs:**

- Subscribing for a second time does not work. [\#1078](https://github.com/mailchimp/mc-magento2/issues/1078)
- Invalid date format when use mysql 8 [\#1066](https://github.com/mailchimp/mc-magento2/issues/1066)
- Unable to capture the order for a campaign [\#1065](https://github.com/mailchimp/mc-magento2/issues/1065)
- Notice: Undefined index: image\_url Model/Api/Product.php [\#1059](https://github.com/mailchimp/mc-magento2/issues/1059)
- Multistore product sync wrong name  [\#1055](https://github.com/mailchimp/mc-magento2/issues/1055)

## [102.3.41](https://github.com/mailchimp/mc-magento2/tree/102.3.41)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.40...102.3.41)

**Implemented enhancements:**

- Coupon Codes \(Promo Codes\) Do Not Send to Mailchimp With Order Data [\#1032](https://github.com/mailchimp/mc-magento2/issues/1032)

**Fixed bugs:**

- "Unable to unserialize value." issue avoids ecommerce syncing. This happens some times when "Send Promo Codes and Promo Rules" is enabled [\#1035](https://github.com/mailchimp/mc-magento2/issues/1035)
- Fallback to JQueryUI Compat activated. [\#1034](https://github.com/mailchimp/mc-magento2/issues/1034)
- Abandoned Cart revenue not showing on Mailchimp account [\#1033](https://github.com/mailchimp/mc-magento2/issues/1033)

## [102.3.40](https://github.com/mailchimp/mc-magento2/tree/102.3.40)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.39...102.3.40)

**Implemented enhancements:**

- Add magento 2.4 compatibility [\#1027](https://github.com/mailchimp/mc-magento2/issues/1027)

## [102.3.39](https://github.com/mailchimp/mc-magento2/tree/102.3.39)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.38...102.3.39)

**Implemented enhancements:**

- Licensing? [\#996](https://github.com/mailchimp/mc-magento2/issues/996)

**Fixed bugs:**

- Typo in campaigncatcher.js causing Javascript error [\#1015](https://github.com/mailchimp/mc-magento2/issues/1015)
- The mailchimp groups are not shown correctly in the customer account [\#1009](https://github.com/mailchimp/mc-magento2/issues/1009)
- Improper call to interest-categories in the webhook processing [\#1002](https://github.com/mailchimp/mc-magento2/issues/1002)
- MapFields not getting synced when configured in storeView. [\#998](https://github.com/mailchimp/mc-magento2/issues/998)
- Eternal Spinning gif after invalid API key has been entered in the configuration [\#990](https://github.com/mailchimp/mc-magento2/issues/990)
- Syncing customer group changed some customers group id to 0 [\#989](https://github.com/mailchimp/mc-magento2/issues/989)
- Issue syncing DOB merge field [\#987](https://github.com/mailchimp/mc-magento2/issues/987)
- JS error on product page with slow internet [\#912](https://github.com/mailchimp/mc-magento2/issues/912)

## [102.3.38](https://github.com/mailchimp/mc-magento2/tree/102.3.38)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.37...102.3.38)

**Implemented enhancements:**

- Optimize MailChimp JS block [\#895](https://github.com/mailchimp/mc-magento2/issues/895)
- Optimize MailChimp JS block [\#891](https://github.com/mailchimp/mc-magento2/pull/891) ([andrey-legayev](https://github.com/andrey-legayev))

**Fixed bugs:**

- Incorrect import in Webhook controller [\#976](https://github.com/mailchimp/mc-magento2/issues/976)
- The street line 3 is not synced in orders [\#963](https://github.com/mailchimp/mc-magento2/issues/963)
- Loading screen stuck when attempting to save the API key. [\#940](https://github.com/mailchimp/mc-magento2/issues/940)
- \[Performance Issue\] HTTP calls to mailchimp on every page request and config cache flush [\#939](https://github.com/mailchimp/mc-magento2/issues/939)
- Strong check for interest groups [\#932](https://github.com/mailchimp/mc-magento2/issues/932)
- Take the first date value from storeview scope. [\#931](https://github.com/mailchimp/mc-magento2/issues/931)
- Bad management of the groups in the webhooks [\#926](https://github.com/mailchimp/mc-magento2/issues/926)
- Error grid, bad data when try to sort for one field 3 times [\#922](https://github.com/mailchimp/mc-magento2/issues/922)
- Uncaught TypeError: strpos\(\) expects parameter 1 to be string, null given in vendor/magento/module-theme/Controller/Result/JsFooterPlugin.php:44 in Magento 2.3.3 [\#920](https://github.com/mailchimp/mc-magento2/issues/920)
- JS error on product page with slow internet [\#912](https://github.com/mailchimp/mc-magento2/issues/912)
- Invalid API key error when attempting to update settings. [\#906](https://github.com/mailchimp/mc-magento2/issues/906)
- Typo in Ecommerce cron when mark an object with error [\#900](https://github.com/mailchimp/mc-magento2/issues/900)
- Error in cron when split databases [\#887](https://github.com/mailchimp/mc-magento2/issues/887)
- Make changes to pass code sniffer [\#881](https://github.com/mailchimp/mc-magento2/issues/881)
- Fix catching campaign with enabled Varnish FPC [\#874](https://github.com/mailchimp/mc-magento2/issues/874)
- Fix incorrect import in Webhook controller [\#973](https://github.com/mailchimp/mc-magento2/pull/973) ([ihor-sviziev](https://github.com/ihor-sviziev))

## [102.3.37](https://github.com/mailchimp/mc-magento2/tree/102.3.37)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.36...102.3.37)

**Implemented enhancements:**

- Make strong check for the API key [\#849](https://github.com/mailchimp/mc-magento2/issues/849)
- Add alt text to the order grid in the mailchimp sync image [\#810](https://github.com/mailchimp/mc-magento2/issues/810)
- Send the merge\_fields for customers [\#790](https://github.com/mailchimp/mc-magento2/issues/790)

**Fixed bugs:**

- Do not add anything to frontend if module disabled [\#866](https://github.com/mailchimp/mc-magento2/issues/866)
- Made sure a missing "simple\_sku" won't break the entire sync [\#862](https://github.com/mailchimp/mc-magento2/issues/862)
- Not all batches are saved when multi store enabled [\#857](https://github.com/mailchimp/mc-magento2/issues/857)
- Mark orders with error to not try to re-sync [\#841](https://github.com/mailchimp/mc-magento2/issues/841)
- PayPal Express orders sync fails - Last name is NULL [\#840](https://github.com/mailchimp/mc-magento2/issues/840)
- Bad management of old batches [\#821](https://github.com/mailchimp/mc-magento2/issues/821)
- Bad batches management [\#817](https://github.com/mailchimp/mc-magento2/issues/817)
- Bad way to test if the json\_encode fails [\#805](https://github.com/mailchimp/mc-magento2/issues/805)
- Rename delete customer account option [\#801](https://github.com/mailchimp/mc-magento2/issues/801)
- Orders with no products are not marked as synced [\#797](https://github.com/mailchimp/mc-magento2/issues/797)
- Re sync the subscriber when the customer is modified [\#786](https://github.com/mailchimp/mc-magento2/issues/786)
- Use always the md5 of the customer email to identify the customer [\#782](https://github.com/mailchimp/mc-magento2/issues/782)
- Error when select a website scope in config [\#773](https://github.com/mailchimp/mc-magento2/issues/773)
- Change the Resync Customers button [\#768](https://github.com/mailchimp/mc-magento2/issues/768)
-  ebizmarts\_ecommerce has an error [\#767](https://github.com/mailchimp/mc-magento2/issues/767)
- Unhandled `Magento\Framework\Serialize\Serializer\Json::\(un\)serialize` calls [\#758](https://github.com/mailchimp/mc-magento2/issues/758)

## [102.3.36](https://github.com/mailchimp/mc-magento2/tree/102.3.36)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.35...102.3.36)

**Implemented enhancements:**

- Take the version from the composer.json [\#759](https://github.com/mailchimp/mc-magento2/issues/759)

## [102.3.35](https://github.com/mailchimp/mc-magento2/tree/102.3.35)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/102.3.34...101.2.35)

**Implemented enhancements:**

- Show the amount of list subscribers [\#740](https://github.com/mailchimp/mc-magento2/issues/740)
- Wrong error message in order grid [\#710](https://github.com/mailchimp/mc-magento2/issues/710)
- Add a button to re sync customers [\#702](https://github.com/mailchimp/mc-magento2/issues/702)
- Encrypt sensitive data [\#701](https://github.com/mailchimp/mc-magento2/issues/701)
- Some exceptions are not added into logs, making it hard to find the error message. [\#700](https://github.com/mailchimp/mc-magento2/issues/700)

**Fixed bugs:**

- Remove error message when resend an item with error [\#719](https://github.com/mailchimp/mc-magento2/issues/719)
- Error message 'Resource Not Found' on creating new customers [\#715](https://github.com/mailchimp/mc-magento2/issues/715)
- Don't delete the cart from ecommerce table when the order is made [\#706](https://github.com/mailchimp/mc-magento2/issues/706)
- Success unsubscription, if subscribe again doesn't send confirm subscription emails [\#696](https://github.com/mailchimp/mc-magento2/issues/696)
- Customer and subscriber with same email sent to mailchimp with different id [\#692](https://github.com/mailchimp/mc-magento2/issues/692)
- Order is not marked to resync when the credit memo comes via magento API [\#687](https://github.com/mailchimp/mc-magento2/issues/687)
- Order is not marked to resync when the invoice comes via magento API [\#682](https://github.com/mailchimp/mc-magento2/issues/682)
- Order is not marked to resync when the shipment comes via magento API [\#678](https://github.com/mailchimp/mc-magento2/issues/678)
- Multistore with different Mailchimp account wrong synchronization on customer delete/unsubcribe from magento admin [\#674](https://github.com/mailchimp/mc-magento2/issues/674)
- MySQL error during setup:upgrade after module install \(with split database Magento EE feature enabled\) [\#664](https://github.com/mailchimp/mc-magento2/issues/664)

## [102.3.34](https://github.com/mailchimp/mc-magento2/tree/102.3.34)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.3.33...102.3.34)

**Implemented enhancements:**

- Add link to Terms of service [\#641](https://github.com/mailchimp/mc-magento2/issues/641)
- Delete the Cart register in the sync\_commerce table when confirm the order [\#626](https://github.com/mailchimp/mc-magento2/issues/626)
- Add some other logs [\#602](https://github.com/mailchimp/mc-magento2/issues/602)
- Clean the maichimp\_sync\_batches table [\#598](https://github.com/mailchimp/mc-magento2/issues/598)
- Avoid getByEmail calls when sending Orders and Carts to Mailchimp [\#468](https://github.com/mailchimp/mc-magento2/issues/468)
- Put a column in the order grid to show if the order was synced [\#140](https://github.com/mailchimp/mc-magento2/issues/140)

**Fixed bugs:**

- Change the version numeration to meet the magento marketplace requirements [\#649](https://github.com/mailchimp/mc-magento2/issues/649)
- Save the email in the quote only with the agreement from the customer [\#645](https://github.com/mailchimp/mc-magento2/issues/645)
- Not send the carts until the store is completely synced [\#636](https://github.com/mailchimp/mc-magento2/issues/636)
- Defer the load of the mailchimp js [\#630](https://github.com/mailchimp/mc-magento2/issues/630)
- No first and lastname when the order is from a guest [\#609](https://github.com/mailchimp/mc-magento2/issues/609)
- Subscriber not sent if country state is empty. [\#593](https://github.com/mailchimp/mc-magento2/issues/593)
- Ecommerce cronjob stuck on customers with no address \(error occurs\) [\#400](https://github.com/mailchimp/mc-magento2/issues/400)


## [1.3.33](https://github.com/mailchimp/mc-magento2/tree/1.3.33)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.32...1.3.33)

**Implemented enhancements:**

- Change all mentions from MailChimp to Mailchimp and change the menu icon to the new one [\#565](https://github.com/mailchimp/mc-magento2/issues/565)
- Add possibility to send the product's price including taxes [\#532](https://github.com/mailchimp/mc-magento2/issues/532)
- Sync performance in large stores [\#502](https://github.com/mailchimp/mc-magento2/issues/502)
- Clean the table mailchimp\_webhook\_request [\#486](https://github.com/mailchimp/mc-magento2/issues/486)
- Add option to not send Promo Codes and Promo Rules [\#481](https://github.com/mailchimp/mc-magento2/issues/481)
- Ask for confirmation when removing mailchimp store [\#480](https://github.com/mailchimp/mc-magento2/issues/480)
- add magento 2.3 compatibility [\#494](https://github.com/mailchimp/mc-magento2/pull/494) ([gonzaloebiz](https://github.com/gonzaloebiz))

**Fixed bugs:**

- Spelling error in order status sent to mailchimp [\#574](https://github.com/mailchimp/mc-magento2/issues/574)
- Error during sync: "A campaign with the provided ID does not exist in the account for this list." [\#561](https://github.com/mailchimp/mc-magento2/issues/561)
- No campaign assigned to orders [\#554](https://github.com/mailchimp/mc-magento2/issues/554)
- Missing Customer Fields Mapping [\#553](https://github.com/mailchimp/mc-magento2/issues/553)
- Customers generate entries in the mailchimp\_sycn\_ecommerce with related\_id = null [\#541](https://github.com/mailchimp/mc-magento2/issues/541)
- Re sync the parent product when modifiy a child one [\#537](https://github.com/mailchimp/mc-magento2/issues/537)
- Could not resolve host: xx.api.mailchimp.com [\#523](https://github.com/mailchimp/mc-magento2/issues/523)
- Incorrect price in configurable product [\#513](https://github.com/mailchimp/mc-magento2/issues/513)
- No timezone saved when create a new Mailchimp store [\#512](https://github.com/mailchimp/mc-magento2/issues/512)
- Cart not updated in a Abandoned Cart Series [\#498](https://github.com/mailchimp/mc-magento2/issues/498)
- "Unable to unserialize value " when run the ecommerce cron process [\#473](https://github.com/mailchimp/mc-magento2/issues/473)
- multi-site Customer Fields Mapping not syncing correctly [\#471](https://github.com/mailchimp/mc-magento2/issues/471)
- Previously unsubscribed guest/customer is not resubscribed when selecting groups on success page [\#365](https://github.com/mailchimp/mc-magento2/issues/365)

## [1.0.31](https://github.com/mailchimp/mc-magento2/tree/1.0.31)

[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.30...1.0.31)

**Implemented enhancements:**

- Add a combo in the Customer Fields Mapping with the MailChimp defined tags [\#423](https://github.com/mailchimp/mc-magento2/issues/423)

**Fixed bugs:**

- Error of serialization when processing webhook data [\#455](https://github.com/mailchimp/mc-magento2/issues/455)
- Don't use serialize function directly [\#451](https://github.com/mailchimp/mc-magento2/issues/451)
- Error when a product has SKU = null [\#448](https://github.com/mailchimp/mc-magento2/issues/448)
- Send the product id in the order when is a configurable [\#445](https://github.com/mailchimp/mc-magento2/issues/445)
- main.CRITICAL: API Key Missing for Api Call: https://usxx.api.mailchimp.com/3.0/lists//merge-fields - Your request did not include an API key. [\#442](https://github.com/mailchimp/mc-magento2/issues/442)
- Wrong parent id in the cart [\#432](https://github.com/mailchimp/mc-magento2/issues/432)
- Abandoned cart email queue in Mailchimp dashboard not getting reset on placing the order [\#431](https://github.com/mailchimp/mc-magento2/issues/431)
- Collissions with mailchimp cookies [\#429](https://github.com/mailchimp/mc-magento2/issues/429)
- Subscriber which was added in MailChimp doesn't have storeId in Magento2 [\#427](https://github.com/mailchimp/mc-magento2/issues/427)
- Product Image does not show on abandoned cart email template / order details  [\#425](https://github.com/mailchimp/mc-magento2/issues/425)
- Total orders\_count and total\_spent sent incorrectly in order [\#420](https://github.com/mailchimp/mc-magento2/issues/420)
- NULL price when special price is not set, but special price dates are set  [\#416](https://github.com/mailchimp/mc-magento2/issues/416)
- field \[operations.item:2\] : Schema describes object, array found instead [\#409](https://github.com/mailchimp/mc-magento2/issues/409)
- Empty data in the batch json for custom products types [\#406](https://github.com/mailchimp/mc-magento2/issues/406)
- After syncing data with MailChimp the wrong products are show for my stores [\#404](https://github.com/mailchimp/mc-magento2/issues/404)
- Fix unique type validation in di.xml [\#450](https://github.com/mailchimp/mc-magento2/pull/450) ([ihor-sviziev](https://github.com/ihor-sviziev))

## [1.0.30](https://github.com/mailchimp/mc-magento2/tree/1.0.30) (2018-09-18)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.29...1.0.30)

**Implemented enhancements:**

- Adding extra logging on import parts of the Cronjob [\#393](https://github.com/mailchimp/mc-magento2/issues/393)
- Add an option to choose between send MailChimp or Magento mails [\#372](https://github.com/mailchimp/mc-magento2/issues/372)
- Log batch totals for each run [\#361](https://github.com/mailchimp/mc-magento2/issues/361)
-  Add debug information [\#359](https://github.com/mailchimp/mc-magento2/issues/359)
- High CPU load when API not available [\#325](https://github.com/mailchimp/mc-magento2/issues/325)

**Fixed bugs:**

- MailChimp breaks order processing when it's done through CLI [\#378](https://github.com/mailchimp/mc-magento2/issues/378)
- Disabled in Admin Panel Mailchimp block Magento default newsletter flow. [\#339](https://github.com/mailchimp/mc-magento2/issues/339)
- Special prices management in Magento Enterprise [\#391](https://github.com/mailchimp/mc-magento2/issues/391)
- Failed to open stream: No such file or directory [\#388](https://github.com/mailchimp/mc-magento2/issues/388)
- Promo rules are not updated [\#370](https://github.com/mailchimp/mc-magento2/issues/370)
- Error in the configuration when selecting other website than default [\#368](https://github.com/mailchimp/mc-magento2/issues/368)
- Orders not synced when products in the order not already synced [\#366](https://github.com/mailchimp/mc-magento2/issues/366)
- Wrong website set on customer [\#357](https://github.com/mailchimp/mc-magento2/issues/357)
- Issue with coupons for free shipping [\#355](https://github.com/mailchimp/mc-magento2/issues/355)
- Error downloading response from error grid when batch not exist [\#351](https://github.com/mailchimp/mc-magento2/issues/351)
- Unable to set custom Env.php API Credentials  [\#345](https://github.com/mailchimp/mc-magento2/issues/345)
- Webhook processing fails when list id does not match any list configured in Magento [\#337](https://github.com/mailchimp/mc-magento2/issues/337)
- Sending modified products in order or cart [\#335](https://github.com/mailchimp/mc-magento2/issues/335)
- Base table or view not found Magento 2.2.4 [\#321](https://github.com/mailchimp/mc-magento2/issues/321)
- Unknown column 'at\_special\_from\_date\_default.value' in 'on clause' [\#309](https://github.com/mailchimp/mc-magento2/issues/309)

## [1.0.29](https://github.com/mailchimp/mc-magento2/tree/1.0.29) (2018-05-31)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.28...1.0.29)

**Implemented enhancements:**

- Add check before renaming 'address\_address1' table column [\#283](https://github.com/mailchimp/mc-magento2/pull/283) ([rob-aimes](https://github.com/rob-aimes))

**Fixed bugs:**

- No cron\_groups.xml is defined [\#316](https://github.com/mailchimp/mc-magento2/issues/316)
- Wrong url for a generic product of configurable producs [\#313](https://github.com/mailchimp/mc-magento2/issues/313)
- No image url when the product and the parent has no image [\#307](https://github.com/mailchimp/mc-magento2/issues/307)
- web\_hooks error somewhere - first/last name being required [\#302](https://github.com/mailchimp/mc-magento2/issues/302)
- In the mailchimpstore grid not all the apikeys are taken [\#295](https://github.com/mailchimp/mc-magento2/issues/295)
- Error getting interest groups [\#293](https://github.com/mailchimp/mc-magento2/issues/293)
- Multistore with different Mailchimp accounts not saving correctly [\#289](https://github.com/mailchimp/mc-magento2/issues/289)
- Exception is thrown when Promotion is marked for removal [\#280](https://github.com/mailchimp/mc-magento2/issues/280)
- Webhook cronjob fails when updating customer [\#278](https://github.com/mailchimp/mc-magento2/issues/278)
- Cron Ecommerce: cannot create batches data because update existed products in orders or carts [\#277](https://github.com/mailchimp/mc-magento2/issues/277)
- Cancelled or pending orders added to revenue in mailchimp [\#274](https://github.com/mailchimp/mc-magento2/issues/274)
- Bad registers are generated in mailchimp\_sync\_ecommerce table [\#267](https://github.com/mailchimp/mc-magento2/issues/267)
- PHP warning in Helper/Data.php line 340 [\#266](https://github.com/mailchimp/mc-magento2/issues/266)
- Subscriber fields not updated when Ecommerce Data not enabled [\#258](https://github.com/mailchimp/mc-magento2/issues/258)
- The instest groups are not reloaded when the list changes [\#257](https://github.com/mailchimp/mc-magento2/issues/257)
- The user can select non existing group in admin [\#256](https://github.com/mailchimp/mc-magento2/issues/256)
- Don't process stores with no mailchimp store [\#255](https://github.com/mailchimp/mc-magento2/issues/255)
- Error when attempting to edit a customer from the backend [\#240](https://github.com/mailchimp/mc-magento2/issues/240)
- 2.2 Error Importing Configuration [\#223](https://github.com/mailchimp/mc-magento2/issues/223)
- No Abandoned Cart Data Sent [\#220](https://github.com/mailchimp/mc-magento2/issues/220)
- Magento 2.2.1: Changes like "unsubscribe" and "delete" to subscribers in Magento backend aren't synched [\#147](https://github.com/mailchimp/mc-magento2/issues/147)
- Change cron group id to 'mailchimp'. [\#282](https://github.com/mailchimp/mc-magento2/pull/282) ([jhruehl](https://github.com/jhruehl))
- fix decodeArrayFieldValue error [\#265](https://github.com/mailchimp/mc-magento2/pull/265) ([gundamkid](https://github.com/gundamkid))

## [1.0.28](https://github.com/mailchimp/mc-magento2/tree/1.0.28) (2018-03-27)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.27...1.0.28)

**Implemented enhancements:**

- Not necessary mailchimp/script/get requests [\#248](https://github.com/mailchimp/mc-magento2/issues/248)
- Add a button to create the webhooks [\#229](https://github.com/mailchimp/mc-magento2/issues/229)
- Add get Api credentials button using oauth. [\#207](https://github.com/mailchimp/mc-magento2/issues/207)
- Special price management [\#194](https://github.com/mailchimp/mc-magento2/issues/194)
- Use a checkbox on Checkout to determine Opt-in status. [\#36](https://github.com/mailchimp/mc-magento2/issues/36)

**Fixed bugs:**

- Wrong product marked as modified in ecommerce table [\#253](https://github.com/mailchimp/mc-magento2/issues/253)
- Don't delete the batch\_id when modify a register [\#246](https://github.com/mailchimp/mc-magento2/issues/246)
- Invalid argument supplied for foreach\(\) [\#243](https://github.com/mailchimp/mc-magento2/issues/243)
- Missing argument on call to \_updateSyncData\(\) [\#241](https://github.com/mailchimp/mc-magento2/issues/241)
- MailChimp js file loaded each time the page loads [\#232](https://github.com/mailchimp/mc-magento2/issues/232)
- Mark non existing batchs as canceled [\#216](https://github.com/mailchimp/mc-magento2/issues/216)
- Modified carts are not re synced [\#212](https://github.com/mailchimp/mc-magento2/issues/212)
- Try to get result for not existing batch [\#210](https://github.com/mailchimp/mc-magento2/issues/210)
- Wrong error management [\#204](https://github.com/mailchimp/mc-magento2/issues/204)
- When modify a simple product, the variant is empty [\#202](https://github.com/mailchimp/mc-magento2/issues/202)
- Abandoned cart email product price has range starting at $0 when using configurable products [\#197](https://github.com/mailchimp/mc-magento2/issues/197)
- Error due to customer data race condition [\#112](https://github.com/mailchimp/mc-magento2/issues/112)
- Update default.xml [\#180](https://github.com/mailchimp/mc-magento2/pull/180) ([jhruehl](https://github.com/jhruehl))
- Show "Mailchimp" customer tab when the extension is enabled [\#201](https://github.com/mailchimp/mc-magento2/pull/201) ([t-richards](https://github.com/t-richards))

## [1.0.27](https://github.com/mailchimp/mc-magento2/tree/1.0.27) (2018-01-30)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.26...1.0.27)

**Implemented enhancements:**

- Send categories in product vendor attribute [\#129](https://github.com/mailchimp/mc-magento2/issues/129)

**Fixed bugs:**

- Merge Names not synching [\#188](https://github.com/mailchimp/mc-magento2/issues/188)
- Error in ebizmarts\_ecommerce after upgrading to 1.0.26 [\#186](https://github.com/mailchimp/mc-magento2/issues/186)
- Installation error when the database has a prefix [\#184](https://github.com/mailchimp/mc-magento2/issues/184)

## [1.0.26](https://github.com/mailchimp/mc-magento2/tree/1.0.26) (2018-01-24)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.25...1.0.26)

**Implemented enhancements:**

- Copy suggestions for List Group enhancement [\#173](https://github.com/mailchimp/mc-magento2/issues/173)
- Add support for List Groups [\#122](https://github.com/mailchimp/mc-magento2/issues/122)
- Magento 2.2 compatibility [\#116](https://github.com/mailchimp/mc-magento2/issues/116)
- Add mergevars [\#110](https://github.com/mailchimp/mc-magento2/issues/110)

**Fixed bugs:**

- MailChimp connected sites List Settings syncing seemingly forever [\#66](https://github.com/mailchimp/mc-magento2/issues/66)
- Products are not marked as modified in the sync\_ecommerce table [\#177](https://github.com/mailchimp/mc-magento2/issues/177)
- Child product update when parent has not been sent yet [\#160](https://github.com/mailchimp/mc-magento2/issues/160)
- Guest Abandoned Carts failing to load when accessing from automation. [\#153](https://github.com/mailchimp/mc-magento2/issues/153)
- Guest Abandoned Carts not associating email address at checkout [\#152](https://github.com/mailchimp/mc-magento2/issues/152)
- Sync only works, if eCommerce is enabled [\#150](https://github.com/mailchimp/mc-magento2/issues/150)
- Intallation error in EE when the database is already splitted [\#149](https://github.com/mailchimp/mc-magento2/issues/149)
- Compatibility with Magento Enterprise Edition 2.1.x [\#144](https://github.com/mailchimp/mc-magento2/issues/144)
- Send duplicates promo codes [\#121](https://github.com/mailchimp/mc-magento2/issues/121)
- Mark customer as modified when any data was modified [\#118](https://github.com/mailchimp/mc-magento2/issues/118)
- Error when the webhook is created [\#117](https://github.com/mailchimp/mc-magento2/issues/117)
- Exception when running cron [\#114](https://github.com/mailchimp/mc-magento2/issues/114)
- Cron error "Requested country is not available." [\#58](https://github.com/mailchimp/mc-magento2/issues/58)
- Fix for broken admin grid in production [\#176](https://github.com/mailchimp/mc-magento2/pull/176) ([duckchip](https://github.com/duckchip))
- Module Dependancy [\#126](https://github.com/mailchimp/mc-magento2/pull/126) ([valguss](https://github.com/valguss))

## [1.0.25](https://github.com/mailchimp/mc-magento2/tree/1.0.25) (2017-11-06)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.24...1.0.25)

**Implemented enhancements:**

- Add support for Promo Rules and Promo Codes [\#100](https://github.com/mailchimp/mc-magento2/issues/100)
- Total subscribers in admin display the total subscriber of the account [\#94](https://github.com/mailchimp/mc-magento2/issues/94)
- Performance cron ebizmarts\_ecommerce [\#93](https://github.com/mailchimp/mc-magento2/issues/93)

**Fixed bugs:**

- The cart url for abandoned cart not work [\#111](https://github.com/mailchimp/mc-magento2/issues/111)
- Store is always syncing [\#97](https://github.com/mailchimp/mc-magento2/issues/97)
- Module doesn't install if database uses a prefix [\#95](https://github.com/mailchimp/mc-magento2/issues/95)

## [1.0.24](https://github.com/mailchimp/mc-magento2/tree/1.0.24) (2017-09-18)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.23...1.0.24)

**Implemented enhancements:**

- Major Admin Order Grid Slowdown [\#88](https://github.com/mailchimp/mc-magento2/issues/88)

**Fixed bugs:**

- Error installation when use split database [\#85](https://github.com/mailchimp/mc-magento2/issues/85)
- Incorrect cart url [\#84](https://github.com/mailchimp/mc-magento2/issues/84)
- Incorrect image url [\#82](https://github.com/mailchimp/mc-magento2/issues/82)
- Change $this-\>\_helper-\>\_\_\(\) to \_\_\(\) [\#80](https://github.com/mailchimp/mc-magento2/pull/80) ([rikardwissing](https://github.com/rikardwissing))

## [1.0.23](https://github.com/mailchimp/mc-magento2/tree/1.0.23) (2017-09-01)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.22...1.0.23)

**Fixed bugs:**

- Guest subscribers issue - STOREID is null [\#75](https://github.com/mailchimp/mc-magento2/issues/75)
- Website scope always taking list from default configuration [\#68](https://github.com/mailchimp/mc-magento2/issues/68)
- Requested product doesn't exist [\#67](https://github.com/mailchimp/mc-magento2/issues/67)
- Bad ajax call [\#65](https://github.com/mailchimp/mc-magento2/issues/65)
- Resubscribing a customer from Magento throws a 500 error due to Fatal Uncaught Error: "Call to a member function getStreetLine\(\) on string" [\#62](https://github.com/mailchimp/mc-magento2/issues/62)
- Display appropriate thumbnails for items [\#43](https://github.com/mailchimp/mc-magento2/issues/43)
- New customers are not added to MailChimp [\#42](https://github.com/mailchimp/mc-magento2/issues/42)
- remove the use of data helper from InstallSchema [\#70](https://github.com/mailchimp/mc-magento2/pull/70) ([BlackIkeEagle](https://github.com/BlackIkeEagle))

## [1.0.22](https://github.com/mailchimp/mc-magento2/tree/1.0.22) (2017-07-26)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.21...1.0.22)

## [1.0.21](https://github.com/mailchimp/mc-magento2/tree/1.0.21) (2017-07-14)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.20...1.0.21)

## [1.0.20](https://github.com/mailchimp/mc-magento2/tree/1.0.20) (2017-07-12)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.19...1.0.20)

## [1.0.19](https://github.com/mailchimp/mc-magento2/tree/1.0.19) (2017-07-12)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.18...1.0.19)

## [1.0.18](https://github.com/mailchimp/mc-magento2/tree/1.0.18) (2017-06-29)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.17...1.0.18)

**Implemented enhancements:**

- Add a commit call when use a connection directly [\#53](https://github.com/mailchimp/mc-magento2/issues/53)

**Fixed bugs:**

- Reset the errors when no more mailchimp store are connected [\#54](https://github.com/mailchimp/mc-magento2/issues/54)

## [1.0.17](https://github.com/mailchimp/mc-magento2/tree/1.0.17) (2017-06-21)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.16...1.0.17)

**Fixed bugs:**

- Error in mc.js when change the mailchimp store [\#51](https://github.com/mailchimp/mc-magento2/issues/51)
- Prevent sending customers to other store views even when they belong to the same website [\#48](https://github.com/mailchimp/mc-magento2/issues/48)

## [1.0.16](https://github.com/mailchimp/mc-magento2/tree/1.0.16) (2017-06-19)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.15...1.0.16)

**Implemented enhancements:**

- Limit the process of the webhooks [\#47](https://github.com/mailchimp/mc-magento2/issues/47)

**Fixed bugs:**

- Invalid product url on simple products not visible [\#49](https://github.com/mailchimp/mc-magento2/issues/49)

## [1.0.15](https://github.com/mailchimp/mc-magento2/tree/1.0.15) (2017-06-05)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.14...1.0.15)

**Implemented enhancements:**

- List MC account and List  [\#22](https://github.com/mailchimp/mc-magento2/issues/22)
- Add the download response link to error grid [\#8](https://github.com/mailchimp/mc-magento2/issues/8)
- Process the webhooks in a separate cron process [\#46](https://github.com/mailchimp/mc-magento2/issues/46)
- Show the list in the configuration page [\#41](https://github.com/mailchimp/mc-magento2/issues/41)
- Add actions to webhooks [\#40](https://github.com/mailchimp/mc-magento2/issues/40)
- Add webhooks [\#39](https://github.com/mailchimp/mc-magento2/issues/39)
- Request: Move MailChimp Store above Account Details on the Configuration page [\#31](https://github.com/mailchimp/mc-magento2/issues/31)
- Autoselect store when only one exists [\#28](https://github.com/mailchimp/mc-magento2/issues/28)
- Change the configuration to use jquery and ajax [\#27](https://github.com/mailchimp/mc-magento2/issues/27)
- Installation of MC.js pixel [\#18](https://github.com/mailchimp/mc-magento2/issues/18)

**Fixed bugs:**

- Ecomm Data uploaded to MailChimp should display if reselecting a connected store. [\#32](https://github.com/mailchimp/mc-magento2/issues/32)
- Account no longer syncing [\#26](https://github.com/mailchimp/mc-magento2/issues/26)
- Multiple stores not showing in Configuration dropdown [\#25](https://github.com/mailchimp/mc-magento2/issues/25)
- MC Account information displayed in Configuration does not change when API key is toggled. [\#24](https://github.com/mailchimp/mc-magento2/issues/24)
- Remove old warning message on Configuration [\#23](https://github.com/mailchimp/mc-magento2/issues/23)
- In the MailChimp Store, the street is not saved [\#21](https://github.com/mailchimp/mc-magento2/issues/21)
- Pull all lists for dropdown when creating a store [\#20](https://github.com/mailchimp/mc-magento2/issues/20)
- Use "MailChimp" instead of "Mailchimp" [\#19](https://github.com/mailchimp/mc-magento2/issues/19)
- Change the order \# when sync [\#45](https://github.com/mailchimp/mc-magento2/issues/45)
- Not mark the already synced element like errors [\#44](https://github.com/mailchimp/mc-magento2/issues/44)
- Avoid error when for some reason the process cancel [\#38](https://github.com/mailchimp/mc-magento2/issues/38)
- Review the Customer process [\#37](https://github.com/mailchimp/mc-magento2/issues/37)
- Problem when receive the response of batch [\#35](https://github.com/mailchimp/mc-magento2/issues/35)
- Add ACL permissions [\#34](https://github.com/mailchimp/mc-magento2/issues/34)
- Sorting MailChimp Stores grid by email more than once causes display issues [\#33](https://github.com/mailchimp/mc-magento2/issues/33)
- Enable not saving on a MailChimp store level [\#29](https://github.com/mailchimp/mc-magento2/issues/29)
- Invalid product image url when the product not have any image [\#17](https://github.com/mailchimp/mc-magento2/issues/17)
- Newly added products not synced. [\#13](https://github.com/mailchimp/mc-magento2/issues/13)
- Store information not passing to MailChimp [\#12](https://github.com/mailchimp/mc-magento2/issues/12)
- Purchases made via campaign not attributed to the campaign [\#11](https://github.com/mailchimp/mc-magento2/issues/11)
- APIKey management and store creation [\#10](https://github.com/mailchimp/mc-magento2/issues/10)

## [1.0.14](https://github.com/mailchimp/mc-magento2/tree/1.0.14) (2017-05-04)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.9...1.0.14)

## [1.0.9](https://github.com/mailchimp/mc-magento2/tree/1.0.9) (2017-05-03)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.8...1.0.9)

## [1.0.8](https://github.com/mailchimp/mc-magento2/tree/1.0.8) (2017-05-03)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.7...1.0.8)

## [1.0.7](https://github.com/mailchimp/mc-magento2/tree/1.0.7) (2017-05-02)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.6...1.0.7)

## [1.0.6](https://github.com/mailchimp/mc-magento2/tree/1.0.6) (2017-04-24)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.5...1.0.6)

## [1.0.5](https://github.com/mailchimp/mc-magento2/tree/1.0.5) (2017-04-21)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.4...1.0.5)

## [1.0.4](https://github.com/mailchimp/mc-magento2/tree/1.0.4) (2017-03-22)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.3...1.0.4)

**Fixed bugs:**

- The error grid don't paginate [\#9](https://github.com/mailchimp/mc-magento2/issues/9)
- Add the mailchimp\_store\_id to all auxiliar tables [\#7](https://github.com/mailchimp/mc-magento2/issues/7)
- The reset errors button not work [\#6](https://github.com/mailchimp/mc-magento2/issues/6)
- Error in mailchimp\_errors table [\#5](https://github.com/mailchimp/mc-magento2/issues/5)
- Products not syncing [\#3](https://github.com/mailchimp/mc-magento2/issues/3)

## [1.0.3](https://github.com/mailchimp/mc-magento2/tree/1.0.3) (2017-03-18)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.2...1.0.3)

**Fixed bugs:**

- Clean error don't work [\#4](https://github.com/mailchimp/mc-magento2/issues/4)

## [1.0.2](https://github.com/mailchimp/mc-magento2/tree/1.0.2) (2017-03-17)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.1...1.0.2)

## [1.0.1](https://github.com/mailchimp/mc-magento2/tree/1.0.1) (2017-03-16)
[Full Changelog](https://github.com/mailchimp/mc-magento2/compare/1.0.0...1.0.1)

## [1.0.0](https://github.com/mailchimp/mc-magento2/tree/1.0.0) (2017-03-16)


\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*


================================================
FILE: CONTRIBUTING.md
================================================
### Contribution requirements

1. Contributions must adhere to [Magento coding standards](http://devdocs.magento.com/guides/v2.0/coding-standards/bk-coding-standards.html).
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances that a pull request is merged quickly and without additional clarification requests.
3. Commits must be accompanied by meaningful commit messages. (include a **closes** in the commit that close the issue)
4. PRs that include bug fixing must be accompanied by the creation of an issue describing the bug following this [Issue reporting guidelines](https://github.com/mailchimp/mc-magento2/wiki/Issue-reporting-guidelines).
5. For large features or changes, please open an issue and discuss first. This may prevent duplicate or unnecessary effort, and it may gain you some additional contributors.


================================================
FILE: Controller/Adminhtml/Batch/GetResponse.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 5/3/17 3:28 PM
 * @file: Getresponse.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Batch;

use Magento\Framework\Controller\ResultFactory;

class GetResponse extends \Magento\Backend\App\Action
{
    const MAX_RETRIES = 5;
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;
    /**
     * @var \Ebizmarts\MailChimp\Model\MailChimpErrorsFactory
     */
    protected $_batchFactory;
    /**
     * @var \Ebizmarts\MailChimp\Model\Api\Result
     */
    protected $_result;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;
    /**
     * @var \Magento\Framework\Filesystem\Driver\File
     */
    protected $_driver;

    /**
     * Getresponse constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Ebizmarts\MailChimp\Model\MailChimpErrorsFactory $errorsFactory
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Ebizmarts\MailChimp\Model\Api\Result $result
     * @param \Magento\Framework\Filesystem\Driver\File $driver
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Ebizmarts\MailChimp\Model\MailChimpSyncBatchesFactory $_batchFactory,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Ebizmarts\MailChimp\Model\Api\Result $result,
        \Magento\Framework\Filesystem\Driver\File $driver
    ) {
        parent::__construct($context);
        $this->_resultFactory       = $context->getResultFactory();
        $this->_batchFactory        = $_batchFactory;
        $this->_result              = $result;
        $this->_helper              = $helper;
        $this->_driver              = $driver;
    }

    public function execute()
    {
        $batchId    = $this->getRequest()->getParam('id');
        $batches = $this->_batchFactory->create();
        $batches->getResource()->load($batches, $batchId);
        $batchId = $batches->getBatchId();
        $fileContent = [];
        $counter = 0;
        do {
            $counter++;
            $files = $this->_result->getBatchResponse($batchId, $batches->getStoreId());
            if ($files===false) {
                $fileContent = "Response was deleted from MailChimp servers";
                break;
            }
            foreach ($files as &$file) {
                $items = json_decode($this->_driver->fileGetContents($file));
                foreach ($items as &$item) {
                    $content = [
                        'status_code' => $item->status_code,
                        'operation_id' => $item->operation_id,
                        'response' => json_decode($item->response)
                    ];
                    $fileContent[] = $content;
                }
                $this->_driver->deleteFile($file);
            }
            $baseDir = $this->_helper->getBaseDir();
            if ($this->_driver->isDirectory($baseDir . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR .
                \Ebizmarts\MailChimp\Model\Api\Result::MAILCHIMP_TEMP_DIR . DIRECTORY_SEPARATOR . $batchId)) {
                $this->_driver->deleteDirectory(
                    $baseDir . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR .
                    \Ebizmarts\MailChimp\Model\Api\Result::MAILCHIMP_TEMP_DIR . DIRECTORY_SEPARATOR . $batchId
                );
            }
        } while (!count($fileContent) && $counter<self::MAX_RETRIES);
        $resultJson =$this->_resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setHeader('Content-disposition', 'attachment; filename='.$batchId.'.json');
        $resultJson->setHeader('Content-type', 'application/json');
        $data = json_encode($fileContent, JSON_PRETTY_PRINT);
        $resultJson->setJsonData($data);
        return $resultJson;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::batch_grid');
    }
}


================================================
FILE: Controller/Adminhtml/Batch/Index.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 10/28/16 4:58 PM
 * @file: Index.php
 */
namespace Ebizmarts\MailChimp\Controller\Adminhtml\Batch;

class Index extends \Magento\Backend\App\Action
{
    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $resultPageFactory;

    /**
     * Index constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {

        $this->resultPageFactory = $resultPageFactory;
        return parent::__construct($context);
    }
    public function execute()
    {
        $page = $this->resultPageFactory->create();
        $page->getConfig()->getTitle()->prepend(__('Mailchimp Batches'));
        return $page;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::batch_grid');
    }
}




================================================
FILE: Controller/Adminhtml/Carts/Index.php
================================================
<?php

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Carts;

class Index extends \Magento\Backend\App\Action
{
    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $resultPageFactory;

    /**
     * Index constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;

        parent::__construct($context);
    }
    public function execute()
    {
        $page = $this->resultPageFactory->create();
        $page->getConfig()->getTitle()->prepend(__('Mailchimp Carts'));
        return $page;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::carts_grid');
    }
}


================================================
FILE: Controller/Adminhtml/Cron/Index.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 10/28/16 4:58 PM
 * @file: Index.php
 */
namespace Ebizmarts\MailChimp\Controller\Adminhtml\Cron;

class Index extends \Magento\Backend\App\Action
{
    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $resultPageFactory;

    /**
     * Index constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {

        $this->resultPageFactory = $resultPageFactory;
        return parent::__construct($context);
    }
    public function execute()
    {
        $page = $this->resultPageFactory->create();
        $page->getConfig()->getTitle()->prepend(__('Mailchimp Cron'));
        return $page;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::cron_grid');
    }
}




================================================
FILE: Controller/Adminhtml/Ecommerce/CreateWebhook.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 3/12/18 4:14 PM
 * @file: CreateWebhook.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;

class CreateWebhook extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;

    /**
     * DeleteStore constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Magento\Config\Model\ResourceModel\Config $config
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Magento\Config\Model\ResourceModel\Config $config
    ) {

        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->helper               = $helper;
        $this->storeManager         = $storeManagerInterface;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';
        $params = $this->getRequest()->getParams();
        $apiKey = $params['apikey'];
        $listId = $params['listId'];
        $scope = $params['scope'];
        $scopeId = $params['scopeId'];

        if ($apiKey=='******') {
            $apiKey = $this->helper->getApiKey($scopeId, $scope);
        }

        $return = $this->helper->createWebHook($apiKey, $listId, $scope, $scopeId);
        if (isset($return['message'])) {
            $valid = 0;
            $message = $return['message'];
        }
        $resultJson = $this->resultJsonFactory->create();

        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("CreateWebhook", $ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/DeleteStore.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/21/17 5:07 PM
 * @file: ResetLocalErrors.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;

class DeleteStore extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;
    /**
     * @var \Magento\Config\Model\ResourceModel\Config
     */
    protected $_config;

    /**
     * DeleteStore constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Magento\Config\Model\ResourceModel\Config $config
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Magento\Config\Model\ResourceModel\Config $config
    ) {

        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->helper               = $helper;
        $this->storeManager         = $storeManagerInterface;
        $this->_config              = $config;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';
        $params = $this->getRequest()->getParams();
        if (isset($params['website'])) {
            $scope = 'website';
            $storeId = $params['website'];
        } elseif (isset($params['store'])) {
            $scope = 'store';
            $storeId = $params['store'];
        } else {
            //$storeId = $this->storeManager->getDefaultStoreView()->getWebsiteId();
            $storeId = 0;
            $scope = 'default';
        }

        $mailchimpStore = $this->helper->getConfigValue(
            \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
            $storeId,
            $scope
        );
        $resultJson = $this->resultJsonFactory->create();
        try {
            $this->helper->deleteStore($mailchimpStore);
            $this->_config->deleteConfig(\Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE, $scope, $storeId);
        } catch (ValidatorException $e) {
            $valid = 0;
            $message = $e->getMessage();
        }
        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("DeleteStore",$ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/FixMailchimpJS.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/21/17 5:07 PM
 * @file: ResetLocalErrors.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Ebizmarts\MailChimp\Model\ResourceModel\MailChimpSyncEcommerce\CollectionFactory;
use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;

class FixMailchimpJS extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var \Magento\Config\Model\ResourceModel\Config
     */
    protected $config;
    protected $typeList;

    /**
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Config\Model\ResourceModel\Config $config
     * @param \Magento\Framework\App\Cache\TypeListInterface $typeList
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Config\Model\ResourceModel\Config $config,
        \Magento\Framework\App\Cache\TypeListInterface $typeList,
        \Ebizmarts\MailChimp\Helper\Data $helper
    ) {

        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->helper               = $helper;
        $this->config               = $config;
        $this->typeList             = $typeList;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';

        $params = $this->getRequest()->getParams();
        $this->helper->log($params);
        $scope = $params['scope'];
        $scopeId = $params['scopeId'];
        if ($scope == 'store') {
            $scope = 'stores';
        }
        $this->helper->log("Scope $scope id $scopeId");
        $resultJson = $this->resultJsonFactory->create();
        try {
            $this->config->deleteConfig(\Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_JS_URL, $scope, $scopeId);
        } catch(ValidatorException $e) {
            $valid = 0;
            $message = $e->getMessage();
        }

        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("FixMailchimpJS", $ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/GetInterest.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 3/23/18 10:05 AM
 * @file: GetInterest.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Controller\ResultFactory;

class GetInterest extends Action
{
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;
    /**
     * @var \Magento\Store\Model\StoreManager
     */
    protected $_storeManager;

    /**
     * GetInterest constructor.
     * @param Context $context
     * @param \Magento\Store\Model\StoreManager $storeManager
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     */
    public function __construct(
        Context $context,
        \Magento\Store\Model\StoreManager $storeManager,
        \Ebizmarts\MailChimp\Helper\Data $helper
    ) {

        parent::__construct($context);
        $this->_resultFactory       = $context->getResultFactory();
        $this->_helper                  = $helper;
        $this->_storeManager        = $storeManager;
    }

    /**
     * @return mixed
     */
    public function execute()
    {
        $param = $this->getRequest()->getParams();
        $rc = [];
        $error = 0;
        if (array_key_exists('apikey', $param) && array_key_exists('list', $param)) {
            $apiKey = $param['apikey'];
            $list  = $param['list'];
            $encrypt = $param['encrypt'];
            try {
                if ($encrypt == 3) {
                    $api = $this->_helper->getApi($this->_storeManager->getStore()->getId());
                } else {
                    $api = $this->_helper->getApiByApiKey($apiKey, $encrypt);
                }

                $result = $api->lists->interestCategory->getAll($list, null, null, 200);
                if (is_array($result['categories']) && count($result['categories'])) {
                    $rc = $result['categories'];
                }
            } catch (\Mailchimp_Error | \Mailchimp_HttpError $e) {
                $this->_helper->log($e->getFriendlyMessage());
                $error = 1;
            }
        }
        $resultJson = $this->_resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setData(['error' => $error, 'data' => $rc]);
        return $resultJson;
    }

    /**
     * @return mixed
     */
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/Getaccountdetails.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 5/5/17 3:40 PM
 * @file: GetAccountDetails.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Controller\ResultFactory;
use \Ebizmarts\MailChimp\Helper\Data as MailChimpHelper;

class Getaccountdetails extends Action
{
    /**
     * @var MailChimpHelper
     */
    protected $_helper;
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;
    /**
     * @var \Magento\Store\Model\StoreManager
     */
    protected $_storeManager;

    /**
     * @param Context $context
     * @param \Magento\Store\Model\StoreManager $storeManager
     * @param MailChimpHelper $helper
     */
    public function __construct(
        Context $context,
        \Magento\Store\Model\StoreManager $storeManager,
        MailChimpHelper $helper
    ) {

        parent::__construct($context);
        $this->_resultFactory       = $context->getResultFactory();
        $this->_helper                  = $helper;
        $this->_storeManager        = $storeManager;
    }
    public function execute()
    {
        $param = $this->getRequest()->getParams();
        $apiKey = $param['apikey'];
        $store  = $param['store'];
        $encrypt = $param['encrypt'];
        $scope = $param['scope'];
        $scopeId = $param['scopeId'];
        try {
            if ($encrypt == 3) {
                $api = $this->_helper->getApi($this->_storeManager->getStore()->getId());
            } else {
                $api = $this->_helper->getApiByApiKey($apiKey, $encrypt);
            }
            $apiInfo = $api->root->info();
            $options = [];
            if (isset($apiInfo['account_name'])) {
                $options['account_name'] = ['code' => 'account_name','html' => __('Account Name'),'value' => $apiInfo['account_name']];
                $options['email'] = ['code' => 'email','html' => __('email'),'value' => $apiInfo['email']];
                $options['first_name'] = ['code'=> 'first_name','html' => __('First Name'),'value' => $apiInfo['first_name']];
                $options['last_name'] = ['code'=>'last_name','html' => __('Last Name'),'value' => $apiInfo['last_name']];
                $options['pricing_plan_type'] = ['code'=>'pricing_plan_type','html' => __('Pricing Plan'),'value' => $apiInfo['pricing_plan_type']];
                $options['username'] = ['code'=>'username','html' => __('User name:'), 'value' => $apiInfo['account_name']];
                $options['account_id'] = ['code'=> 'account_id','html' => __('Account id:'), 'value' => $apiInfo['account_id']];
                $options['total_subscribers'] = ['label' => __('Total Account Subscribers:'), 'value' => $apiInfo['total_subscribers']];
                $options['total_account_subscribers'] = ['code' => 'total_subscribers', 'html' => __('Total Account Subscribers:'), 'value' => $apiInfo['total_subscribers']];
                $token = $this->_helper->getConfigValue(MailChimpHelper::XML_STATISTICS_TOKEN, $scopeId, $scope);
                if ($store != -1) {
                    $storeData = $api->ecommerce->stores->get($store);
                    $options['list_id'] = $storeData['list_id'];
                    $list = $api->lists->getLists($storeData['list_id']);
                    $options['list_name'] = $list['name'];
                    $options['total_list_subscribers'] = ['label' => __('Total List Subscribers:'), 'value' => $list['stats']['member_count']];
                    $options['token'] = ['label' => __('Registration ID:'), 'value' => $token];
                    $options['subtitle'] = ['label' => __('Ecommerce Data uploaded to MailChimp:'), 'value' => ''];
                    $totalCustomers = $api->ecommerce->customers->getAll($store, 'total_items');
                    $options['total_customers'] = ['label' => __('Total customers:'), 'value' => $totalCustomers['total_items']];
                    $totalProducts = $api->ecommerce->products->getAll($store, 'total_items');
                    $options['total_products'] = ['label' => __('Total products:'), 'value' => $totalProducts['total_items']];
                    $totalOrders = $api->ecommerce->orders->getAll($store, 'total_items');
                    $options['total_orders'] = ['label' => __('Total orders:'), 'value' => $totalOrders['total_items']];
                    $totalCarts = $api->ecommerce->carts->getAll($store, 'total_items');
                    $options['total_carts'] = ['label' => __('Total Carts:'), 'value' => $totalCarts['total_items']];
                    $options['notsaved'] = ['label' => __('Ecommerce disabled, save configuration to enable.'), 'value' => ''];
                } else {
                    $options['nostore'] = ['label' => __('Ecommerce disabled, only subscribers will be synchronized (your orders, products,etc will be not synchronized).'), 'value' => ''];
                }
            }
        } catch (\Mailchimp_Error | \Mailchimp_HttpError $e) {
            $this->_helper->log($e->getFriendlyMessage());
            $options['error'] = ['label' => 'Error', 'value' => __('--- Invalid API Key ---')];
        }

        $resultJson = $this->_resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setData($options);
        return $resultJson;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/Register.php
================================================
<?php

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Backend\App\Action;
use Magento\Directory\Helper\Data as DirectoryHelper;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\Controller\ResultFactory;
use Magento\Store\Model\StoreManager;
use Magento\Backend\App\Action\Context;
use Magento\Config\Model\ResourceModel\Config;
use Ebizmarts\MailChimp\Helper\Data as Helper;
use Ebizmarts\MailChimp\Helper\Http as MailChimpHttp;

class Register extends Action
{
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;
    /**
     * @var Helper
     */
    protected $_helper;
    /**
     * @var MailChimpHttp
     */
    protected $_http;
    /**
     * @var Config
     */
    protected $_config;
    /**
     * @var StoreManager
     */
    protected $_storeManager;
    /**
     * @var DirectoryHelper
     */
    protected $_directoryHelper;

    /**
     * @param Context $context
     * @param Helper $helper
     * @param MailChimpHttp $http
     * @param Config $config
     * @param StoreManager $storeManager
     * @param DirectoryHelper $directoryHelper
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function __construct(
        Context $context,
        Helper $helper,
        MailChimpHttp $http,
        Config $config,
        StoreManager $storeManager,
        DirectoryHelper $directoryHelper
    )
    {
        parent::__construct($context);
        $this->_resultFactory       = $context->getResultFactory();
        $this->_helper = $helper;
        $this->_http = $http;
        $this->_http->setUrl($helper->getConfigValue(Helper::XML_REGISTER_URL).'/register');
        $this->_config = $config;
        $this->_storeManager = $storeManager;
        $this->_directoryHelper = $directoryHelper;
    }
    public function execute()
    {
        $params = $this->getRequest()->getParams();
        $scope = $params['scope'];
        $scopeId = $params['scopeId'];
        $registerData = [];
        $error = true;
        $token = $this->_helper->getConfigValue(Helper::XML_STATISTICS_TOKEN,$scopeId, $scope);
        foreach ($params['data'] as $index => $value) {
            $registerData[$index] = $value['value'];
        }
        $registerData['store_url'] = stripslashes($this->_storeManager->getStore($scopeId)->getBaseUrl());
        $registerData['city'] = $this->_helper->getConfigValue(\Magento\Store\Model\Information::XML_PATH_STORE_INFO_CITY,$scopeId, $scope);
        $registerData['country'] = $this->_directoryHelper->getDefaultCountry($scopeId);
        $registerDataJson = json_encode($registerData);
        $resultJson = $this->_resultFactory->create(ResultFactory::TYPE_JSON);
        if ($token) {
            $ret = $this->_http->patch($token, $registerDataJson);
        } else {
            $ret = $this->_http->post($registerDataJson);
        }
        $ret = json_decode($ret,true);
        if ( !$ret['error']) {
            $error = false;
            $token = $ret['token'];
            $this->_helper->saveConfigValue(Helper::XML_STATISTICS_TOKEN, $token,  $scopeId, $scope);
        }
        $resultJson->setData(['error' => $error, 'token' => $token]);
        return $resultJson;

    }
    /**
     * @return mixed
     */
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }

}


================================================
FILE: Controller/Adminhtml/Ecommerce/ResetLocalErrors.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/21/17 5:07 PM
 * @file: ResetLocalErrors.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;
use Ebizmarts\MailChimp\Helper\Sync as SyncHelper;

class ResetLocalErrors extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var SyncHelper
     */
    private $syncHelper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;

    /**
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param SyncHelper $syncHelper
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        SyncHelper $syncHelper
    ) {
        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->helper               = $helper;
        $this->syncHelper           = $syncHelper;
        $this->storeManager         = $storeManagerInterface;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';
        $params = $this->getRequest()->getParams();
        if (isset($params['website'])) {
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $params['website'],
                'website'
            );
            $storeId = $params['website'];
        } elseif (isset($params['store'])) {
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $params['store'],
                'store'
            );
            $storeId = $params['store'];
        } else {
            $storeId = $this->storeManager->getStore()->getId();
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $storeId
            );
        }

        $resultJson = $this->resultJsonFactory->create();
        try {
            $this->syncHelper->resetErrors($mailchimpStore, $storeId, true);
        } catch (ValidatorException $e) {
            $valid = 0;
            $message = $e->getMessage();
        }
        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("ResetLocalErrors",$ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/ResetLocalErrorsNoRetry.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/21/17 5:07 PM
 * @file: ResetLocalErrors.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;
use Ebizmarts\MailChimp\Helper\Sync as SyncHelper;

class ResetLocalErrorsNoRetry extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var SyncHelper
     */
    private $syncHelper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;

    /**
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param SyncHelper $syncHelper
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        SyncHelper $syncHelper
    ) {

        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->helper               = $helper;
        $this->syncHelper           = $syncHelper;
        $this->storeManager         = $storeManagerInterface;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';
        $params = $this->getRequest()->getParams();
        if (isset($params['website'])) {
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $params['website'],
                'website'
            );
            $storeId = $params['website'];
        } elseif (isset($params['store'])) {
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $params['store'],
                'store'
            );
            $storeId = $params['store'];
        } else {
            $storeId = $this->storeManager->getStore()->getId();
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $storeId
            );
        }

        $resultJson = $this->resultJsonFactory->create();
        try {
            $this->syncHelper->resetErrors($mailchimpStore, $storeId, false);
        } catch (ValidatorException $e) {
            $valid = 0;
            $message = $e->getMessage();
        }
        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("ResetLocalErrorNoRetry",$ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/ResetStore.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/21/17 5:07 PM
 * @file: ResetLocalErrors.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;

class ResetStore extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;

    /**
     * ResetLocalErrors constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        \Ebizmarts\MailChimp\Helper\Data $helper
    ) {

        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->helper               = $helper;
        $this->storeManager         = $storeManagerInterface;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';
        $params = $this->getRequest()->getParams();
        if (isset($params['website'])) {
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $params['website'],
                'website'
            );
        } elseif (isset($params['store'])) {
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $params['store'],
                'store'
            );
        } else {
            $mailchimpStore = $this->helper->getConfigValue(
                \Ebizmarts\MailChimp\Helper\Data::XML_MAILCHIMP_STORE,
                $this->storeManager->getStore()
            );
        }

        try {
            $resultJson = $this->resultJsonFactory->create();
        } catch (ValidatorException $e) {
            $valid = 0;
            $message = $e->getMessage();
        }
        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("ResetStore",$ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/ResyncProducts.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/21/17 5:07 PM
 * @file: ResetLocalErrors.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;
use Ebizmarts\MailChimp\Helper\Sync as SyncHelper;
class ResyncProducts extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var SyncHelper
     */
    private $syncHelper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    private $helper;

    /**
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
     * @param SyncHelper $syncHelper
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        SyncHelper $syncHelper,
        \Ebizmarts\MailChimp\Helper\Data $helper
    ) {
        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->syncHelper           = $syncHelper;
        $this->storeManager         = $storeManagerInterface;
        $this->helper = $helper;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';
        $params = $this->getRequest()->getParams();
        $mailchimpStore = $params['mailchimpStoreId'];
        $resultJson = $this->resultJsonFactory->create();
        try {
            $this->syncHelper->resyncProducts($mailchimpStore);
        } catch (ValidatorException $e) {
            $valid = 0;
            $message = $e->getMessage();
        }
        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("ResyncProducts",  $ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/ResyncSubscribers.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 2/21/17 5:07 PM
 * @file: ResetLocalErrors.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Framework\Exception\ValidatorException;
use Symfony\Component\Config\Definition\Exception\Exception;
use Ebizmarts\MailChimp\Helper\Sync as SyncHelper;

class ResyncSubscribers extends \Magento\Backend\App\Action
{
    /**
     * @var JsonFactory
     */
    protected $resultJsonFactory;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $helper;
    /**
     * @var SyncHelper
     */
    private $syncHelper;
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;

    /**
     * @param \Magento\Backend\App\Action\Context $context
     * @param JsonFactory $resultJsonFactory
     * @param \Magento\Store\Model\StoreManagerInterface $storeManagerInterface
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param SyncHelper $syncHelper
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManagerInterface,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        SyncHelper $syncHelper
    ) {

        parent::__construct($context);
        $this->resultJsonFactory    = $resultJsonFactory;
        $this->helper               = $helper;
        $this->syncHelper           = $syncHelper;
        $this->storeManager         = $storeManagerInterface;
    }

    public function execute()
    {
        $valid = 1;
        $message = '';
        $params = $this->getRequest()->getParams();
        $mailchimpList = $params['listId'];
        $resultJson = $this->resultJsonFactory->create();
        try {
            $this->syncHelper->resyncAllSubscribers($mailchimpList);
        } catch (ValidatorException $e) {
            $valid = 0;
            $message = $e->getMessage();
        }
        $ret = [
            'valid' => (int)$valid,
            'message' => $message,
        ];
        $this->helper->buttonPressed("ResyncSubscribers",  $ret);
        return $resultJson->setData($ret);
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Ecommerce/SyncLog.php
================================================
<?php

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Ecommerce;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Controller\ResultFactory;
use Ebizmarts\MailChimp\Helper\Data as MailchimpHelper;
use Ebizmarts\MailChimp\Helper\Http as MailChimpHttp;


class SyncLog extends Action
{
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;
    /**
     * @var MailChimpHttp
     */
    protected $_http;
    /**
     * @var MailchimpHelper
     */
    protected $_helper;
    public function __construct(
        Context $context,
        MailchimpHelper $mailchimpHelper,
        MailchimpHttp $mailchimpHttp
    )
    {
        parent::__construct($context);
        $this->_resultFactory = $context->getResultFactory();
        $this->_helper = $mailchimpHelper;
        $this->_http = $mailchimpHttp;
        $this->_url = $mailchimpHelper->getConfigValue(MailchimpHelper::XML_REGISTER_URL);
    }
    public function execute()
    {
        $error = 0;
        $message = '';
        $params = $this->getRequest()->getParams();
        $scope = $params['scope'];
        $scopeId = $params['scopeId'];
        $onoff = $params['onoff'];
        $token = $this->_helper->getConfigValue(MailchimpHelper::XML_STATISTICS_TOKEN, $scopeId, $scope);
        if ($token) {
            if ($onoff) {
                $this->_http->setUrl($this->_url . '/switchon');
            } else {
                $this->_http->setUrl($this->_url . '/switchoff');
            }
            $response = $this->_http->put($token, null);
            $res = json_decode($response, true);
            if (key_exists('error',$res)) {
                $error = $res['error'];
                $message = $res['message'];
            }
        } else {
            $error = 1;
            $message = 'First register your copy';
        }
        $resultJson = $this->_resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setData(['error' => $error, 'message' => $message]);
        return $resultJson;
    }
}


================================================
FILE: Controller/Adminhtml/Errors/Getresponse.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 5/3/17 3:28 PM
 * @file: Getresponse.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Errors;

use Magento\Framework\Controller\ResultFactory;

class Getresponse extends \Magento\Backend\App\Action
{
    const MAX_RETRIES = 5;
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;
    /**
     * @var \Ebizmarts\MailChimp\Model\MailChimpErrorsFactory
     */
    protected $_errorsFactory;
    /**
     * @var \Ebizmarts\MailChimp\Model\Api\Result
     */
    protected $_result;
    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;
    /**
     * @var \Magento\Framework\Filesystem\Driver\File
     */
    protected $_driver;

    /**
     * Getresponse constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Ebizmarts\MailChimp\Model\MailChimpErrorsFactory $errorsFactory
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Ebizmarts\MailChimp\Model\Api\Result $result
     * @param \Magento\Framework\Filesystem\Driver\File $driver
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Ebizmarts\MailChimp\Model\MailChimpErrorsFactory $errorsFactory,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Ebizmarts\MailChimp\Model\Api\Result $result,
        \Magento\Framework\Filesystem\Driver\File $driver
    ) {
        parent::__construct($context);
        $this->_resultFactory       = $context->getResultFactory();
        $this->_errorsFactory       = $errorsFactory;
        $this->_result              = $result;
        $this->_helper              = $helper;
        $this->_driver              = $driver;
    }

    public function execute()
    {
        $errorId    = $this->getRequest()->getParam('id');
        $errors = $this->_errorsFactory->create();
        $errors->getResource()->load($errors, $errorId);
        $batchId = $errors->getBatchId();
        $fileContent = [];
        $counter = 0;
        do {
            $counter++;
            $files = $this->_result->getBatchResponse($batchId, $errors->getStoreId());
            if ($files===false) {
                $fileContent = "Response was deleted from MailChimp servers";
                break;
            }
            foreach ($files as $file) {
                $items = json_decode($this->_driver->fileGetContents($file));
                foreach ($items as $item) {
                    $content = [
                        'status_code' => $item->status_code,
                        'operation_id' => $item->operation_id,
                        'response' => json_decode($item->response)
                    ];
                    $fileContent[] = $content;
                }
                $this->_driver->deleteFile($file);
            }
            $baseDir = $this->_helper->getBaseDir();
            if ($this->_driver->isDirectory($baseDir . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR .
                \Ebizmarts\MailChimp\Model\Api\Result::MAILCHIMP_TEMP_DIR . DIRECTORY_SEPARATOR . $batchId)) {
                $this->_driver->deleteDirectory(
                    $baseDir . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR .
                    \Ebizmarts\MailChimp\Model\Api\Result::MAILCHIMP_TEMP_DIR . DIRECTORY_SEPARATOR . $batchId
                );
            }
        } while (!count($fileContent) && $counter<self::MAX_RETRIES);
        $resultJson =$this->_resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setHeader('Content-disposition', 'attachment; filename='.$batchId.'.json');
        $resultJson->setHeader('Content-type', 'application/json');
        $data = json_encode($fileContent, JSON_PRETTY_PRINT);
        $resultJson->setJsonData($data);
        return $resultJson;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::error_grid');
    }
}


================================================
FILE: Controller/Adminhtml/Errors/Index.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 10/28/16 4:58 PM
 * @file: Index.php
 */
namespace Ebizmarts\MailChimp\Controller\Adminhtml\Errors;

class Index extends \Magento\Backend\App\Action
{
    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $resultPageFactory;

    /**
     * Index constructor.
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {

        $this->resultPageFactory = $resultPageFactory;
        return parent::__construct($context);
    }
    public function execute()
    {
        $page = $this->resultPageFactory->create();
        $page->getConfig()->getTitle()->prepend(__('Mailchimp Errors'));
        return $page;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::error_grid');
    }
}


================================================
FILE: Controller/Adminhtml/Lists/Get.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/20/17 3:20 PM
 * @file: Get.php
 */
namespace Ebizmarts\MailChimp\Controller\Adminhtml\Lists;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Controller\ResultFactory;

class Get extends Action
{
    const MAX_LISTS = 200;

    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_helper;
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;
    /**
     * @var \Magento\Framework\Encryption\Encryptor
     */
    protected $encryptor;

    /**
     * Get constructor.
     * @param Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     * @param \Magento\Framework\Encryption\Encryptor $encryptor
     */
    public function __construct(
        Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper,
        \Magento\Framework\Encryption\Encryptor $encryptor
    ) {

        parent::__construct($context);
        $this->_resultFactory       = $context->getResultFactory();
        $this->_helper                  = $helper;
        $this->encryptor                = $encryptor;
    }
    public function execute()
    {
        $param = $this->getRequest()->getParams();
        $apiKey = $this->encryptor->decrypt($param['apikey']);
        $result = [];
        try {
            $api = $this->_helper->getApiByApiKey($apiKey);
            $lists = $api->lists->getLists(null, null, null, self::MAX_LISTS);
            foreach ($lists['lists'] as $list) {
                $result['lists'][] = ['id' => $list['id'], 'name' => $list['name']];
            }
            $result['valid'] = 1;
        } catch (\Mailchimp_Error | \Mailchimp_HttpError $e) {
            $result['valid'] = 0;
            $result['errormsg'] = $e->getTitle();
            $this->_helper->log($e->getFriendlyMessage());
        }
        $resultJson = $this->_resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setData($result);
        return $resultJson;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::stores_edit');
    }
}


================================================
FILE: Controller/Adminhtml/Orders/Campaign.php
================================================
<?php

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Orders;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\UrlInterface;
use Magento\Sales\Model\OrderRepository;
use Ebizmarts\MailChimp\Helper\Data as MailChimpHelper;

class Campaign extends Action
{
    /**
     * @var MailChimpHelper
     */
    private $helper;
    /**
     * @var OrderRepository
     */
    private $orderRepository;
    /**
     * @var UrlInterface
     */
    private $urlBuilder;

    /**
     * @param Context $context
     * @param MailChimpHelper $helper
     * @param OrderRepository $orderRepository
     * @param UrlInterface $urlBuilder
     */
    public function __construct(
        Context $context,
        MailChimpHelper $helper,
        OrderRepository $orderRepository,
        UrlInterface $urlBuilder
    ) {
        parent::__construct($context);
        $this->helper = $helper;
        $this->orderRepository = $orderRepository;
        $this->urlBuilder = $urlBuilder;
    }
    public function execute()
    {
        $param = $this->getRequest()->getParams();
        $orderId = $this->getRequest()->getParam('orderId');
        $order = $this->orderRepository->get($orderId);
        $api = $this->helper->getApi($order->getStoreId());
        try {
            $campaign = $api->campaigns->get($order->getMailchimpCampaignId());
            $webId = $campaign['web_id'];
            $url = $this->urlBuilder->getUrl('https://admin.mailchimp.com/reports/summary') . "?id=$webId";
            $this->_redirect($url);
        } catch(\Exception $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
            $this->_redirect($this->urlBuilder->getUrl('sales/order'));
        }
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::mailchimp_access');
    }
}


================================================
FILE: Controller/Adminhtml/Orders/Member.php
================================================
<?php

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Orders;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\UrlInterface;
use Magento\Sales\Model\OrderRepository;
use Ebizmarts\MailChimp\Helper\Data as MailChimpHelper;

class Member extends Action
{
    /**
     * @var MailChimpHelper
     */
    private $helper;
    /**
     * @var OrderRepository
     */
    private $orderRepository;
    /**
     * @var UrlInterface
     */
    private $urlBuilder;

    /**
     * @param Context $context
     * @param MailChimpHelper $helper
     * @param OrderRepository $orderRepository
     * @param UrlInterface $urlBuilder
     */
    public function __construct(
        Context $context,
        MailChimpHelper $helper,
        OrderRepository $orderRepository,
        UrlInterface $urlBuilder
    ) {
        parent::__construct($context);
        $this->helper = $helper;
        $this->orderRepository = $orderRepository;
        $this->urlBuilder = $urlBuilder;
    }
    public function execute()
    {
        $param = $this->getRequest()->getParams();
        $orderId = $this->getRequest()->getParam('orderId');
        $order = $this->orderRepository->get($orderId);
        $api = $this->helper->getApi($order->getStoreId());
        try {
            $email = $order->getCustomerEmail();
            $listId = $this->helper->getDefaultList($order->getStoreId());
            $member = $api->lists->members->get($listId, hash('md5', strtolower($email)));
            $memberId = $member['contact_id'];
            $url = $this->urlBuilder->getUrl('https://admin.mailchimp.com/audience/contact-profile') . "?contact_id=$memberId";
            $this->_redirect($url);
        } catch(\Exception $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
            $this->_redirect($this->urlBuilder->getUrl('sales/order'));
        }
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::mailchimp_access');
    }
}


================================================
FILE: Controller/Adminhtml/Stores/Delete.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/17/17 12:03 PM
 * @file: Delete.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Stores;

class Delete extends \Ebizmarts\MailChimp\Controller\Adminhtml\Stores
{
    public function execute()
    {
        $resultRedirect = $this->resultRedirectFactory->create();
        $storeId = (int) $this->getRequest()->getParam('id');
        if ($storeId) {
            $storeModel = $this->_mailchimpStoresFactory->create();
            $storeModel->getResource()->load($storeModel, $storeId);
            try {
                $api = $this->_mhelper->getApiByApiKey($storeModel->getApikey(), true);
                $api->ecommerce->stores->delete($storeModel->getStoreid());
                $this->messageManager->addSuccess(__('You deleted the store.'));
                return $resultRedirect->setPath('mailchimp/stores');
            } catch (\Mailchimp_Error | \Mailchimp_HttpError $e) {
                $this->messageManager->addError(__('Store could not be deleted.'.$e->getMessage()));
                $this->_mhelper->log($e->getFriendlyMessage());
                return $resultRedirect->setPath('mailchimp/stores/edit', ['id'=>$storeId]);
            }
        }
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::stores_edit');
    }
}


================================================
FILE: Controller/Adminhtml/Stores/Edit.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/5/17 1:23 PM
 * @file: Edit.php
 */

namespace Ebizmarts\MailChimp\Controller\Adminhtml\Stores;

use Ebizmarts\MailChimp\Model\MailChimpStoresFactory;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Registry;
use Magento\Framework\View\Result\PageFactory;

class Edit extends \Ebizmarts\MailChimp\Controller\Adminhtml\Stores
{

    public function execute()
    {
        $storeId = $this->getRequest()->getParam('id');
        /** @var \Ebizmarts\MailChimp\Model\MailChimpStores $model */
        $model = $this->_mailchimpStoresFactory->create();

        if ($storeId) {
            $model->getResource()->load($model, $storeId);
            if (!$model->getId()) {
                $this->messageManager->addError(__('This store no longer exists.'));
                $this->_redirect('*/*/');
                return;
            }
        }

        // Restore previously entered form data from session
        $data = $this->_session->getStoreData(true);
        if (isset($data['name'])) {
            $data['name'] = preg_replace('/ \(Warning: not connected\)/', '', $data['name']);
        }
        if (!empty($data)) {
            $model->setData($data);
        }
        if (isset($model['name'])) {
            $model['name'] = preg_replace('/ \(Warning: not connected\)/', '', $model['name']);
        }
        $this->_coreRegistry->register('mailchimp_stores', $model);

        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->_resultPageFactory->create();
        $resultPage->setActiveMenu('Ebizmarts_MailChimp::main_menu');
        $resultPage->getConfig()->getTitle()->prepend(__('Mailchimp Store'));

        return $resultPage;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::stores_edit');
    }
}


================================================
FILE: Controller/Adminhtml/Stores/Get.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 4/20/17 3:20 PM
 * @file: Get.php
 */
namespace Ebizmarts\MailChimp\Controller\Adminhtml\Stores;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\Controller\ResultFactory;

class Get extends Action
{
    const MAX_STORES = 200;

    /**
     * @var \Ebizmarts\MailChimp\Helper\Data
     */
    protected $_mhelper;
    /**
     * @var ResultFactory
     */
    protected $_resultFactory;

    /**
     * Get constructor.
     * @param Context $context
     * @param \Ebizmarts\MailChimp\Helper\Data $helper
     */
    public function __construct(
        Context $context,
        \Ebizmarts\MailChimp\Helper\Data $helper
    ) {

        parent::__construct($context);
        $this->_resultFactory       = $context->getResultFactory();
        $this->_mhelper                  = $helper;
    }
    public function execute()
    {
        $param = $this->getRequest()->getParams();
        $apiKey = $param['apikey'];
        $encrypt = $param['encrypt'];
        try {
            $api = $this->_mhelper->getApiByApiKey($apiKey, $encrypt);
            $stores = $api->ecommerce->stores->get(null, null, null, self::MAX_STORES);
            $result = [];
            $result['valid'] = 1;
            $result['stores'] = [];
            foreach ($stores['stores'] as $store) {
                if ($store['platform'] == \Ebizmarts\MailChimp\Helper\Data::PLATFORM) {
                    if ($store['list_id']=='') {
                        continue;
                    }
                    $list = $api->lists->getLists($store['list_id']);
                    $result['stores'][] = [
                        'id' => $store['id'],
                        'name' => $store['name'],
                        'list_name' => $list['name'],
                        'list_id' => $store['list_id']
                    ];
                    $result['valid'] = 1;
                }
            }
        } catch (\Mailchimp_Error $e) {
            $this->_mhelper->log($e->getFriendlyMessage());
            $result['valid'] = 0;
            $result['errormsg'] = $e->getTitle();
        }
        $resultJson = $this->_resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setData($result);
        return $resultJson;
    }
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Ebizmarts_MailChimp::config_mailchimp');
    }
}


================================================
FILE: Controller/Adminhtml/Stores/Index.php
================================================
<?php
/**
 * mc-magento2 Magento Component
 *
 * @category Ebizmarts
 * @package mc-magento2
 * @author Ebizmarts Team <info@ebizmarts.com>
 * @copyright Ebizmarts (http://ebizmarts.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @date: 3/24/17 10:38 AM
 * @file: Index.php
 */
namespace Ebizmarts\MailChimp\Controller\Adminhtml\Stores;

use Ebizmarts\MailChimp\Controller\Adminhtml\Stores;

class Index extends Stores
{
    public function execute()
    {
        $this->_mhelper->loadStores();
        $page = $this->_resultPageFac
Download .txt
gitextract_1npkxmtb/

├── Block/
│   ├── Adminhtml/
│   │   ├── Customer/
│   │   │   └── Edit/
│   │   │       └── Tabs/
│   │   │           ├── Mailchimp.php
│   │   │           └── View/
│   │   │               └── Customer.php
│   │   ├── Stores/
│   │   │   ├── Edit/
│   │   │   │   ├── Form.php
│   │   │   │   ├── Tab/
│   │   │   │   │   ├── Address.php
│   │   │   │   │   └── Info.php
│   │   │   │   └── Tabs.php
│   │   │   └── Edit.php
│   │   └── System/
│   │       └── Config/
│   │           ├── Account.php
│   │           ├── CreateAbandonedCart.php
│   │           ├── CreateWebhook.php
│   │           ├── Date.php
│   │           ├── DeleteStore.php
│   │           ├── Fieldset/
│   │           │   └── Hint.php
│   │           ├── FixMailchimpJS.php
│   │           ├── Form/
│   │           │   └── Field/
│   │           │       ├── CustomerMap.php
│   │           │       ├── MailchimpMap.php
│   │           │       └── VarsMap.php
│   │           ├── OauthWizard.php
│   │           ├── ResetErrors.php
│   │           ├── ResetErrorsNoRetry.php
│   │           ├── ResetStore.php
│   │           ├── ResyncProducts.php
│   │           └── ResyncSubscriber.php
│   ├── Catcher.php
│   ├── Checkout/
│   │   └── Success.php
│   ├── Loadquote.php
│   ├── Mailchimpjs.php
│   ├── Newsletter.php
│   └── Subscribe.php
├── CHANGELOG.md
├── CONTRIBUTING.md
├── Controller/
│   ├── Adminhtml/
│   │   ├── Batch/
│   │   │   ├── GetResponse.php
│   │   │   └── Index.php
│   │   ├── Carts/
│   │   │   └── Index.php
│   │   ├── Cron/
│   │   │   └── Index.php
│   │   ├── Ecommerce/
│   │   │   ├── CreateWebhook.php
│   │   │   ├── DeleteStore.php
│   │   │   ├── FixMailchimpJS.php
│   │   │   ├── GetInterest.php
│   │   │   ├── Getaccountdetails.php
│   │   │   ├── Register.php
│   │   │   ├── ResetLocalErrors.php
│   │   │   ├── ResetLocalErrorsNoRetry.php
│   │   │   ├── ResetStore.php
│   │   │   ├── ResyncProducts.php
│   │   │   ├── ResyncSubscribers.php
│   │   │   └── SyncLog.php
│   │   ├── Errors/
│   │   │   ├── Getresponse.php
│   │   │   └── Index.php
│   │   ├── Lists/
│   │   │   └── Get.php
│   │   ├── Orders/
│   │   │   ├── Campaign.php
│   │   │   └── Member.php
│   │   ├── Stores/
│   │   │   ├── Delete.php
│   │   │   ├── Edit.php
│   │   │   ├── Get.php
│   │   │   ├── Index.php
│   │   │   └── Save.php
│   │   └── Stores.php
│   ├── Campaign/
│   │   └── Check.php
│   ├── Cart/
│   │   └── Loadquote.php
│   ├── Checkout/
│   │   └── Success.php
│   └── WebHook/
│       └── Index.php
├── Cron/
│   ├── BatchesClean.php
│   ├── Ecommerce.php
│   ├── ErrorsClean.php
│   ├── GenerateStatistics.php
│   ├── SyncStatistics.php
│   ├── Webhook.php
│   └── WebhookClean.php
├── Helper/
│   ├── Data.php
│   ├── Http.php
│   ├── Sync.php
│   └── VarsMap.php
├── ISSUE_TEMPLATE.md
├── LICENSE.txt
├── Model/
│   ├── Api/
│   │   ├── Cart.php
│   │   ├── Customer.php
│   │   ├── Order.php
│   │   ├── Product.php
│   │   ├── PromoCodes.php
│   │   ├── PromoRules.php
│   │   ├── Result.php
│   │   └── Subscriber.php
│   ├── Config/
│   │   ├── Backend/
│   │   │   ├── ApiKey.php
│   │   │   ├── MonkeyList.php
│   │   │   ├── MonkeyStore.php
│   │   │   └── VarsMap.php
│   │   ├── ModuleVersion.php
│   │   └── Source/
│   │       ├── ApiKey.php
│   │       ├── CampaignAction.php
│   │       ├── CleanPeriod.php
│   │       ├── Cmspage.php
│   │       ├── Details.php
│   │       ├── Interest.php
│   │       ├── MonkeyList.php
│   │       ├── MonkeyStore.php
│   │       ├── Months.php
│   │       ├── Timeout.php
│   │       └── WebhookDelete.php
│   ├── HTTP/
│   │   └── Client/
│   │       └── Curl.php
│   ├── Logger/
│   │   ├── Handler.php
│   │   └── Logger.php
│   ├── MailChimpErrors.php
│   ├── MailChimpInterestGroup.php
│   ├── MailChimpStores.php
│   ├── MailChimpSyncBatches.php
│   ├── MailChimpSyncEcommerce.php
│   ├── MailChimpSyncEcommerceFactory.php
│   ├── MailChimpWebhookRequest.php
│   ├── MailchimpNotification.php
│   ├── Plugin/
│   │   ├── AccountManagement.php
│   │   ├── Coupon.php
│   │   ├── Creditmemo.php
│   │   ├── Invoice.php
│   │   ├── Newsletter/
│   │   │   └── Save.php
│   │   ├── Quote.php
│   │   ├── Ship.php
│   │   └── Subscriber.php
│   └── ResourceModel/
│       ├── Carts/
│       │   └── Collection.php
│       ├── MailChimpErrors.php
│       ├── MailChimpInterestGroup/
│       │   └── Collection.php
│       ├── MailChimpInterestGroup.php
│       ├── MailChimpStores/
│       │   ├── Collection.php
│       │   └── Grid/
│       │       └── Collection.php
│       ├── MailChimpStores.php
│       ├── MailChimpSyncBatches/
│       │   └── Collection.php
│       ├── MailChimpSyncBatches.php
│       ├── MailChimpSyncEcommerce/
│       │   └── Collection.php
│       ├── MailChimpSyncEcommerce.php
│       ├── MailChimpWebhookRequest/
│       │   └── Collection.php
│       ├── MailChimpWebhookRequest.php
│       ├── MailchimpNotification/
│       │   └── Collection.php
│       ├── MailchimpNotification.php
│       └── Schedule/
│           └── Collection.php
├── Observer/
│   ├── Adminhtml/
│   │   ├── Customer/
│   │   │   └── SaveAfter.php
│   │   └── Product/
│   │       ├── DeleteAfter.php
│   │       ├── ImportAfter.php
│   │       └── SaveAfter.php
│   ├── ConfigObserver.php
│   ├── Customer/
│   │   └── SaveBefore.php
│   ├── Sales/
│   │   └── Order/
│   │       ├── SaveAfter.php
│   │       ├── SubmitAfter.php
│   │       └── SubmitBefore.php
│   ├── SalesRule/
│   │   └── Rule/
│   │       ├── DeleteAfter.php
│   │       └── SaveAfter.php
│   └── Subscriber/
│       └── SaveAfter.php
├── README.md
├── Setup/
│   ├── InstallData.php
│   ├── InstallSchema.php
│   ├── Uninstall.php
│   ├── UpgradeData.php
│   └── UpgradeSchema.php
├── Ui/
│   └── Component/
│       ├── Batch/
│       │   └── Grid/
│       │       └── Column/
│       │           └── Batches.php
│       ├── Carts/
│       │   └── Grid/
│       │       └── Column/
│       │           ├── Actions.php
│       │           ├── Customer.php
│       │           └── Mailchimp.php
│       ├── Errors/
│       │   └── Grid/
│       │       └── Column/
│       │           └── Batch.php
│       ├── Listing/
│       │   └── Column/
│       │       ├── Customers.php
│       │       ├── Monkey.php
│       │       └── Products.php
│       └── Stores/
│           └── Grid/
│               └── Column/
│                   └── Actions.php
├── composer.json
├── etc/
│   ├── acl.xml
│   ├── adminhtml/
│   │   ├── events.xml
│   │   ├── menu.xml
│   │   ├── routes.xml
│   │   └── system.xml
│   ├── config.xml
│   ├── cron_groups.xml
│   ├── crontab.xml
│   ├── di.xml
│   ├── events.xml
│   ├── fieldset.xml
│   ├── frontend/
│   │   ├── di.xml
│   │   ├── events.xml
│   │   └── routes.xml
│   └── module.xml
├── i18n/
│   ├── es_ES.csv
│   ├── fr_FR.csv
│   └── it_IT.csv
├── modman
├── registration.php
└── view/
    ├── adminhtml/
    │   ├── layout/
    │   │   ├── customer_index_edit.xml
    │   │   ├── default.xml
    │   │   ├── mailchimp_batch_index.xml
    │   │   ├── mailchimp_carts_index.xml
    │   │   ├── mailchimp_cron_index.xml
    │   │   ├── mailchimp_errors_index.xml
    │   │   ├── mailchimp_stores_edit.xml
    │   │   ├── mailchimp_stores_grid.xml
    │   │   └── mailchimp_stores_index.xml
    │   ├── requirejs-config.js
    │   ├── templates/
    │   │   ├── customer/
    │   │   │   └── edit/
    │   │   │       └── tabs/
    │   │   │           └── mailchimp.phtml
    │   │   ├── system/
    │   │   │   └── config/
    │   │   │       ├── create_abandonedcart_automation.phtml
    │   │   │       ├── createwebhook.phtml
    │   │   │       ├── deletestore.phtml
    │   │   │       ├── fieldset/
    │   │   │       │   └── hint.phtml
    │   │   │       ├── fixmailchimpjs.phtml
    │   │   │       ├── js.phtml
    │   │   │       ├── oauth_wizard.phtml
    │   │   │       ├── reseterrors.phtml
    │   │   │       ├── reseterrorsnoretry.phtml
    │   │   │       ├── resetstore.phtml
    │   │   │       ├── resyncproducts.phtml
    │   │   │       └── resyncsubscriber.phtml
    │   │   └── tab/
    │   │       └── view.phtml
    │   ├── ui_component/
    │   │   ├── customer_listing.xml
    │   │   ├── mailchimp_batch_grid.xml
    │   │   ├── mailchimp_carts_grid.xml
    │   │   ├── mailchimp_cron_grid.xml
    │   │   ├── mailchimp_errors_grid.xml
    │   │   ├── mailchimp_stores_grid.xml
    │   │   ├── product_listing.xml
    │   │   └── sales_order_grid.xml
    │   └── web/
    │       ├── css/
    │       │   └── styles.css
    │       └── js/
    │           ├── apikey.js
    │           ├── configapikey.js
    │           └── mailchimpconfirmation.js
    └── frontend/
        ├── layout/
        │   ├── checkout_onepage_success.xml
        │   ├── default.xml
        │   ├── mailchimp_cart_loadquote.xml
        │   └── newsletter_manage_index.xml
        ├── requirejs-config.js
        ├── templates/
        │   ├── catcher.phtml
        │   ├── checkout/
        │   │   └── order/
        │   │       └── success.phtml
        │   ├── footer.phtml
        │   ├── form/
        │   │   └── newsletter.phtml
        │   ├── loadquote.phtml
        │   └── mailchimpjs.phtml
        └── web/
            └── js/
                └── campaigncatcher.js
Download .txt
SYMBOL INDEX (759 symbols across 156 files)

FILE: Block/Adminhtml/Customer/Edit/Tabs/Mailchimp.php
  class Mailchimp (line 21) | class Mailchimp extends \Magento\Backend\Block\Template implements TabIn...
    method __construct (line 41) | public function __construct(
    method getCustomerId (line 54) | public function getCustomerId()
    method getTabLabel (line 62) | public function getTabLabel()
    method getTabTitle (line 70) | public function getTabTitle()
    method canShowTab (line 78) | public function canShowTab()
    method isHidden (line 89) | public function isHidden()
    method getTabClass (line 102) | public function getTabClass()
    method getTabUrl (line 112) | public function getTabUrl()
    method isAjaxLoaded (line 122) | public function isAjaxLoaded()

FILE: Block/Adminhtml/Customer/Edit/Tabs/View/Customer.php
  class Customer (line 16) | class Customer extends \Magento\Backend\Block\Template
    method __construct (line 40) | public function __construct(
    method getInterest (line 54) | public function getInterest()

FILE: Block/Adminhtml/Stores/Edit.php
  class Edit (line 20) | class Edit extends Container
    method __construct (line 32) | public function __construct(
    method _construct (line 41) | protected function _construct()
    method getHeaderText (line 74) | public function getHeaderText()

FILE: Block/Adminhtml/Stores/Edit/Form.php
  class Form (line 18) | class Form extends Generic
    method _prepareForm (line 20) | protected function _prepareForm()

FILE: Block/Adminhtml/Stores/Edit/Tab/Address.php
  class Address (line 21) | class Address extends Generic implements TabInterface
    method __construct (line 36) | public function __construct(
    method _prepareForm (line 48) | protected function _prepareForm()
    method getTabLabel (line 123) | public function getTabLabel()
    method getTabTitle (line 127) | public function getTabTitle()
    method canShowTab (line 131) | public function canShowTab()
    method isHidden (line 135) | public function isHidden()

FILE: Block/Adminhtml/Stores/Edit/Tab/Info.php
  class Info (line 22) | class Info extends Generic implements TabInterface
    method __construct (line 57) | public function __construct(
    method _prepareForm (line 77) | protected function _prepareForm()
    method getTabLabel (line 226) | public function getTabLabel()
    method getTabTitle (line 230) | public function getTabTitle()
    method canShowTab (line 234) | public function canShowTab()
    method isHidden (line 238) | public function isHidden()

FILE: Block/Adminhtml/Stores/Edit/Tabs.php
  class Tabs (line 18) | class Tabs extends WidgetTabs
    method _construct (line 25) | protected function _construct()
    method _beforeToHtml (line 36) | protected function _beforeToHtml()

FILE: Block/Adminhtml/System/Config/Account.php
  class Account (line 14) | class Account extends \Magento\Config\Block\System\Config\Form\Field
    method _getElementHtml (line 16) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...

FILE: Block/Adminhtml/System/Config/CreateAbandonedCart.php
  class CreateAbandonedCart (line 14) | class CreateAbandonedCart extends \Magento\Config\Block\System\Config\Fo...
    method _getElementHtml (line 20) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...
    method authorizeRequestUrl (line 34) | public function authorizeRequestUrl()

FILE: Block/Adminhtml/System/Config/CreateWebhook.php
  class CreateWebhook (line 10) | class CreateWebhook extends \Magento\Config\Block\System\Config\Form\Field
    method __construct (line 23) | public function __construct(
    method _construct (line 33) | protected function _construct()
    method _getElementHtml (line 39) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...
    method getButtonHtml (line 52) | public function getButtonHtml(\Magento\Framework\Data\Form\Element\Abs...
    method getAjaxCreateWebhookUrl (line 63) | public function getAjaxCreateWebhookUrl()

FILE: Block/Adminhtml/System/Config/Date.php
  class Date (line 16) | class Date extends \Magento\Config\Block\System\Config\Form\Field
    method render (line 18) | public function render(\Magento\Framework\Data\Form\Element\AbstractEl...

FILE: Block/Adminhtml/System/Config/DeleteStore.php
  class DeleteStore (line 16) | class DeleteStore extends \Magento\Config\Block\System\Config\Form\Field
    method __construct (line 29) | public function __construct(
    method _construct (line 39) | protected function _construct()
    method _getElementHtml (line 45) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...
    method getButtonHtml (line 58) | public function getButtonHtml(\Magento\Framework\Data\Form\Element\Abs...
    method getAjaxCheckUrl (line 69) | public function getAjaxCheckUrl()

FILE: Block/Adminhtml/System/Config/Fieldset/Hint.php
  class Hint (line 14) | class Hint extends \Magento\Backend\Block\Template implements
    method __construct (line 46) | public function __construct(
    method render (line 63) | public function render(\Magento\Framework\Data\Form\Element\AbstractEl...
    method getModuleVersion (line 68) | public function getModuleVersion()
    method getHasApiKey (line 72) | public function getHasApiKey()
    method getScope (line 81) | public function getScope()
    method getScopeId (line 92) | public function getScopeId()
    method getRegisterToken (line 103) | public function getRegisterToken()

FILE: Block/Adminhtml/System/Config/FixMailchimpJS.php
  class FixMailchimpJS (line 10) | class FixMailchimpJS extends \Magento\Config\Block\System\Config\Form\Field
    method __construct (line 23) | public function __construct(
    method _construct (line 33) | protected function _construct()
    method _getElementHtml (line 39) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...

FILE: Block/Adminhtml/System/Config/Form/Field/CustomerMap.php
  class CustomerMap (line 16) | class CustomerMap extends \Magento\Config\Block\System\Config\Form\Field...
    method _getVarsRenderer (line 24) | protected function _getVarsRenderer()
    method _getMailchimpRenderer (line 36) | protected function _getMailchimpRenderer()
    method _prepareToRender (line 49) | protected function _prepareToRender()
    method _prepareArrayRow (line 63) | protected function _prepareArrayRow(\Magento\Framework\DataObject $row)

FILE: Block/Adminhtml/System/Config/Form/Field/MailchimpMap.php
  class MailchimpMap (line 16) | class MailchimpMap extends \Magento\Framework\View\Element\Html\Select
    method __construct (line 38) | public function __construct(
    method _getMailchimpTags (line 51) | protected function _getMailchimpTags()
    method setInputName (line 87) | public function setInputName($value)
    method _toHtml (line 97) | public function _toHtml()

FILE: Block/Adminhtml/System/Config/Form/Field/VarsMap.php
  class VarsMap (line 16) | class VarsMap extends \Magento\Framework\View\Element\Html\Select
    method __construct (line 28) | public function __construct(
    method _getAddressAtt (line 37) | protected function _getAddressAtt()
    method _getBindableAttributes (line 59) | protected function _getBindableAttributes()
    method _getCustomerAtt (line 72) | protected function _getCustomerAtt()
    method setInputName (line 87) | public function setInputName($value)
    method _toHtml (line 97) | public function _toHtml()

FILE: Block/Adminhtml/System/Config/OauthWizard.php
  class OauthWizard (line 14) | class OauthWizard extends \Magento\Config\Block\System\Config\Form\Field
    method _getElementHtml (line 23) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...
    method authorizeRequestUrl (line 37) | public function authorizeRequestUrl()

FILE: Block/Adminhtml/System/Config/ResetErrors.php
  class ResetErrors (line 16) | class ResetErrors extends \Magento\Config\Block\System\Config\Form\Field
    method __construct (line 29) | public function __construct(
    method _construct (line 39) | protected function _construct()
    method _getElementHtml (line 45) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...
    method getButtonHtml (line 58) | public function getButtonHtml(\Magento\Framework\Data\Form\Element\Abs...
    method getAjaxCheckUrl (line 69) | public function getAjaxCheckUrl()

FILE: Block/Adminhtml/System/Config/ResetErrorsNoRetry.php
  class ResetErrorsNoRetry (line 16) | class ResetErrorsNoRetry extends \Magento\Config\Block\System\Config\For...
    method __construct (line 29) | public function __construct(
    method _construct (line 39) | protected function _construct()
    method _getElementHtml (line 45) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...
    method getButtonHtml (line 58) | public function getButtonHtml(\Magento\Framework\Data\Form\Element\Abs...
    method getAjaxCheckUrl (line 69) | public function getAjaxCheckUrl()

FILE: Block/Adminhtml/System/Config/ResetStore.php
  class ResetStore (line 16) | class ResetStore extends \Magento\Config\Block\System\Config\Form\Field
    method __construct (line 29) | public function __construct(
    method _construct (line 39) | protected function _construct()
    method _getElementHtml (line 45) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...
    method getButtonHtml (line 58) | public function getButtonHtml(\Magento\Framework\Data\Form\Element\Abs...
    method getAjaxCheckUrl (line 69) | public function getAjaxCheckUrl()

FILE: Block/Adminhtml/System/Config/ResyncProducts.php
  class ResyncProducts (line 10) | class ResyncProducts extends \Magento\Config\Block\System\Config\Form\Field
    method __construct (line 23) | public function __construct(
    method _construct (line 33) | protected function _construct()
    method _getElementHtml (line 39) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...

FILE: Block/Adminhtml/System/Config/ResyncSubscriber.php
  class ResyncSubscriber (line 10) | class ResyncSubscriber extends \Magento\Config\Block\System\Config\Form\...
    method __construct (line 23) | public function __construct(
    method _construct (line 33) | protected function _construct()
    method _getElementHtml (line 39) | protected function _getElementHtml(\Magento\Framework\Data\Form\Elemen...

FILE: Block/Catcher.php
  class Catcher (line 17) | class Catcher extends Template

FILE: Block/Checkout/Success.php
  class Success (line 15) | class Success extends \Magento\Framework\View\Element\Template
    method __construct (line 47) | public function __construct(
    method getInterest (line 64) | public function getInterest()
    method getValues (line 75) | protected function getValues($category)
    method getMessageBefore (line 83) | public function getMessageBefore()
    method getMessageAfter (line 87) | public function getMessageAfter()
    method getFormUrl (line 91) | public function getFormUrl()
    method _toHtml (line 96) | public function _toHtml()

FILE: Block/Loadquote.php
  class Loadquote (line 13) | class Loadquote extends Template

FILE: Block/Mailchimpjs.php
  class Mailchimpjs (line 18) | class Mailchimpjs extends \Magento\Framework\View\Element\Template
    method __construct (line 36) | public function __construct(
    method getJsUrl (line 46) | public function getJsUrl()

FILE: Block/Newsletter.php
  class Newsletter (line 16) | class Newsletter extends \Magento\Framework\View\Element\Template
    method __construct (line 39) | public function __construct(
    method getInterest (line 53) | public function getInterest()
    method getFormUrl (line 60) | public function getFormUrl()

FILE: Block/Subscribe.php
  class Subscribe (line 8) | class Subscribe extends \Magento\Newsletter\Block\Subscribe
    method __construct (line 24) | public function __construct(
    method getPopupUrl (line 35) | public function getPopupUrl()

FILE: Controller/Adminhtml/Batch/GetResponse.php
  class GetResponse (line 18) | class GetResponse extends \Magento\Backend\App\Action
    method __construct (line 50) | public function __construct(
    method execute (line 65) | public function execute()
    method _isAllowed (line 108) | protected function _isAllowed()

FILE: Controller/Adminhtml/Batch/Index.php
  class Index (line 15) | class Index extends \Magento\Backend\App\Action
    method __construct (line 27) | public function __construct(
    method execute (line 35) | public function execute()
    method _isAllowed (line 41) | protected function _isAllowed()

FILE: Controller/Adminhtml/Carts/Index.php
  class Index (line 5) | class Index extends \Magento\Backend\App\Action
    method __construct (line 17) | public function __construct(
    method execute (line 25) | public function execute()
    method _isAllowed (line 31) | protected function _isAllowed()

FILE: Controller/Adminhtml/Cron/Index.php
  class Index (line 15) | class Index extends \Magento\Backend\App\Action
    method __construct (line 27) | public function __construct(
    method execute (line 35) | public function execute()
    method _isAllowed (line 41) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/CreateWebhook.php
  class CreateWebhook (line 20) | class CreateWebhook extends \Magento\Backend\App\Action
    method __construct (line 43) | public function __construct(
    method execute (line 57) | public function execute()
    method _isAllowed (line 85) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/DeleteStore.php
  class DeleteStore (line 20) | class DeleteStore extends \Magento\Backend\App\Action
    method __construct (line 47) | public function __construct(
    method execute (line 62) | public function execute()
    method _isAllowed (line 99) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/FixMailchimpJS.php
  class FixMailchimpJS (line 21) | class FixMailchimpJS extends \Magento\Backend\App\Action
    method __construct (line 44) | public function __construct(
    method execute (line 59) | public function execute()
    method _isAllowed (line 87) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/GetInterest.php
  class GetInterest (line 20) | class GetInterest extends Action
    method __construct (line 41) | public function __construct(
    method execute (line 56) | public function execute()
    method _isAllowed (line 89) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/Getaccountdetails.php
  class Getaccountdetails (line 21) | class Getaccountdetails extends Action
    method __construct (line 41) | public function __construct(
    method execute (line 52) | public function execute()
    method _isAllowed (line 109) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/Register.php
  class Register (line 15) | class Register extends Action
    method __construct (line 51) | public function __construct(
    method execute (line 69) | public function execute()
    method _isAllowed (line 103) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/ResetLocalErrors.php
  class ResetLocalErrors (line 21) | class ResetLocalErrors extends \Magento\Backend\App\Action
    method __construct (line 47) | public function __construct(
    method execute (line 61) | public function execute()
    method _isAllowed (line 102) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/ResetLocalErrorsNoRetry.php
  class ResetLocalErrorsNoRetry (line 21) | class ResetLocalErrorsNoRetry extends \Magento\Backend\App\Action
    method __construct (line 47) | public function __construct(
    method execute (line 62) | public function execute()
    method _isAllowed (line 103) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/ResetStore.php
  class ResetStore (line 20) | class ResetStore extends \Magento\Backend\App\Action
    method __construct (line 42) | public function __construct(
    method execute (line 55) | public function execute()
    method _isAllowed (line 92) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/ResyncProducts.php
  class ResyncProducts (line 20) | class ResyncProducts extends \Magento\Backend\App\Action
    method __construct (line 46) | public function __construct(
    method execute (line 60) | public function execute()
    method _isAllowed (line 80) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/ResyncSubscribers.php
  class ResyncSubscribers (line 21) | class ResyncSubscribers extends \Magento\Backend\App\Action
    method __construct (line 47) | public function __construct(
    method execute (line 62) | public function execute()
    method _isAllowed (line 82) | protected function _isAllowed()

FILE: Controller/Adminhtml/Ecommerce/SyncLog.php
  class SyncLog (line 12) | class SyncLog extends Action
    method __construct (line 26) | public function __construct(
    method execute (line 38) | public function execute()

FILE: Controller/Adminhtml/Errors/Getresponse.php
  class Getresponse (line 18) | class Getresponse extends \Magento\Backend\App\Action
    method __construct (line 50) | public function __construct(
    method execute (line 65) | public function execute()
    method _isAllowed (line 108) | protected function _isAllowed()

FILE: Controller/Adminhtml/Errors/Index.php
  class Index (line 15) | class Index extends \Magento\Backend\App\Action
    method __construct (line 27) | public function __construct(
    method execute (line 35) | public function execute()
    method _isAllowed (line 41) | protected function _isAllowed()

FILE: Controller/Adminhtml/Lists/Get.php
  class Get (line 19) | class Get extends Action
    method __construct (line 42) | public function __construct(
    method execute (line 53) | public function execute()
    method _isAllowed (line 74) | protected function _isAllowed()

FILE: Controller/Adminhtml/Orders/Campaign.php
  class Campaign (line 11) | class Campaign extends Action
    method __construct (line 32) | public function __construct(
    method execute (line 43) | public function execute()
    method _isAllowed (line 59) | protected function _isAllowed()

FILE: Controller/Adminhtml/Orders/Member.php
  class Member (line 11) | class Member extends Action
    method __construct (line 32) | public function __construct(
    method execute (line 43) | public function execute()
    method _isAllowed (line 61) | protected function _isAllowed()

FILE: Controller/Adminhtml/Stores.php
  class Stores (line 22) | class Stores extends Action
    method __construct (line 49) | public function __construct(
    method execute (line 63) | public function execute()
    method _isAllowed (line 67) | protected function _isAllowed()

FILE: Controller/Adminhtml/Stores/Delete.php
  class Delete (line 16) | class Delete extends \Ebizmarts\MailChimp\Controller\Adminhtml\Stores
    method execute (line 18) | public function execute()
    method _isAllowed (line 37) | protected function _isAllowed()

FILE: Controller/Adminhtml/Stores/Edit.php
  class Edit (line 21) | class Edit extends \Ebizmarts\MailChimp\Controller\Adminhtml\Stores
    method execute (line 24) | public function execute()
    method _isAllowed (line 59) | protected function _isAllowed()

FILE: Controller/Adminhtml/Stores/Get.php
  class Get (line 19) | class Get extends Action
    method __construct (line 37) | public function __construct(
    method execute (line 46) | public function execute()
    method _isAllowed (line 81) | protected function _isAllowed()

FILE: Controller/Adminhtml/Stores/Index.php
  class Index (line 17) | class Index extends Stores
    method execute (line 19) | public function execute()
    method _isAllowed (line 26) | protected function _isAllowed()

FILE: Controller/Adminhtml/Stores/Save.php
  class Save (line 16) | class Save extends \Ebizmarts\MailChimp\Controller\Adminhtml\Stores
    method execute (line 18) | public function execute()
    method _updateMailchimp (line 50) | protected function _updateMailchimp($formData)
    method _isAllowed (line 112) | protected function _isAllowed()

FILE: Controller/Campaign/Check.php
  class Check (line 19) | class Check extends \Magento\Framework\App\Action\Action
    method __construct (line 36) | public function __construct(
    method execute (line 48) | public function execute()

FILE: Controller/Cart/Loadquote.php
  class Loadquote (line 17) | class Loadquote extends Action
    method __construct (line 67) | public function __construct(
    method execute (line 96) | public function execute()

FILE: Controller/Checkout/Success.php
  class Success (line 18) | class Success extends \Magento\Framework\App\Action\Action
    method __construct (line 54) | public function __construct(
    method execute (line 72) | public function execute()
    method _updateSubscriber (line 115) | protected function _updateSubscriber(

FILE: Controller/WebHook/Index.php
  class Index (line 25) | class Index extends Action implements CsrfAwareActionInterface
    method __construct (line 49) | public function __construct(
    method createCsrfValidationException (line 65) | public function createCsrfValidationException(
    method validateForCsrf (line 73) | public function validateForCsrf(RequestInterface $request): ?bool
    method execute (line 78) | public function execute()

FILE: Cron/BatchesClean.php
  class BatchesClean (line 15) | class BatchesClean
    method __construct (line 36) | public function __construct(
    method execute (line 45) | public function execute()

FILE: Cron/Ecommerce.php
  class Ecommerce (line 16) | class Ecommerce
    method __construct (line 87) | public function __construct(
    method execute (line 118) | public function execute()
    method _processStore (line 198) | protected function _processStore($storeId, $mailchimpStoreId, $listId)
    method updateSyncFlagData (line 308) | protected function updateSyncFlagData($storeId, $mailchimpStoreId)
    method apiUpdateSyncFlag (line 323) | protected function apiUpdateSyncFlag($storeId, $mailchimpStoreId)
    method _ping (line 346) | protected function _ping($storeId)
    method _showResume (line 357) | protected function _showResume($batchId, $storeId)
    method _saveRequest (line 363) | protected function _saveRequest($resquest)
    method encodeOperations (line 370) | protected function encodeOperations($operations)
    method markWithError (line 399) | protected function markWithError($operations, $mailchimpStoreId, $listId)

FILE: Cron/ErrorsClean.php
  class ErrorsClean (line 16) | class ErrorsClean
    method __construct (line 37) | public function __construct(
    method execute (line 47) | public function execute()

FILE: Cron/GenerateStatistics.php
  class GenerateStatistics (line 16) | class GenerateStatistics
    method __construct (line 62) | public function __construct(
    method execute (line 86) | public function execute()
    method getMagentoTotals (line 108) | private function getMagentoTotals($storeId)
    method getMailchimpTotals (line 180) | private function getMailchimpTotals($storeId)
    method getWebhooks (line 222) | private function getWebhooks($api, $listId)
    method getBatches (line 235) | private function getBatches($storeId,$mailchimpStoreId)
    method getJobs (line 266) | private function getJobs()

FILE: Cron/SyncStatistics.php
  class SyncStatistics (line 12) | class SyncStatistics
    method __construct (line 38) | public function __construct(
    method execute (line 55) | public function execute()
    method getCollection (line 114) | private function getCollection()
    method syncData (line 123) | private function syncData($data)
    method cleanData (line 182) | private function cleanData()

FILE: Cron/Webhook.php
  class Webhook (line 17) | class Webhook
    method __construct (line 68) | public function __construct(
    method execute (line 84) | public function execute()
    method processWebhooks (line 88) | public function processWebhooks()
    method _subscribe (line 133) | protected function _subscribe($data)
    method _unsubscribe (line 164) | protected function _unsubscribe($data)
    method _clean (line 194) | protected function _clean($data)
    method _updateEmail (line 204) | protected function _updateEmail($data)
    method _profile (line 227) | protected function _profile($data)
    method _processMerges (line 273) | protected function _processMerges(\Magento\Customer\Model\Customer $cu...
    method _subscribeMember (line 335) | protected function _subscribeMember(\Magento\Newsletter\Model\Subscrib...
    method _loadGroups (line 343) | protected function _loadGroups()
    method _getGroups (line 370) | protected function _getGroups($groups, $cat)

FILE: Cron/WebhookClean.php
  class WebhookClean (line 15) | class WebhookClean
    method __construct (line 31) | public function __construct(
    method execute (line 38) | public function execute()

FILE: Helper/Data.php
  class Data (line 20) | class Data extends \Magento\Framework\App\Helper\AbstractHelper
    method __construct (line 261) | public function __construct(
    method isMailChimpEnabled (line 329) | public function isMailChimpEnabled($store = null)
    method isSupportEnabled (line 333) | public function isSupportEnabled()
    method isDoubleOptInEnabled (line 341) | public function isDoubleOptInEnabled($store = null)
    method getApiKey (line 350) | public function getApiKey($store = null, $scope = null)
    method getTimeOut (line 355) | public function getTimeOut($store=null, $scope=null)
    method getApi (line 364) | public function getApi($store = null, $scope = null)
    method getBindableAttributes (line 377) | private function getBindableAttributes()
    method getCustomerAtts (line 388) | private function getCustomerAtts()
    method getAddressAtt (line 422) | private function getAddressAtt()
    method resetMapFields (line 457) | public function resetMapFields()
    method getMapFields (line 461) | public function getMapFields($storeId = null, $options=true)
    method getDateFormat (line 485) | public function getDateFormat()
    method getApiByApiKey (line 496) | public function getApiByApiKey($apiKey, $encrypted = false)
    method getConfigValue (line 515) | public function getConfigValue($path, $storeId = null, $scope = null)
    method deleteConfig (line 524) | public function deleteConfig($path, $storeId = null, $scope = null)
    method saveConfigValue (line 529) | public function saveConfigValue($path, $value, $storeId = null, $scope...
    method saveMCMinSyncing (line 538) | public function saveMCMinSyncing($mailchimpStoreId, $value, $storeId =...
    method getCartUrl (line 546) | public function getCartUrl($storeId, $cartId, $token)
    method getRedemptionUrl (line 559) | public function getRedemptionUrl($storeId, $couponId, $token)
    method getSuccessInterestUrl (line 572) | public function getSuccessInterestUrl($storeId)
    method getDefaultList (line 587) | public function getDefaultList($store = null)
    method getLogger (line 595) | public function getLogger()
    method log (line 604) | public function log($message, $store = null, $file = null)
    method saveNotification (line 610) | public function saveNotification($data)
    method getModuleVersion (line 622) | public function getModuleVersion()
    method deleteStore (line 631) | public function deleteStore($mailchimpStore)
    method markAllBatchesAs (line 643) | public function markAllBatchesAs($mailchimpStore, $fromStatus, $toStatus)
    method cancelAllPendingBatches (line 654) | public function cancelAllPendingBatches($mailchimpStore)
    method restoreAllCanceledBatches (line 659) | public function restoreAllCanceledBatches($mailchimpStore)
    method getMCStoreName (line 664) | public function getMCStoreName($storeId)
    method getBaserUrl (line 668) | public function getBaserUrl($storeId, $type)
    method createStore (line 672) | public function createStore($listId = null, $storeId)
    method getMCMinSyncDateFlag (line 700) | public function getMCMinSyncDateFlag($storeId = null)
    method getMCMinSyncDateFlagByMailchimpStore (line 708) | public function getMCMinSyncDateFlagByMailchimpStore($mailchimpStoreId...
    method getBaseDir (line 713) | public function getBaseDir()
    method getMergeVars (line 724) | public function getMergeVars(\Magento\Customer\Model\Customer $custome...
    method _getAddressValues (line 788) | private function _getAddressValues(\Magento\Customer\Model\Address\Abs...
    method getMergeVarsBySubscriber (line 823) | public function getMergeVarsBySubscriber(\Magento\Newsletter\Model\Sub...
    method getMergeVarsByCustomer (line 852) | public function getMergeVarsByCustomer(\Magento\Customer\Model\Custome...
    method getGeneralList (line 857) | public function getGeneralList($storeId)
    method getListForMailChimpStore (line 862) | public function getListForMailChimpStore($mailchimpStoreId, $apiKey)
    method getDateMicrotime (line 876) | public function getDateMicrotime()
    method loadStores (line 884) | public function loadStores()
    method saveJsUrl (line 956) | public function saveJsUrl($storeId, $scope = null, $mailChimpStoreId =...
    method getJsUrl (line 980) | public function getJsUrl($storeId)
    method getWebhooksKey (line 1004) | public function getWebhooksKey()
    method createWebHook (line 1013) | public function createWebHook($apikey, $listId, $scope=null, $scopeId=...
    method deleteWebHook (line 1043) | public function deleteWebHook($apikey, $listId)
    method loadListSubscribers (line 1071) | public function loadListSubscribers($listId, $mail)
    method getMagentoStoreIdsByListId (line 1084) | public function getMagentoStoreIdsByListId($listId)
    method loadListCustomers (line 1103) | public function loadListCustomers($listId, $email)
    method getTableName (line 1122) | public function getTableName($tableName, $conn = ResourceConnection::D...
    method getWebsiteId (line 1131) | public function getWebsiteId($storeId)
    method getInterest (line 1135) | public function getInterest($storeId)
    method getSubscriberInterest (line 1173) | public function getSubscriberInterest($subscriberId, $storeId, $intere...
    method getGmtDate (line 1218) | public function getGmtDate($format = null)
    method getGmtTimeStamp (line 1222) | public function getGmtTimeStamp()
    method getAllApiKeys (line 1226) | public function getAllApiKeys()
    method modifyCounter (line 1237) | public function modifyCounter($index, $increment = 1)
    method resetCounters (line 1245) | public function resetCounters($storeId = null)
    method getCounters (line 1265) | public function getCounters()
    method getTotalNewItemsSent (line 1269) | public function getTotalNewItemsSent()
    method serialize (line 1282) | public function serialize($data)
    method unserialize (line 1286) | public function unserialize($string)
    method isEmailSavingEnabled (line 1290) | public function isEmailSavingEnabled($storeId)
    method decrypt (line 1298) | public function decrypt($value)
    method encrypt (line 1302) | public function encrypt($value)
    method buttonPressed (line 1306) | public function buttonPressed($button, $result)
    method switchLog (line 1316) | public function switchLog($on)
    method sendCartEvent (line 1326) | public function sendCartEvent($quote)

FILE: Helper/Http.php
  class Http (line 8) | class Http
    method __construct (line 23) | public function __construct(
    method setUrl (line 37) | public function setUrl($url)
    method post (line 47) | public function post($body)
    method patch (line 53) | public function patch($id,$body)
    method get (line 59) | public function get($id)
    method put (line 65) | public function put($id,$body)
    method extractResponse (line 71) | public function extractResponse($response)

FILE: Helper/Sync.php
  class Sync (line 12) | class Sync extends AbstractHelper
    method __construct (line 33) | public function __construct(
    method saveEcommerceData (line 44) | public function saveEcommerceData(
    method getChimpSyncEcommerce (line 91) | public function getChimpSyncEcommerce($storeId, $id, $type)
    method markEcommerceAsDeleted (line 96) | public function markEcommerceAsDeleted($relatedId, $type, $relatedDele...
    method markEcommorceAsNotDeleted (line 100) | public function markEcommorceAsNotDeleted($relatedId, $type)
    method ecommerceDeleteAllByIdType (line 104) | public function ecommerceDeleteAllByIdType($id, $type, $mailchimpStoreId)
    method deleteAllByBatchId (line 108) | public function deleteAllByBatchId($batchId)
    method markRegisterAsModified (line 112) | public function markRegisterAsModified($registerId, $type)
    method deleteByTypeAndId (line 118) | public function deleteByTypeAndId($type, $id, $mailchimpStoreId)
    method markAllAsModifiedByIds (line 122) | public function markAllAsModifiedByIds($mailchimpStoreId, $ids, $type)
    method resyncAllSubscribers (line 126) | public function resyncAllSubscribers($mailchimpList)
    method resyncProducts (line 136) | public function resyncProducts($mailchimpList)
    method resetErrors (line 147) | public function resetErrors($mailchimpStore, $storeId, $retry)

FILE: Helper/VarsMap.php
  class VarsMap (line 16) | class VarsMap extends \Magento\Framework\App\Helper\AbstractHelper
    method __construct (line 30) | public function __construct(
    method makeArrayFieldValue (line 40) | public function makeArrayFieldValue($value)
    method makeStorableArrayFieldValue (line 46) | public function makeStorableArrayFieldValue($value)
    method isEncodedArrayFieldValue (line 57) | protected function isEncodedArrayFieldValue($value)
    method decodeArrayFieldValue (line 73) | protected function decodeArrayFieldValue(array $value)
    method serializeValue (line 90) | protected function serializeValue($value)
    method unserializeValue (line 108) | protected function unserializeValue($value)
    method encodeArrayFieldValue (line 120) | protected function encodeArrayFieldValue(array $value)

FILE: Model/Api/Cart.php
  class Cart (line 19) | class Cart
    method __construct (line 78) | public function __construct(
    method createBatchJson (line 106) | public function createBatchJson($magentoStoreId)
    method _getConvertedQuotes (line 150) | protected function _getConvertedQuotes($mailchimpStoreId, $magentoStor...
    method _getModifiedQuotes (line 227) | protected function _getModifiedQuotes($mailchimpStoreId, $magentoStoreId)
    method _getNewQuotes (line 356) | protected function _getNewQuotes($mailchimpStoreId, $magentoStoreId)
    method _getAllCartsByEmail (line 495) | protected function _getAllCartsByEmail($email, $mailchimpStoreId, $mag...
    method _makeCart (line 518) | protected function _makeCart(\Magento\Quote\Model\Quote $cart, $mailch...
    method _getCheckoutUrl (line 606) | protected function _getCheckoutUrl(\Magento\Quote\Model\Quote $cart, $...
    method _getCustomer (line 614) | protected function _getCustomer(\Magento\Quote\Model\Quote $cart, $mai...
    method _getQuoteCollection (line 685) | protected function _getQuoteCollection()
    method _getOrderCollection (line 693) | protected function _getOrderCollection()
    method _updateQuote (line 706) | protected function _updateQuote(

FILE: Model/Api/Customer.php
  class Customer (line 20) | class Customer
    method __construct (line 71) | public function __construct(
    method sendCustomers (line 93) | public function sendCustomers($storeId)
    method buildSubscriberData (line 176) | protected function buildSubscriberData(\Magento\Customer\Model\Custome...
    method isSubscriber (line 182) | protected function isSubscriber(\Magento\Customer\Model\Customer $cust...
    method _buildCustomerData (line 198) | protected function _buildCustomerData(\Magento\Customer\Model\Customer...
    method getOptin (line 264) | public function getOptin($storeId = 0)
    method _updateCustomer (line 273) | protected function _updateCustomer(

FILE: Model/Api/Order.php
  class Order (line 21) | class Order
    method __construct (line 104) | public function __construct(
    method sendOrders (line 144) | public function sendOrders($magentoStoreId)
    method _getCollection (line 155) | protected function _getCollection()
    method _getModifiedOrders (line 159) | protected function _getModifiedOrders($magentoStoreId)
    method _getNewOrders (line 235) | protected function _getNewOrders($magentoStoreId)
    method generatePOSTPayload (line 321) | protected function generatePOSTPayload(
    method _getMailChimpStatus (line 674) | protected function _getMailChimpStatus(\Magento\Sales\Model\Order $order)
    method _getPromoData (line 737) | protected function _getPromoData(\Magento\Sales\Model\Order $order)
    method getCampaign (line 768) | protected function getCampaign($store, $email)
    method _updateOrder (line 788) | protected function _updateOrder($storeId, $entityId, $sync_delta = nul...

FILE: Model/Api/Product.php
  class Product (line 19) | class Product
    method __construct (line 107) | public function __construct(
    method _sendProducts (line 141) | public function _sendProducts($magentoStoreId)
    method _markSpecialPrices (line 226) | protected function _markSpecialPrices($magentoStoreId, $mailchimpStoreId)
    method processDeletedProducts (line 291) | protected function processDeletedProducts($magentoStoreId, $mailchimpS...
    method deleteProduct (line 312) | protected function deleteProduct($mailchimpStoreId, $productId, $error)
    method _getCollection (line 333) | protected function _getCollection()
    method _getMailchimpCollection (line 337) | protected function _getMailchimpCollection()
    method _buildNewProductRequest (line 341) | protected function _buildNewProductRequest(
    method _buildOldProductRequest (line 389) | protected function _buildOldProductRequest(
    method _buildProductData (line 488) | protected function _buildProductData(
    method _getParent (line 618) | protected function _getParent($productId, $magentoStoreId)
    method getProductCategories (line 637) | protected function getProductCategories(\Magento\Catalog\Model\Product...
    method sendModifiedProduct (line 662) | public function sendModifiedProduct(\Magento\Sales\Model\Order $order,...
    method sendQuoteModifiedProduct (line 705) | public function sendQuoteModifiedProduct(\Magento\Quote\Model\Quote $q...
    method _getProductPrice (line 746) | protected function _getProductPrice(\Magento\Catalog\Model\Product $pr...
    method _updateProduct (line 762) | protected function _updateProduct(
    method _bundleVariants (line 788) | protected function _bundleVariants($product, $magentoStoreId)
    method _variantForBundle (line 827) | protected function _variantForBundle($product, $magentoStoreId, $price...

FILE: Model/Api/PromoCodes.php
  class PromoCodes (line 18) | class PromoCodes
    method __construct (line 61) | public function __construct(
    method sendCoupons (line 80) | public function sendCoupons($magentoStoreId)
    method _sendDeletedCoupons (line 93) | protected function _sendDeletedCoupons($mailchimpStoreId, $magentoStor...
    method _sendNewCoupons (line 123) | protected function _sendNewCoupons($mailchimpStoreId, $magentoStoreId)
    method generateCodeData (line 239) | protected function generateCodeData($item, $magentoStoreId)
    method _getRedemptionUrl (line 249) | protected function _getRedemptionUrl($code, $magentoStoreId)
    method _updateSyncData (line 256) | protected function _updateSyncData(

FILE: Model/Api/PromoRules.php
  class PromoRules (line 19) | class PromoRules
    method __construct (line 60) | public function __construct(
    method sendRules (line 75) | public function sendRules($magentoStoreId)
    method _getDeletedPromoRules (line 87) | protected function _getDeletedPromoRules($mailchimpStoreId, $magentoSt...
    method _getModifiedPromoRules (line 126) | protected function _getModifiedPromoRules($mailchimpStoreId, $magentoS...
    method getNewPromoRule (line 175) | public function getNewPromoRule($ruleId, $mailchimpStoreId, $magentoSt...
    method _generateRuleData (line 229) | private function _generateRuleData($rule)
    method _getMailChimpType (line 271) | private function _getMailChimpType($action, $shipping)
    method _getMailChimpTarget (line 294) | private function _getMailChimpTarget($action, $shipping)
    method _updateSyncData (line 320) | protected function _updateSyncData($storeId, $entityId, $sync_delta = ...

FILE: Model/Api/Result.php
  class Result (line 19) | class Result
    method __construct (line 60) | public function __construct(
    method processResponses (line 78) | public function processResponses($storeId, $isMailChimpStoreId = false...
    method getBatchResponse (line 126) | public function getBatchResponse($batchId, $storeId = null)
    method processEachResponseFile (line 187) | protected function processEachResponseFile($files, $batchId, $mailchim...
    method _updateSyncData (line 288) | private function _updateSyncData($mailchimpStoreId, $listId, $type, $i...

FILE: Model/Api/Subscriber.php
  class Subscriber (line 17) | class Subscriber
    method __construct (line 49) | public function __construct(
    method sendSubscribers (line 63) | public function sendSubscribers($storeId, $listId)
    method _buildSubscriberData (line 122) | protected function _buildSubscriberData(\Magento\Newsletter\Model\Subs...
    method _getInterest (line 139) | protected function _getInterest(\Magento\Newsletter\Model\Subscriber $...
    method _getMCStatus (line 163) | protected function _getMCStatus($status, $storeId)
    method deleteSubscriber (line 178) | public function deleteSubscriber(\Magento\Newsletter\Model\Subscriber ...
    method update (line 193) | public function update(\Magento\Newsletter\Model\Subscriber $subscriber)
    method _updateSubscriber (line 205) | protected function _updateSubscriber(

FILE: Model/Config/Backend/ApiKey.php
  class ApiKey (line 18) | class ApiKey extends \Magento\Framework\App\Config\Value
    method __construct (line 51) | public function __construct(
    method beforeSave (line 71) | public function beforeSave()

FILE: Model/Config/Backend/MonkeyList.php
  class MonkeyList (line 16) | class MonkeyList extends \Magento\Framework\App\Config\Value
    method __construct (line 49) | public function __construct(

FILE: Model/Config/Backend/MonkeyStore.php
  class MonkeyStore (line 18) | class MonkeyStore extends \Magento\Framework\App\Config\Value
    method __construct (line 58) | public function __construct(
    method beforeSave (line 80) | public function beforeSave()
    method getStore (line 152) | private function getStore($apiKey, $store)

FILE: Model/Config/Backend/VarsMap.php
  class VarsMap (line 16) | class VarsMap extends \Magento\Framework\App\Config\Value
    method __construct (line 39) | public function __construct(
    method _afterLoad (line 55) | protected function _afterLoad()
    method beforeSave (line 67) | public function beforeSave()

FILE: Model/Config/ModuleVersion.php
  class ModuleVersion (line 19) | class ModuleVersion
    method __construct (line 36) | public function __construct(ComponentRegistrarInterface $componentRegi...
    method getModuleVersion (line 41) | public function getModuleVersion($moduleName) : string

FILE: Model/Config/Source/ApiKey.php
  class ApiKey (line 15) | class ApiKey implements \Magento\Framework\Option\ArrayInterface
    method __construct (line 39) | public function __construct(
    method toOptionArray (line 59) | public function toOptionArray()
    method getAllApiKeys (line 70) | public function getAllApiKeys()
    method mask (line 74) | private function mask($str)

FILE: Model/Config/Source/CampaignAction.php
  class CampaignAction (line 5) | class CampaignAction implements \Magento\Framework\Option\ArrayInterface
    method toOptionArray (line 12) | public function toOptionArray()

FILE: Model/Config/Source/CleanPeriod.php
  class CleanPeriod (line 6) | class CleanPeriod implements OptionSourceInterface
    method toOptionArray (line 8) | public function toOptionArray() {

FILE: Model/Config/Source/Cmspage.php
  class Cmspage (line 16) | class Cmspage
    method __construct (line 25) | public function __construct(
    method toOptionArray (line 30) | public function toOptionArray()

FILE: Model/Config/Source/Details.php
  class Details (line 19) | class Details implements \Magento\Framework\Option\ArrayInterface
    method __construct (line 52) | public function __construct(
    method toOptionArray (line 156) | public function toOptionArray()
    method getDateSync (line 205) | private function getDateSync($mailchimpStoreId)

FILE: Model/Config/Source/Interest.php
  class Interest (line 16) | class Interest implements \Magento\Framework\Option\ArrayInterface
    method __construct (line 25) | public function __construct(
    method toOptionArray (line 54) | public function toOptionArray()
    method toArray (line 66) | public function toArray()

FILE: Model/Config/Source/MonkeyList.php
  class MonkeyList (line 16) | class MonkeyList implements \Magento\Framework\Option\ArrayInterface
    method __construct (line 25) | public function __construct(
    method toOptionArray (line 50) | public function toOptionArray()
    method toArray (line 62) | public function toArray()

FILE: Model/Config/Source/MonkeyStore.php
  class MonkeyStore (line 16) | class MonkeyStore implements \Magento\Framework\Option\ArrayInterface
    method __construct (line 25) | public function __construct(
    method toOptionArray (line 52) | public function toOptionArray()
    method toArray (line 76) | public function toArray()

FILE: Model/Config/Source/Months.php
  class Months (line 15) | class Months implements \Magento\Framework\Option\ArrayInterface
    method toOptionArray (line 17) | public function toOptionArray()

FILE: Model/Config/Source/Timeout.php
  class Timeout (line 5) | class Timeout implements \Magento\Framework\Option\ArrayInterface
    method toOptionArray (line 7) | public function toOptionArray()

FILE: Model/Config/Source/WebhookDelete.php
  class WebhookDelete (line 16) | class WebhookDelete implements \Magento\Framework\Option\ArrayInterface
    method toOptionArray (line 18) | public function toOptionArray()

FILE: Model/HTTP/Client/Curl.php
  class Curl (line 14) | class Curl implements \Magento\Framework\HTTP\ClientInterface
    method setTimeout (line 111) | public function setTimeout($value)
    method __construct (line 119) | public function __construct($sslVersion = null)
    method setHeaders (line 130) | public function setHeaders($headers)
    method addHeader (line 142) | public function addHeader($name, $value)
    method removeHeader (line 153) | public function removeHeader($name)
    method setCredentials (line 167) | public function setCredentials($login, $pass)
    method addCookie (line 180) | public function addCookie($name, $value)
    method removeCookie (line 191) | public function removeCookie($name)
    method setCookies (line 202) | public function setCookies($cookies)
    method removeCookies (line 212) | public function removeCookies()
    method get (line 223) | public function get($uri)
    method post (line 240) | public function post($uri, $params)
    method patch (line 244) | public function patch($uri, $params)
    method put (line 248) | public function put($uri, $params)
    method getHeaders (line 257) | public function getHeaders()
    method getBody (line 267) | public function getBody()
    method getCookies (line 277) | public function getCookies()
    method getCookiesFull (line 304) | public function getCookiesFull()
    method getStatus (line 341) | public function getStatus()
    method makeRequest (line 360) | protected function makeRequest($method, $uri, $params = [])
    method doError (line 428) | public function doError($string)
    method parseHeaders (line 444) | protected function parseHeaders($ch, $data)
    method curlOption (line 481) | protected function curlOption($name, $value)
    method curlOptions (line 492) | protected function curlOptions($arr)
    method setOptions (line 503) | public function setOptions($arr)
    method setOption (line 515) | public function setOption($name, $value)

FILE: Model/Logger/Handler.php
  class Handler (line 16) | class Handler extends \Magento\Framework\Logger\Handler\Base

FILE: Model/Logger/Logger.php
  class Logger (line 14) | class Logger extends \Monolog\Logger
    method mailchimpLog (line 17) | public function mailchimpLog($message, $file)

FILE: Model/MailChimpErrors.php
  class MailChimpErrors (line 16) | class MailChimpErrors extends \Magento\Framework\Model\AbstractModel
    method _construct (line 18) | protected function _construct()
    method getByStoreIdType (line 22) | public function getByStoreIdType($storeId, $id, $type)
    method deleteByStorePeriod (line 27) | public function deleteByStorePeriod($storeId, $interval, $limit)

FILE: Model/MailChimpInterestGroup.php
  class MailChimpInterestGroup (line 16) | class MailChimpInterestGroup extends \Magento\Framework\Model\AbstractModel
    method _construct (line 18) | protected function _construct()
    method getBySubscriberIdStoreId (line 23) | public function getBySubscriberIdStoreId($subscriberId, $storeId)

FILE: Model/MailChimpStores.php
  class MailChimpStores (line 16) | class MailChimpStores extends \Magento\Framework\Model\AbstractModel
    method _construct (line 18) | protected function _construct()

FILE: Model/MailChimpSyncBatches.php
  class MailChimpSyncBatches (line 15) | class MailChimpSyncBatches extends \Magento\Framework\Model\AbstractModel
    method _construct (line 17) | protected function _construct()

FILE: Model/MailChimpSyncEcommerce.php
  class MailChimpSyncEcommerce (line 16) | class MailChimpSyncEcommerce extends \Magento\Framework\Model\AbstractModel
    method _construct (line 18) | protected function _construct()
    method getByStoreIdType (line 24) | public function getByStoreIdType($storeId, $id, $type)
    method markAllAsDeleted (line 29) | public function markAllAsDeleted($id, $type, $relatedDeletedId)
    method markEcommorceAsNotDeleted (line 34) | public function markEcommorceAsNotDeleted($id, $type)
    method markAllAsModified (line 39) | public function markAllAsModified($id, $type)
    method deleteAllByIdType (line 44) | public function deleteAllByIdType($id, $type, $mailchimpStoreId)
    method deleteAllByBatchid (line 49) | public function deleteAllByBatchid($batchId)
    method deleteByTypeAndId (line 53) | public function deleteByTypeAndId($type, $id, $mailchimpStoreId)
    method markAllAsModifiedByIds (line 57) | public function markAllAsModifiedByIds($mailchimpStoreId, $ids, $type)

FILE: Model/MailChimpSyncEcommerceFactory.php
  class MailChimpSyncEcommerceFactory (line 16) | class MailChimpSyncEcommerceFactory
    method __construct (line 27) | public function __construct(
    method create (line 40) | public function create(array $data = [])

FILE: Model/MailChimpWebhookRequest.php
  class MailChimpWebhookRequest (line 16) | class MailChimpWebhookRequest extends \Magento\Framework\Model\AbstractM...
    method _construct (line 18) | protected function _construct()

FILE: Model/MailchimpNotification.php
  class MailchimpNotification (line 5) | class MailchimpNotification extends \Magento\Framework\Model\AbstractModel
    method _construct (line 7) | protected function _construct()

FILE: Model/Plugin/AccountManagement.php
  class AccountManagement (line 16) | class AccountManagement
    method __construct (line 42) | public function __construct(
    method aroundIsEmailAvailable (line 61) | public function aroundIsEmailAvailable(

FILE: Model/Plugin/Coupon.php
  class Coupon (line 18) | class Coupon
    method __construct (line 28) | public function __construct(
    method afterAfterDelete (line 33) | public function afterAfterDelete(\Magento\SalesRule\Model\Coupon $coupon)

FILE: Model/Plugin/Creditmemo.php
  class Creditmemo (line 18) | class Creditmemo
    method __construct (line 33) | public function __construct(
    method afterSave (line 40) | public function afterSave(

FILE: Model/Plugin/Invoice.php
  class Invoice (line 18) | class Invoice
    method __construct (line 33) | public function __construct(
    method afterSave (line 40) | public function afterSave(

FILE: Model/Plugin/Newsletter/Save.php
  class Save (line 18) | class Save
    method __construct (line 53) | public function __construct(
    method afterExecute (line 68) | public function afterExecute()
    method _updateSubscriber (line 107) | protected function _updateSubscriber(

FILE: Model/Plugin/Quote.php
  class Quote (line 17) | class Quote
    method __construct (line 37) | public function __construct(
    method beforeBeforeSave (line 48) | public function beforeBeforeSave(\Magento\Quote\Model\Quote $quote)

FILE: Model/Plugin/Ship.php
  class Ship (line 18) | class Ship
    method __construct (line 33) | public function __construct(
    method afterSave (line 40) | public function afterSave(

FILE: Model/Plugin/Subscriber.php
  class Subscriber (line 14) | class Subscriber
    method __construct (line 46) | public function __construct(
    method beforeUnsubscribeCustomerById (line 65) | public function beforeUnsubscribeCustomerById(
    method beforeSubscribeCustomerById (line 100) | public function beforeSubscribeCustomerById(
    method beforeSubscribe (line 153) | public function beforeSubscribe(
    method beforeUnsubscribe (line 201) | public function beforeUnsubscribe(
    method afterDelete (line 228) | public function afterDelete(
    method getStoreIdFromSubscriber (line 260) | protected function getStoreIdFromSubscriber(\Magento\Newsletter\Model\...

FILE: Model/ResourceModel/Carts/Collection.php
  class Collection (line 11) | class Collection extends SearchResult
    method __construct (line 13) | public function __construct(
    method _initSelect (line 23) | protected function _initSelect()

FILE: Model/ResourceModel/MailChimpErrors.php
  class MailChimpErrors (line 18) | class MailChimpErrors extends AbstractDb
    method _construct (line 20) | protected function _construct()
    method getByStoreIdType (line 24) | public function getByStoreIdType(\Ebizmarts\MailChimp\Model\MailChimpE...
    method deleteByStorePeriod (line 39) | public function deleteByStorePeriod(\Ebizmarts\MailChimp\Model\MailChi...

FILE: Model/ResourceModel/MailChimpInterestGroup.php
  class MailChimpInterestGroup (line 19) | class MailChimpInterestGroup extends AbstractDb
    method _construct (line 21) | protected function _construct()
    method getBySubscriberIdStoreId (line 25) | public function getBySubscriberIdStoreId(

FILE: Model/ResourceModel/MailChimpInterestGroup/Collection.php
  class Collection (line 11) | class Collection extends \Magento\Framework\Model\ResourceModel\Db\Colle...
    method _construct (line 13) | protected function _construct()

FILE: Model/ResourceModel/MailChimpStores.php
  class MailChimpStores (line 19) | class MailChimpStores extends AbstractDb
    method _construct (line 21) | protected function _construct()

FILE: Model/ResourceModel/MailChimpStores/Collection.php
  class Collection (line 15) | class Collection extends \Magento\Framework\View\Element\UiComponent\Dat...
    method _construct (line 17) | protected function _construct()

FILE: Model/ResourceModel/MailChimpStores/Grid/Collection.php
  class Collection (line 15) | class Collection extends \Magento\Framework\View\Element\UiComponent\Dat...
    method __construct (line 32) | public function __construct(

FILE: Model/ResourceModel/MailChimpSyncBatches.php
  class MailChimpSyncBatches (line 18) | class MailChimpSyncBatches extends AbstractDb
    method _construct (line 20) | protected function _construct()

FILE: Model/ResourceModel/MailChimpSyncBatches/Collection.php
  class Collection (line 16) | class Collection extends \Magento\Framework\Model\ResourceModel\Db\Colle...
    method _construct (line 18) | protected function _construct()

FILE: Model/ResourceModel/MailChimpSyncEcommerce.php
  class MailChimpSyncEcommerce (line 19) | class   MailChimpSyncEcommerce extends AbstractDb
    method _construct (line 21) | protected function _construct()
    method getByStoreIdType (line 25) | public function getByStoreIdType(\Ebizmarts\MailChimp\Model\MailChimpS...
    method markAllAsDeleted (line 40) | public function markAllAsDeleted(
    method markEcommorceAsNotDeleted (line 54) | public function markEcommorceAsNotDeleted(
    method markAllAsModified (line 67) | public function markAllAsModified(\Ebizmarts\MailChimp\Model\MailChimp...
    method deleteAllByIdType (line 77) | public function deleteAllByIdType(
    method deleteAllByBatchId (line 90) | public function deleteAllByBatchId(\Ebizmarts\MailChimp\Model\MailChim...
    method deleteByTypeAndId (line 96) | public function deleteByTypeAndId(\Ebizmarts\MailChimp\Model\MailChimp...
    method markAllAsModifiedByIds (line 102) | public function markAllAsModifiedByIds(\Ebizmarts\MailChimp\Model\Mail...

FILE: Model/ResourceModel/MailChimpSyncEcommerce/Collection.php
  class Collection (line 15) | class Collection extends \Magento\Framework\Model\ResourceModel\Db\Colle...
    method _construct (line 17) | protected function _construct()

FILE: Model/ResourceModel/MailChimpWebhookRequest.php
  class MailChimpWebhookRequest (line 18) | class MailChimpWebhookRequest extends AbstractDb
    method _construct (line 20) | protected function _construct()

FILE: Model/ResourceModel/MailChimpWebhookRequest/Collection.php
  class Collection (line 15) | class Collection extends \Magento\Framework\Model\ResourceModel\Db\Colle...
    method _construct (line 17) | protected function _construct()

FILE: Model/ResourceModel/MailchimpNotification.php
  class MailchimpNotification (line 7) | class MailchimpNotification extends AbstractDb
    method _construct (line 9) | protected function _construct()

FILE: Model/ResourceModel/MailchimpNotification/Collection.php
  class Collection (line 5) | class Collection extends \Magento\Framework\Model\ResourceModel\Db\Colle...
    method _construct (line 7) | protected function _construct()

FILE: Model/ResourceModel/Schedule/Collection.php
  class Collection (line 11) | class Collection extends SearchResult
    method __construct (line 15) | public function __construct(
    method _initSelect (line 28) | protected function _initSelect()

FILE: Observer/Adminhtml/Customer/SaveAfter.php
  class SaveAfter (line 18) | class SaveAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 43) | public function __construct(
    method execute (line 56) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Observer/Adminhtml/Product/DeleteAfter.php
  class DeleteAfter (line 12) | class DeleteAfter implements ObserverInterface
    method __construct (line 32) | public function __construct(
    method execute (line 42) | function execute(Observer $observer)
    method _updateProduct (line 51) | protected function _updateProduct($entityId)

FILE: Observer/Adminhtml/Product/ImportAfter.php
  class ImportAfter (line 9) | class ImportAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 29) | public function __construct(
    method execute (line 39) | public function execute(Observer $observer)
    method updateSkus (line 66) | protected function updateSkus($skus)
    method markAsModified (line 84) | protected function markAsModified($storeId,$productsIds)

FILE: Observer/Adminhtml/Product/SaveAfter.php
  class SaveAfter (line 17) | class SaveAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 37) | public function __construct(
    method execute (line 47) | public function execute(\Magento\Framework\Event\Observer $observer)
    method _updateProduct (line 69) | protected function _updateProduct($entityId)

FILE: Observer/ConfigObserver.php
  class ConfigObserver (line 19) | class ConfigObserver implements ObserverInterface
    method __construct (line 40) | public function __construct(
    method execute (line 51) | public function execute(EventObserver $observer)

FILE: Observer/Customer/SaveBefore.php
  class SaveBefore (line 18) | class SaveBefore implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 38) | public function __construct(
    method execute (line 49) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Observer/Sales/Order/SaveAfter.php
  class SaveAfter (line 19) | class SaveAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 34) | public function __construct(
    method execute (line 43) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Observer/Sales/Order/SubmitAfter.php
  class SubmitAfter (line 17) | class SubmitAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 43) | public function __construct(
    method execute (line 56) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Observer/Sales/Order/SubmitBefore.php
  class SubmitBefore (line 17) | class SubmitBefore implements \Magento\Framework\Event\ObserverInterface
    method execute (line 24) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Observer/SalesRule/Rule/DeleteAfter.php
  class DeleteAfter (line 18) | class DeleteAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 33) | public function __construct(
    method execute (line 41) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Observer/SalesRule/Rule/SaveAfter.php
  class SaveAfter (line 19) | class SaveAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 36) | public function __construct(
    method execute (line 47) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Observer/Subscriber/SaveAfter.php
  class SaveAfter (line 17) | class SaveAfter implements \Magento\Framework\Event\ObserverInterface
    method __construct (line 43) | public function __construct(
    method execute (line 56) | public function execute(\Magento\Framework\Event\Observer $observer)

FILE: Setup/InstallData.php
  class InstallData (line 22) | class InstallData implements InstallDataInterface
    method install (line 25) | public function install(ModuleDataSetupInterface $setup, ModuleContext...

FILE: Setup/InstallSchema.php
  class InstallSchema (line 22) | class InstallSchema implements InstallSchemaInterface
    method __construct (line 43) | public function __construct(
    method install (line 57) | public function install(SchemaSetupInterface $setup, ModuleContextInte...

FILE: Setup/Uninstall.php
  class Uninstall (line 9) | class Uninstall implements UninstallInterface
    method uninstall (line 11) | public function uninstall(SchemaSetupInterface $setup, ModuleContextIn...

FILE: Setup/UpgradeData.php
  class UpgradeData (line 23) | class UpgradeData implements UpgradeDataInterface
    method __construct (line 67) | public function __construct(
    method upgrade (line 91) | public function upgrade(ModuleDataSetupInterface $setup, ModuleContext...

FILE: Setup/UpgradeSchema.php
  class UpgradeSchema (line 23) | class UpgradeSchema implements UpgradeSchemaInterface
    method __construct (line 33) | public function __construct(ResourceConnection $resource, DeploymentCo...
    method upgrade (line 42) | public function upgrade(SchemaSetupInterface $setup, ModuleContextInte...

FILE: Ui/Component/Batch/Grid/Column/Batches.php
  class Batches (line 22) | class Batches extends Column
    method __construct (line 47) | public function __construct(
    method getDataSourceData (line 62) | public function getDataSourceData()
    method prepareDataSource (line 67) | public function prepareDataSource(array $dataSource)
    method getMCStoreNameById (line 96) | private function getMCStoreNameById($mailchimp_store_id, $magentoStoreId)

FILE: Ui/Component/Carts/Grid/Column/Actions.php
  class Actions (line 9) | class Actions extends Column
    method __construct (line 11) | public function __construct(
    method prepareDataSource (line 21) | public function prepareDataSource(array $dataSource)

FILE: Ui/Component/Carts/Grid/Column/Customer.php
  class Customer (line 9) | class Customer extends Column
    method __construct (line 11) | public function __construct(
    method prepareDataSource (line 21) | public function prepareDataSource(array $dataSource)

FILE: Ui/Component/Carts/Grid/Column/Mailchimp.php
  class Mailchimp (line 13) | class Mailchimp extends Column
    method __construct (line 20) | public function __construct(
    method prepareDataSource (line 35) | public function prepareDataSource(array $dataSource)

FILE: Ui/Component/Errors/Grid/Column/Batch.php
  class Batch (line 21) | class Batch extends Column
    method __construct (line 36) | public function __construct(
    method prepareDataSource (line 46) | public function prepareDataSource(array $dataSource)

FILE: Ui/Component/Listing/Column/Customers.php
  class Customers (line 12) | class Customers extends Column
    method __construct (line 51) | public function __construct(
    method prepareDataSource (line 72) | public function prepareDataSource(array $dataSource)
    method _getError (line 166) | private function _getError($customerId, $storeId)

FILE: Ui/Component/Listing/Column/Monkey.php
  class Monkey (line 25) | class Monkey extends Column
    method __construct (line 93) | public function __construct(
    method prepareDataSource (line 124) | public function prepareDataSource(array $dataSource)
    method _getError (line 238) | private function _getError($orderId, $storeId)
    method getOrderDataByOrderIds (line 251) | private function getOrderDataByOrderIds(array $orderIds): array
    method getOrdersIds (line 272) | private function getOrdersIds(array $dataSource)
    method getSyncDataByOrderIds (line 281) | private function getSyncDataByOrderIds(array $OrderIds)

FILE: Ui/Component/Listing/Column/Products.php
  class Products (line 18) | class Products extends Column
    method __construct (line 69) | public function __construct(
    method prepareDataSource (line 92) | public function prepareDataSource(array $dataSource)
    method _getError (line 187) | private function _getError($productId, $storeId)
    method getProductsByEntityIds (line 195) | private function getProductsByEntityIds(array $productIds): array
    method getProductsIds (line 213) | private function getProductsIds(array $dataSource)
    method getSyncDataByEntityIds (line 221) | private function getSyncDataByEntityIds(array $productIds)

FILE: Ui/Component/Stores/Grid/Column/Actions.php
  class Actions (line 23) | class Actions extends Column
    method __construct (line 37) | public function __construct(
    method prepareDataSource (line 54) | public function prepareDataSource(array $dataSource)
Condensed preview — 230 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (992K chars).
[
  {
    "path": "Block/Adminhtml/Customer/Edit/Tabs/Mailchimp.php",
    "chars": 2888,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Block/Adminhtml/Customer/Edit/Tabs/View/Customer.php",
    "chars": 1938,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Block/Adminhtml/Stores/Edit/Form.php",
    "chars": 953,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/Stores/Edit/Tab/Address.php",
    "chars": 3970,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/Stores/Edit/Tab/Info.php",
    "chars": 7247,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/Stores/Edit/Tabs.php",
    "chars": 1673,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/Stores/Edit.php",
    "chars": 2276,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/Account.php",
    "chars": 1137,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Block/Adminhtml/System/Config/CreateAbandonedCart.php",
    "chars": 1175,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Block/Adminhtml/System/Config/CreateWebhook.php",
    "chars": 2208,
    "preview": "<?php\n/**\n * Created by PhpStorm.\n * User: gonzalo\n * Date: 3/12/18\n * Time: 2:12 PM\n */\nnamespace Ebizmarts\\MailChimp\\B"
  },
  {
    "path": "Block/Adminhtml/System/Config/Date.php",
    "chars": 734,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/DeleteStore.php",
    "chars": 2437,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/Fieldset/Hint.php",
    "chars": 3429,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Block/Adminhtml/System/Config/FixMailchimpJS.php",
    "chars": 1298,
    "preview": "<?php\n/**\n * Created by PhpStorm.\n * User: gonzalo\n * Date: 3/12/18\n * Time: 2:12 PM\n */\nnamespace Ebizmarts\\MailChimp\\B"
  },
  {
    "path": "Block/Adminhtml/System/Config/Form/Field/CustomerMap.php",
    "chars": 2670,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/Form/Field/MailchimpMap.php",
    "chars": 3294,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/Form/Field/VarsMap.php",
    "chars": 3356,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/OauthWizard.php",
    "chars": 1524,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Block/Adminhtml/System/Config/ResetErrors.php",
    "chars": 2442,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/ResetErrorsNoRetry.php",
    "chars": 2463,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/ResetStore.php",
    "chars": 2434,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Adminhtml/System/Config/ResyncProducts.php",
    "chars": 1298,
    "preview": "<?php\n/**\n * Created by PhpStorm.\n * User: gonzalo\n * Date: 3/12/18\n * Time: 2:12 PM\n */\nnamespace Ebizmarts\\MailChimp\\B"
  },
  {
    "path": "Block/Adminhtml/System/Config/ResyncSubscriber.php",
    "chars": 1302,
    "preview": "<?php\n/**\n * Created by PhpStorm.\n * User: gonzalo\n * Date: 3/12/18\n * Time: 2:12 PM\n */\nnamespace Ebizmarts\\MailChimp\\B"
  },
  {
    "path": "Block/Catcher.php",
    "chars": 575,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Block/Checkout/Success.php",
    "chars": 3469,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Block/Loadquote.php",
    "chars": 381,
    "preview": "<?php\n/**\n * Loadquote\n *\n * @copyright Copyright © 2017 Ebizmarts Corp.. All rights reserved.\n * @author    info@ebizma"
  },
  {
    "path": "Block/Mailchimpjs.php",
    "chars": 1938,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Block/Newsletter.php",
    "chars": 2032,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Block/Subscribe.php",
    "chars": 936,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Block;\n\nuse Magento\\Framework\\View\\Element\\Template;\nuse \\Ebizmarts\\MailChimp\\Helpe"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 62244,
    "preview": "# Change Log\n\n## [102.3.78](https://github.com/mailchimp/mc-magento2/tree/102.3.78)\n\n[Full Changelog](https://github.com"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 906,
    "preview": "### Contribution requirements\n\n1. Contributions must adhere to [Magento coding standards](http://devdocs.magento.com/gui"
  },
  {
    "path": "Controller/Adminhtml/Batch/GetResponse.php",
    "chars": 4232,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Batch/Index.php",
    "chars": 1321,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Carts/Index.php",
    "chars": 987,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Controller\\Adminhtml\\Carts;\n\nclass Index extends \\Magento\\Backend\\App\\Action\n{\n    "
  },
  {
    "path": "Controller/Adminhtml/Cron/Index.php",
    "chars": 1316,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/CreateWebhook.php",
    "chars": 2770,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/DeleteStore.php",
    "chars": 3330,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/FixMailchimpJS.php",
    "chars": 2890,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/GetInterest.php",
    "chars": 2815,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/Getaccountdetails.php",
    "chars": 5760,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/Register.php",
    "chars": 3442,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Controller\\Adminhtml\\Ecommerce;\n\nuse Magento\\Backend\\App\\Action;\nuse Magento\\Direct"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/ResetLocalErrors.php",
    "chars": 3450,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/ResetLocalErrorsNoRetry.php",
    "chars": 3465,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/ResetStore.php",
    "chars": 3042,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/ResyncProducts.php",
    "chars": 2624,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/ResyncSubscribers.php",
    "chars": 2642,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Ecommerce/SyncLog.php",
    "chars": 2067,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Controller\\Adminhtml\\Ecommerce;\n\nuse Magento\\Backend\\App\\Action;\nuse Magento\\Backen"
  },
  {
    "path": "Controller/Adminhtml/Errors/Getresponse.php",
    "chars": 4223,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Errors/Index.php",
    "chars": 1319,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Lists/Get.php",
    "chars": 2411,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Orders/Campaign.php",
    "chars": 1902,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Controller\\Adminhtml\\Orders;\n\nuse Magento\\Backend\\App\\Action;\nuse Magento\\Backend\\A"
  },
  {
    "path": "Controller/Adminhtml/Orders/Member.php",
    "chars": 2060,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Controller\\Adminhtml\\Orders;\n\nuse Magento\\Backend\\App\\Action;\nuse Magento\\Backend\\A"
  },
  {
    "path": "Controller/Adminhtml/Stores/Delete.php",
    "chars": 1610,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Stores/Edit.php",
    "chars": 2140,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Stores/Get.php",
    "chars": 2709,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Stores/Index.php",
    "chars": 837,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Stores/Save.php",
    "chars": 4504,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Adminhtml/Stores.php",
    "chars": 1897,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Controller/Campaign/Check.php",
    "chars": 2314,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Controller/Cart/Loadquote.php",
    "chars": 5987,
    "preview": "<?php\n/**\n * Index\n *\n * @copyright Copyright © 2017 Ebizmarts Corp.. All rights reserved.\n * @author    info@ebizmarts."
  },
  {
    "path": "Controller/Checkout/Success.php",
    "chars": 5318,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Controller/WebHook/Index.php",
    "chars": 4484,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Cron/BatchesClean.php",
    "chars": 2809,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Cron/Ecommerce.php",
    "chars": 19310,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Cron/ErrorsClean.php",
    "chars": 1873,
    "preview": "<?php\n\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <inf"
  },
  {
    "path": "Cron/GenerateStatistics.php",
    "chars": 15372,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Cron;\n\nuse Magento\\Store\\Model\\StoreManager;\nuse Magento\\Framework\\Stdlib\\DateTime\\"
  },
  {
    "path": "Cron/SyncStatistics.php",
    "chars": 7992,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Cron;\n\nuse Magento\\Store\\Model\\StoreManager;\nuse Ebizmarts\\MailChimp\\Helper\\Data as"
  },
  {
    "path": "Cron/Webhook.php",
    "chars": 16811,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Cron/WebhookClean.php",
    "chars": 1491,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Helper/Data.php",
    "chars": 51505,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Helper/Http.php",
    "chars": 2908,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Helper;\n\nuse Ebizmarts\\MailChimp\\Model\\HTTP\\Client\\Curl;\nuse Ebizmarts\\MailChimp\\He"
  },
  {
    "path": "Helper/Sync.php",
    "chars": 6439,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Helper;\n\nuse Magento\\Framework\\App\\Helper\\AbstractHelper;\nuse Magento\\Framework\\App"
  },
  {
    "path": "Helper/VarsMap.php",
    "chars": 3858,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "ISSUE_TEMPLATE.md",
    "chars": 2915,
    "preview": "# Issue reporting guidelines\n\nTo maintain an effective bugfix workflow and make sure issues will be solved in a timely m"
  },
  {
    "path": "LICENSE.txt",
    "chars": 10363,
    "preview": "\nOpen Software License (\"OSL\") v. 3.0\n\nThis Open Software License (the \"License\") applies to any original work of author"
  },
  {
    "path": "Model/Api/Cart.php",
    "chars": 28742,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Api/Customer.php",
    "chars": 11690,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Api/Order.php",
    "chars": 33239,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Api/Product.php",
    "chars": 39907,
    "preview": "<?php\n/**\n\nmc-magento2 Magento Component\n@category Ebizmarts\n@Package mc-magento2\n@author Ebizmarts Team info@ebizmarts."
  },
  {
    "path": "Model/Api/PromoCodes.php",
    "chars": 11758,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Api/PromoRules.php",
    "chars": 12622,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Api/Result.php",
    "chars": 14296,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Api/Subscriber.php",
    "chars": 8522,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Backend/ApiKey.php",
    "chars": 4004,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Backend/MonkeyList.php",
    "chars": 2546,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Backend/MonkeyStore.php",
    "chars": 6341,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Backend/VarsMap.php",
    "chars": 2501,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/ModuleVersion.php",
    "chars": 2177,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Model/Config/Source/ApiKey.php",
    "chars": 2640,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Source/CampaignAction.php",
    "chars": 392,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model\\Config\\Source;\n\nclass CampaignAction implements \\Magento\\Framework\\Option\\Arr"
  },
  {
    "path": "Model/Config/Source/CleanPeriod.php",
    "chars": 276,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model\\Config\\Source;\nuse \\Magento\\Framework\\Data\\OptionSourceInterface;\n\nclass Clea"
  },
  {
    "path": "Model/Config/Source/Cmspage.php",
    "chars": 867,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Source/Details.php",
    "chars": 10021,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Model/Config/Source/Interest.php",
    "chars": 2330,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Model/Config/Source/MonkeyList.php",
    "chars": 2155,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Source/MonkeyStore.php",
    "chars": 2764,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Config/Source/Months.php",
    "chars": 577,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Model/Config/Source/Timeout.php",
    "chars": 221,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model\\Config\\Source;\n\nclass Timeout implements \\Magento\\Framework\\Option\\ArrayInter"
  },
  {
    "path": "Model/Config/Source/WebhookDelete.php",
    "chars": 660,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/HTTP/Client/Curl.php",
    "chars": 12043,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Ebizmarts\\MailChimp\\Model\\HTTP\\Client;\n\n/**\n * Class to work with HTTP protoc"
  },
  {
    "path": "Model/Logger/Handler.php",
    "chars": 641,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Model/Logger/Logger.php",
    "chars": 1422,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Model/MailChimpErrors.php",
    "chars": 932,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/MailChimpInterestGroup.php",
    "chars": 826,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Model/MailChimpStores.php",
    "chars": 587,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/MailChimpSyncBatches.php",
    "chars": 601,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/MailChimpSyncEcommerce.php",
    "chars": 1983,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/MailChimpSyncEcommerceFactory.php",
    "chars": 1205,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/MailChimpWebhookRequest.php",
    "chars": 611,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/MailchimpNotification.php",
    "chars": 265,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model;\n\nclass MailchimpNotification extends \\Magento\\Framework\\Model\\AbstractModel\n"
  },
  {
    "path": "Model/Plugin/AccountManagement.php",
    "chars": 2473,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Plugin/Coupon.php",
    "chars": 968,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Plugin/Creditmemo.php",
    "chars": 1711,
    "preview": "<?php\n/**\n * Ebizmarts_mc-magento22 Magento component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_mc-magento2"
  },
  {
    "path": "Model/Plugin/Invoice.php",
    "chars": 1630,
    "preview": "<?php\n/**\n * Ebizmarts_mc-magento22 Magento component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_mc-magento2"
  },
  {
    "path": "Model/Plugin/Newsletter/Save.php",
    "chars": 4572,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Plugin/Quote.php",
    "chars": 2162,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/Plugin/Ship.php",
    "chars": 1638,
    "preview": "<?php\n/**\n * Ebizmarts_mc-magento22 Magento component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_mc-magento2"
  },
  {
    "path": "Model/Plugin/Subscriber.php",
    "chars": 9917,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "Model/ResourceModel/Carts/Collection.php",
    "chars": 1353,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model\\ResourceModel\\Carts;\n\nuse Magento\\Framework\\Data\\Collection\\Db\\FetchStrategyI"
  },
  {
    "path": "Model/ResourceModel/MailChimpErrors.php",
    "chars": 1643,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailChimpInterestGroup/Collection.php",
    "chars": 501,
    "preview": "<?php\n/**\n * Created by PhpStorm.\n * User: gonzalo\n * Date: 10/31/18\n * Time: 5:58 PM\n */\n\nnamespace Ebizmarts\\MailChimp"
  },
  {
    "path": "Model/ResourceModel/MailChimpInterestGroup.php",
    "chars": 1327,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Model/ResourceModel/MailChimpStores/Collection.php",
    "chars": 717,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Model/ResourceModel/MailChimpStores/Grid/Collection.php",
    "chars": 1404,
    "preview": "<?php\n/**\n * Copyright © 2013-2017 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n\nnames"
  },
  {
    "path": "Model/ResourceModel/MailChimpStores.php",
    "chars": 624,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailChimpSyncBatches/Collection.php",
    "chars": 740,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailChimpSyncBatches.php",
    "chars": 640,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailChimpSyncEcommerce/Collection.php",
    "chars": 744,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailChimpSyncEcommerce.php",
    "chars": 4487,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailChimpWebhookRequest/Collection.php",
    "chars": 748,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailChimpWebhookRequest.php",
    "chars": 649,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Model/ResourceModel/MailchimpNotification/Collection.php",
    "chars": 414,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model\\ResourceModel\\MailchimpNotification;\n\nclass Collection extends \\Magento\\Frame"
  },
  {
    "path": "Model/ResourceModel/MailchimpNotification.php",
    "chars": 271,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model\\ResourceModel;\n\nuse Magento\\Framework\\Model\\ResourceModel\\Db\\AbstractDb;\n\ncla"
  },
  {
    "path": "Model/ResourceModel/Schedule/Collection.php",
    "chars": 1389,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Model\\ResourceModel\\Schedule;\n\nuse \\Magento\\Cron\\Model\\ResourceModel\\Schedule as Ma"
  },
  {
    "path": "Observer/Adminhtml/Customer/SaveAfter.php",
    "chars": 4723,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Observer/Adminhtml/Product/DeleteAfter.php",
    "chars": 1591,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Observer\\Adminhtml\\Product;\n\nuse Magento\\ConfigurableProduct\\Model\\ResourceModel\\Pr"
  },
  {
    "path": "Observer/Adminhtml/Product/ImportAfter.php",
    "chars": 2940,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Observer\\Adminhtml\\Product;\n\nuse Magento\\Framework\\Event\\Observer;\nuse Magento\\Cata"
  },
  {
    "path": "Observer/Adminhtml/Product/SaveAfter.php",
    "chars": 2427,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Observer/ConfigObserver.php",
    "chars": 2068,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Observer/Customer/SaveBefore.php",
    "chars": 2711,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "Observer/Sales/Order/SaveAfter.php",
    "chars": 1648,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Observer/Sales/Order/SubmitAfter.php",
    "chars": 2725,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Observer/Sales/Order/SubmitBefore.php",
    "chars": 1341,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Observer/SalesRule/Rule/DeleteAfter.php",
    "chars": 1372,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Observer/SalesRule/Rule/SaveAfter.php",
    "chars": 1625,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Observer/Subscriber/SaveAfter.php",
    "chars": 3234,
    "preview": "<?php\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author Ebizmarts Team <info"
  },
  {
    "path": "README.md",
    "chars": 5833,
    "preview": "\n<h3>Labels applied by the team</h3>\n\n| Label        | Description           |\n| ------------- |-------------|\n| ![bug]("
  },
  {
    "path": "Setup/InstallData.php",
    "chars": 750,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Setup/InstallSchema.php",
    "chars": 10438,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Setup/Uninstall.php",
    "chars": 1566,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Setup;\n\nuse Magento\\Framework\\Setup\\ModuleContextInterface;\nuse Magento\\Framework\\S"
  },
  {
    "path": "Setup/UpgradeData.php",
    "chars": 8154,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Setup/UpgradeSchema.php",
    "chars": 30979,
    "preview": "<?php\n\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team "
  },
  {
    "path": "Ui/Component/Batch/Grid/Column/Batches.php",
    "chars": 3996,
    "preview": "<?php\n\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team "
  },
  {
    "path": "Ui/Component/Carts/Grid/Column/Actions.php",
    "chars": 1447,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Ui\\Component\\Carts\\Grid\\Column;\n\nuse Magento\\Framework\\UrlInterface;\nuse Magento\\Fr"
  },
  {
    "path": "Ui/Component/Carts/Grid/Column/Customer.php",
    "chars": 981,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Ui\\Component\\Carts\\Grid\\Column;\n\nuse Magento\\Framework\\Escaper;\nuse Magento\\Framewo"
  },
  {
    "path": "Ui/Component/Carts/Grid/Column/Mailchimp.php",
    "chars": 4001,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Ui\\Component\\Carts\\Grid\\Column;\n\nuse Ebizmarts\\MailChimp\\Helper\\Data as MailChimpHe"
  },
  {
    "path": "Ui/Component/Errors/Grid/Column/Batch.php",
    "chars": 3198,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Ui/Component/Listing/Column/Customers.php",
    "chars": 7890,
    "preview": "<?php\n\nnamespace Ebizmarts\\MailChimp\\Ui\\Component\\Listing\\Column;\n\nuse Magento\\Framework\\App\\RequestInterface;\nuse Magen"
  },
  {
    "path": "Ui/Component/Listing/Column/Monkey.php",
    "chars": 12353,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "Ui/Component/Listing/Column/Products.php",
    "chars": 10232,
    "preview": "<?php\nnamespace Ebizmarts\\MailChimp\\Ui\\Component\\Listing\\Column;\n\nuse Magento\\Catalog\\Model\\ProductFactory;\nuse Magento\\"
  },
  {
    "path": "Ui/Component/Stores/Grid/Column/Actions.php",
    "chars": 2025,
    "preview": "<?php\n/**\n * mc-magento2 Magento Component\n *\n * @category Ebizmarts\n * @package mc-magento2\n * @author Ebizmarts Team <"
  },
  {
    "path": "composer.json",
    "chars": 760,
    "preview": "{\n  \"name\": \"mailchimp/mc-magento2\",\n  \"autoload\": {\n    \"psr-4\": {\"Ebizmarts\\\\MailChimp\\\\\":\"\"},\n    \"files\": [\"registra"
  },
  {
    "path": "etc/acl.xml",
    "chars": 1877,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author"
  },
  {
    "path": "etc/adminhtml/events.xml",
    "chars": 1171,
    "preview": "<?xml version=\"1.0\"?>\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:m"
  },
  {
    "path": "etc/adminhtml/menu.xml",
    "chars": 2400,
    "preview": "<?xml version=\"1.0\"?>\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:m"
  },
  {
    "path": "etc/adminhtml/routes.xml",
    "chars": 350,
    "preview": "<?xml version=\"1.0\"?>\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:m"
  },
  {
    "path": "etc/adminhtml/system.xml",
    "chars": 22889,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     "
  },
  {
    "path": "etc/config.xml",
    "chars": 820,
    "preview": "<?xml version=\"1.0\"?>\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:noNamespaceSchemaLocatio"
  },
  {
    "path": "etc/cron_groups.xml",
    "chars": 622,
    "preview": "<?xml version=\"1.0\"?>\n\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:"
  },
  {
    "path": "etc/crontab.xml",
    "chars": 1732,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * MailChimp Magento Component\n *\n * @category Ebizmarts\n * @package MailChimp\n * @author"
  },
  {
    "path": "etc/di.xml",
    "chars": 5545,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     "
  },
  {
    "path": "etc/events.xml",
    "chars": 1849,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     "
  },
  {
    "path": "etc/fieldset.xml",
    "chars": 951,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     "
  },
  {
    "path": "etc/frontend/di.xml",
    "chars": 860,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     "
  },
  {
    "path": "etc/frontend/events.xml",
    "chars": 385,
    "preview": "<?xml version=\"1.0\"?>\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:m"
  },
  {
    "path": "etc/frontend/routes.xml",
    "chars": 477,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n/**\n * routes\n *\n * @copyright Copyright © 2017 Ebizmarts Corp.. All rights "
  },
  {
    "path": "etc/module.xml",
    "chars": 699,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     "
  },
  {
    "path": "i18n/es_ES.csv",
    "chars": 9951,
    "preview": "MailChimp,MailChimp\nSave,Guardar\nSave and Continue Edit,Guardar y continuar Editar\nDelete,Borrar\nEdit Store '%1',Editar "
  },
  {
    "path": "i18n/fr_FR.csv",
    "chars": 10100,
    "preview": "MailChimp,MailChimp\nSave,Enregistrer\nSave and Continue Edit,Enregistrer et continuer la modification\nDelete,Supprimer\nEd"
  },
  {
    "path": "i18n/it_IT.csv",
    "chars": 9664,
    "preview": "MailChimp,MailChimp\nSave,Salva\nSave and Continue Edit,Salva e continua Modifica\nDelete,Elimina\nEdit Store '%1',Modifica "
  },
  {
    "path": "modman",
    "chars": 31,
    "preview": "* app/code/Ebizmarts/MailChimp\n"
  },
  {
    "path": "registration.php",
    "chars": 479,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "view/adminhtml/layout/customer_index_edit.xml",
    "chars": 1233,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "view/adminhtml/layout/default.xml",
    "chars": 287,
    "preview": "<?xml version=\"1.0\"?>\n\n<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" layout=\"admin-1column\" xsi:noNamespac"
  },
  {
    "path": "view/adminhtml/layout/mailchimp_batch_index.xml",
    "chars": 365,
    "preview": "<?xml version=\"1.0\"?>\n<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:mag"
  },
  {
    "path": "view/adminhtml/layout/mailchimp_carts_index.xml",
    "chars": 366,
    "preview": "<?xml version=\"1.0\"?>\n<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:mag"
  },
  {
    "path": "view/adminhtml/layout/mailchimp_cron_index.xml",
    "chars": 365,
    "preview": "<?xml version=\"1.0\"?>\n<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:mag"
  },
  {
    "path": "view/adminhtml/layout/mailchimp_errors_index.xml",
    "chars": 367,
    "preview": "<?xml version=\"1.0\"?>\n<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:mag"
  },
  {
    "path": "view/adminhtml/layout/mailchimp_stores_edit.xml",
    "chars": 1128,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n/**\n * Ebizmarts_MailChimp\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "view/adminhtml/layout/mailchimp_stores_grid.xml",
    "chars": 479,
    "preview": "<?xml version=\"1.0\"?>\n<layout xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:m"
  },
  {
    "path": "view/adminhtml/layout/mailchimp_stores_index.xml",
    "chars": 831,
    "preview": "<?xml version=\"1.0\"?>\n<page xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"../../."
  },
  {
    "path": "view/adminhtml/requirejs-config.js",
    "chars": 584,
    "preview": "/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n * @aut"
  },
  {
    "path": "view/adminhtml/templates/customer/edit/tabs/mailchimp.phtml",
    "chars": 4967,
    "preview": "<?php\n/**\n * @var $block \\Ebizmarts\\MailChimp\\Block\\Adminhtml\\Customer\\Edit\\Tabs\\View\\Customer\n */\n$interest = $block->g"
  },
  {
    "path": "view/adminhtml/templates/system/config/create_abandonedcart_automation.phtml",
    "chars": 479,
    "preview": "<div class=\"actions actions-get-apikey\">\n    <button onclick=\"javascript:window.open('<?= $block->escapeUrl($block->auth"
  },
  {
    "path": "view/adminhtml/templates/system/config/createwebhook.phtml",
    "chars": 301,
    "preview": "<div class=\"actions actions-create-webhook\">\n    <div id=\"validation_result\" class=\"message-validation hidden\"></div>\n  "
  },
  {
    "path": "view/adminhtml/templates/system/config/deletestore.phtml",
    "chars": 502,
    "preview": "<div id=\"monkey_storeconfirmation\" style=\"display:none;\" data-mage-init='{\"mailchimpconfirmation\":{}}'>\n</div>\n<div clas"
  },
  {
    "path": "view/adminhtml/templates/system/config/fieldset/hint.phtml",
    "chars": 3250,
    "preview": "<?php\n/**\n * Ebizmarts_MailChimp Magento JS component\n *\n * @category    Ebizmarts\n * @package     Ebizmarts_MailChimp\n "
  },
  {
    "path": "view/adminhtml/templates/system/config/fixmailchimpjs.phtml",
    "chars": 305,
    "preview": "<div class=\"actions actions-fix-mailchimp-js\">\n    <div id=\"validation_result\" class=\"message-validation hidden\"></div>\n"
  },
  {
    "path": "view/adminhtml/templates/system/config/js.phtml",
    "chars": 207,
    "preview": "<div id=\"monkey_apikey\" class=\"admin__page-section-item\" style=\"display:none;\"\n     data-mage-init='{\"monkeyapikey\":{\"ap"
  },
  {
    "path": "view/adminhtml/templates/system/config/oauth_wizard.phtml",
    "chars": 552,
    "preview": "<div class=\"actions actions-get-apikey\">\n    <div id=\"validation_result\" class=\"message-validation hidden\"></div>\n    <b"
  }
]

// ... and 30 more files (download for full content)

About this extraction

This page contains the full source code of the mailchimp/mc-magento2 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 230 files (915.5 KB), approximately 223.4k tokens, and a symbol index with 759 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!