diff --git a/app/code/community/Ebizmarts/MailChimp/Helper/Data.php b/app/code/community/Ebizmarts/MailChimp/Helper/Data.php index 627c8cf93..d9f027d1d 100644 --- a/app/code/community/Ebizmarts/MailChimp/Helper/Data.php +++ b/app/code/community/Ebizmarts/MailChimp/Helper/Data.php @@ -842,10 +842,9 @@ public function getDateSyncFinishByMailChimpStoreId($mailchimpStoreId) } /** - * Set the values to send all the items again. - * - * @param $scopeId - * @param $scope + * @param $scopeId + * @param $scope + * @param null $filters * @throws Mage_Core_Exception */ public function resendMCEcommerceData($scopeId, $scope, $filters = null) @@ -858,7 +857,7 @@ public function resendMCEcommerceData($scopeId, $scope, $filters = null) $this->removeEcommerceSyncData($scopeId, $scope, false, $filters); $this->clearErrorGrid($scopeId, $scope, true, $filters); - if (in_array('PRO', $filters)) { + if ($filters !== null && in_array(Ebizmarts_MailChimp_Model_Config::IS_PRODUCT, $filters)) { $this->deleteFlushMagentoCacheFlag(); } } @@ -868,9 +867,10 @@ public function resendMCEcommerceData($scopeId, $scope, $filters = null) * Remove items from mailchimp_ecommerce_sync_data table to allow them to be sent. * If scopeId is 0 remova from all scopes. * - * @param $scopeId - * @param $scope - * @param bool $deleteErrorsOnly + * @param $scopeId + * @param $scope + * @param bool $deleteErrorsOnly + * @param null $filters * @throws Mage_Core_Exception */ public function removeEcommerceSyncData($scopeId, $scope, $deleteErrorsOnly = false, $filters = null) @@ -884,7 +884,7 @@ public function removeEcommerceSyncData($scopeId, $scope, $deleteErrorsOnly = fa } /** - * @throws Mage_Core_Exception + * @param null $filters */ public function removeAllEcommerceSyncDataErrors($filters = null) { @@ -907,8 +907,8 @@ public function removeAllEcommerceSyncDataErrors($filters = null) /** * @param $mailchimpStoreId - * @param bool $deleteErrorsOnly - * @throws Mage_Core_Exception + * @param bool $deleteErrorsOnly + * @param null $filters */ public function removeEcommerceSyncDataByMCStore($mailchimpStoreId, $deleteErrorsOnly = false, $filters = null) { @@ -1122,9 +1122,10 @@ public function resetErrors($scopeId, $scope = 'stores') * Clear mailchimp_errors grid for given scope. * Exclude subscriber if flag set to true. * - * @param $scopeId - * @param $scope - * @param bool $excludeSubscribers + * @param $scopeId + * @param $scope + * @param bool $excludeSubscribers + * @param null $filters * @throws Mage_Core_Exception */ public function clearErrorGrid($scopeId, $scope, $excludeSubscribers = false, $filters = null) @@ -1142,6 +1143,7 @@ public function clearErrorGrid($scopeId, $scope, $excludeSubscribers = false, $f /** * @param $mailchimpStoreId + * @param null $filters */ public function clearErrorGridByMCStore($mailchimpStoreId, $filters = null) { @@ -1160,6 +1162,7 @@ public function clearErrorGridByMCStore($mailchimpStoreId, $filters = null) /** * @param $scopeId + * @param null $filters */ public function clearErrorGridByStoreId($scopeId, $filters = null) { @@ -1200,6 +1203,7 @@ public function handleOldErrors() /** * @param $scopeId * @param $scope + * @param null $filters * @throws Mage_Core_Exception */ public function saveLastItemsSent($scopeId, $scope, $filters = null) @@ -1207,7 +1211,7 @@ public function saveLastItemsSent($scopeId, $scope, $filters = null) $mailchimpStoreId = $this->getMCStoreId($scopeId, $scope); $isSyncing = $this->getMCIsSyncing($mailchimpStoreId, $scopeId, $scope); - if ($isSyncing != 1) { + if ($isSyncing != 1 && $filters !== null) { $configValues = array(); if ($this->getCustomerResendLastId($scopeId, $scope) === null