Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Controller/Adminhtml/Ecommerce/Getaccountdetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function execute()
$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);
Expand Down
1 change: 1 addition & 0 deletions Controller/Adminhtml/Ecommerce/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function execute()
$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) {
Expand Down
2 changes: 2 additions & 0 deletions Model/Config/Source/Details.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public function __construct(
$registerData['account_id'] = $this->_options['account_id'];
$registerData['city'] = $this->_helper->getConfigValue(\Magento\Store\Model\Information::XML_PATH_STORE_INFO_CITY,$storeId, $scope);
$registerData['country'] = $directoryHelper->getDefaultCountry($storeId);
$registerData['total_subscribers'] = $this->_options['total_subscribers'];
$registerDataJson = json_encode($registerData);

$ret = $this->httpClient->post($registerDataJson);
Expand Down Expand Up @@ -163,6 +164,7 @@ public function toOptionArray()
$ret = [
['label' => __('Username'), 'value' => $this->_options['account_name']],
['label' => 'Total Member Subscribers', 'value' => $this->_options['total_subscribers']]];

if (array_key_exists('list_subscribers', $this->_options)) {
$ret = array_merge(
$ret,
Expand Down