Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Santiagoebizmarts committed Sep 30, 2019
1 parent 37026f7 commit f19b057
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions app/code/community/Ebizmarts/MailChimp/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -4845,17 +4845,16 @@ public function getCountersSubscribers()
public function modifyCounterDataSentToMailchimp($index, $hasError = false, $increment = 1)
{
$counterGetResponsesBatch = $this->getCountersDataSentToMailchimp();
$counterGetResponsesBatchAtIndex = $counterGetResponsesBatch[$index];
$statusChanged = self::DATA_SENT_TO_MAILCHIMP;

if ($hasError === true) {
$count = isset($counterGetResponsesBatchAtIndex[self::DATA_NOT_SENT_TO_MAILCHIMP])
? $counterGetResponsesBatchAtIndex[self::DATA_NOT_SENT_TO_MAILCHIMP]
$count = isset($counterGetResponsesBatch[$index][self::DATA_NOT_SENT_TO_MAILCHIMP])
? $counterGetResponsesBatch[$index][self::DATA_NOT_SENT_TO_MAILCHIMP]
: $increment;
$statusChanged = self::DATA_NOT_SENT_TO_MAILCHIMP;
} else {
$count = isset($counterGetResponsesBatchAtIndex[self::DATA_SENT_TO_MAILCHIMP])
? $counterGetResponsesBatchAtIndex[self::DATA_SENT_TO_MAILCHIMP]
$count = isset($counterGetResponsesBatch[$index][self::DATA_SENT_TO_MAILCHIMP])
? $counterGetResponsesBatch[$index][self::DATA_SENT_TO_MAILCHIMP]
: $increment;
}

Expand Down
6 changes: 3 additions & 3 deletions app/code/community/Ebizmarts/MailChimp/Model/Api/Batches.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function _getResults(
}

if ($enabled) {
$helper->logBatchStatus('Get results from Mailchimp');
$helper->logBatchStatus('Get results from Mailchimp for Magento store '.$magentoStoreId);

foreach ($collection as $item) {
try {
Expand Down Expand Up @@ -1169,7 +1169,7 @@ protected function _showResumeEcommerce($batchId, $storeId)
$countersSentPerBatch = $helper->getCountersSentPerBatch();

if (!empty($countersSentPerBatch) || $helper->getCountersSentPerBatch() != null) {
$helper->logBatchStatus("Sent batch $batchId for store $storeId");
$helper->logBatchStatus("Sent batch $batchId for Magento store $storeId");
$helper->logBatchQuantity($helper->getCountersSentPerBatch());
} else {
$helper->logBatchStatus("Nothing to sync for store $storeId");
Expand All @@ -1187,7 +1187,7 @@ protected function _showResumeSubscriber($batchId, $storeId)
$countersSubscribers = $helper->getCountersSubscribers();

if (!empty($countersSubscribers) || $helper->getCountersSubscribers() != null) {
$helper->logBatchStatus("Sent batch $batchId for store $storeId");
$helper->logBatchStatus("Sent batch $batchId for Magento store $storeId");
$helper->logBatchQuantity($helper->getCountersSubscribers());
} else {
$helper->logBatchStatus("Nothing to sync for store $storeId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct($params)
$this->_lists['lists'][0] = $api->getLists()->getLists($listId);
}
} else {
$this->_lists = $api->getLists()->getLists(null, 'lists', null, 100);
$this->_lists = $api->getLists()->getLists(null, 'lists');
}

if (isset($this->_lists['lists']) && count($this->_lists['lists']) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Ebizmarts/MailChimp/Lists.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function getLists(
$id = null,
$fields = null,
$excludeFields = null,
$count = null,
$count = 100,
$offset = null,
$beforeDateCreated = null,
$sinceDateCreated = null,
Expand Down

0 comments on commit f19b057

Please sign in to comment.