';
foreach ($productOptions as $attribute => $option) {
- !$option && $option = '--';
+ if ($option === '' || $option === null) {
+ $option = '--';
+ }
$value .= '
: ' . Mage::helper('M2ePro')->escapeHtml($option) . '
';
}
diff --git a/app/code/community/Ess/M2ePro/Block/Adminhtml/Walmart/Listing/View/Walmart/Grid.php b/app/code/community/Ess/M2ePro/Block/Adminhtml/Walmart/Listing/View/Walmart/Grid.php
index dbb5a8154..e75c5f37e 100644
--- a/app/code/community/Ess/M2ePro/Block/Adminhtml/Walmart/Listing/View/Walmart/Grid.php
+++ b/app/code/community/Ess/M2ePro/Block/Adminhtml/Walmart/Listing/View/Walmart/Grid.php
@@ -518,7 +518,9 @@ public function callbackColumnProductTitle($productTitle, $row, $column, $isExpo
if (!empty($productOptions)) {
$value .= '
';
foreach ($productOptions as $attribute => $option) {
- !$option && $option = '--';
+ if ($option === '' || $option === null) {
+ $option = '--';
+ }
$value .= '
' . $helper->escapeHtml($attribute) .
': ' . $helper->escapeHtml($option) . '
';
}
diff --git a/app/code/community/Ess/M2ePro/CHANGELOG b/app/code/community/Ess/M2ePro/CHANGELOG
index 1a627e55c..c3aff3aa3 100644
--- a/app/code/community/Ess/M2ePro/CHANGELOG
+++ b/app/code/community/Ess/M2ePro/CHANGELOG
@@ -1,14 +1,20 @@
-* 6.21.2 (13/04/2022)
+* 6.21.3 (27/04/2022)
+
+Common: [Fixed] Issues with listing and mapping orders for Configurable Products with zero (0, 00, 000) size variations [#3350]
+eBay: [Fixed] "Invalid block type: Ess\M2ePro\Block\Adminhtml\Wizard\InstallationEbay\Notification" when downloading Rate Tables in the Shipping Policy [#3030]
+Amazon: [Fixed] Unable to save configurations when the VAT Invoice Creation option is set to "I will upload my own Invoices"[#3535]
+
+* 6.21.2 (13/04/2022)
Common: [Improved] Some UI text updates [#3486]
eBay: [Fixed] Fatal error occurred when moving products from Unmanaged Listing to the M2E Pro Listing [#3436]
* 6.21.1 (05/04/2022)
-Common [Fixed] Unable to set a decimal value in the "VAT Rate" field in the Selling Policy [#3100]
-eBay [Fixed] Incorrect mapping of floating-point variations when creating a Magento Order [#3108]
-eBay [Fixed] Repetitive automatic Revise of eBay Parts Compatibility [#3427}
-eBay [Fixed] Item ID is displayed as N/A for some products [#2990]
+Common: [Fixed] Unable to set a decimal value in the "VAT Rate" field in the Selling Policy [#3100]
+eBay: [Fixed] Incorrect mapping of floating-point variations when creating a Magento Order [#3108]
+eBay: [Fixed] Repetitive automatic Revise of eBay Parts Compatibility [#3427}
+eBay: [Fixed] Item ID is displayed as N/A for some products [#2990]
* 6.21.0 (23/03/2022)
diff --git a/app/code/community/Ess/M2ePro/Helper/Module/Exception.php b/app/code/community/Ess/M2ePro/Helper/Module/Exception.php
index 29bdba10d..1a39bd0f1 100644
--- a/app/code/community/Ess/M2ePro/Helper/Module/Exception.php
+++ b/app/code/community/Ess/M2ePro/Helper/Module/Exception.php
@@ -8,15 +8,12 @@
class Ess_M2ePro_Helper_Module_Exception extends Mage_Core_Helper_Abstract
{
- const FILTER_TYPE_TYPE = 1;
- const FILTER_TYPE_INFO = 2;
- const FILTER_TYPE_MESSAGE = 3;
protected $systemLogTableName;
//########################################
- public function process(Exception $exception, $sendToServer = true)
+ public function process(Exception $exception)
{
try {
$class = get_class($exception);
@@ -34,27 +31,6 @@ public function process(Exception $exception, $sendToServer = true)
$info
);
- $sendConfig = (bool)(int)Mage::helper('M2ePro/Module')->getConfig()
- ->getGroupValue('/server/exceptions/', 'send');
-
- if (!$sendToServer ||
- ($exception instanceof Ess_M2ePro_Model_Exception && !$exception->isSendToServer()) ||
- !$sendConfig || $this->isExceptionFiltered($info, $exception->getMessage(), $class)
- ) {
- return;
- }
-
- $temp = Mage::helper('M2ePro/Data_Global')->getValue('send_exception_to_server');
- if (!empty($temp)) {
- return;
- }
-
- Mage::helper('M2ePro/Data_Global')->setValue('send_exception_to_server', true);
-
- $this->send($info, $exception->getMessage(), $class);
-
- Mage::helper('M2ePro/Data_Global')->unsetValue('send_exception_to_server');
-
// @codingStandardsIgnoreLine
} catch (Exception $exceptionTemp) {
}
@@ -85,24 +61,6 @@ public function processFatal($error, $traceInfo)
$info
);
- $sendConfig = (bool)(int)Mage::helper('M2ePro/Module')->getConfig()
- ->getGroupValue('/server/fatal_error/', 'send');
-
- if (!$sendConfig || $this->isExceptionFiltered($info, $error['message'], $class)) {
- return;
- }
-
- $temp = Mage::helper('M2ePro/Data_Global')->getValue('send_exception_to_server');
- if (!empty($temp)) {
- return;
- }
-
- Mage::helper('M2ePro/Data_Global')->setValue('send_exception_to_server', true);
-
- $this->send($info, $error['message'], $class);
-
- Mage::helper('M2ePro/Data_Global')->unsetValue('send_exception_to_server');
-
// @codingStandardsIgnoreLine
} catch (Exception $exceptionTemp) {
}
@@ -332,48 +290,4 @@ protected function getAdditionalActionInfo()
}
//########################################
-
- protected function send($info, $message, $type)
- {
- $dispatcherObject = Mage::getModel('M2ePro/M2ePro_Connector_Dispatcher');
- $connectorObj = $dispatcherObject->getVirtualConnector(
- 'exception', 'add', 'entity',
- array(
- 'info' => $info,
- 'message' => $message,
- 'type' => $type
- )
- );
-
- $dispatcherObject->process($connectorObj);
- }
-
- protected function isExceptionFiltered($info, $message, $type)
- {
- if (!(bool)(int)Mage::helper('M2ePro/Module')->getConfig()->getGroupValue('/server/exceptions/', 'filters')) {
- return false;
- }
-
- $exceptionFilters = Mage::helper('M2ePro/Module')->getRegistry()->getValueFromJson('/exceptions_filters/');
- foreach ($exceptionFilters as $exceptionFilter) {
- try {
- $searchSubject = '';
- $exceptionFilter['type'] == self::FILTER_TYPE_TYPE && $searchSubject = $type;
- $exceptionFilter['type'] == self::FILTER_TYPE_MESSAGE && $searchSubject = $message;
- $exceptionFilter['type'] == self::FILTER_TYPE_INFO && $searchSubject = $info;
-
- $tempResult = preg_match($exceptionFilter['preg_match'], $searchSubject);
- } catch (Exception $exception) {
- return false;
- }
-
- if ($tempResult) {
- return true;
- }
- }
-
- return false;
- }
-
- //########################################
}
diff --git a/app/code/community/Ess/M2ePro/Helper/Module/Logger.php b/app/code/community/Ess/M2ePro/Helper/Module/Logger.php
index 6b0c1161e..333e0adaa 100644
--- a/app/code/community/Ess/M2ePro/Helper/Module/Logger.php
+++ b/app/code/community/Ess/M2ePro/Helper/Module/Logger.php
@@ -10,27 +10,13 @@ class Ess_M2ePro_Helper_Module_Logger extends Mage_Core_Helper_Abstract
{
//########################################
- public function process($logData, $class = 'undefined', $sendToServer = true)
+ public function process($logData, $class = 'undefined')
{
try {
$info = $this->getLogMessage($logData, $class);
$info .= $this->getStackTraceInfo();
$this->systemLog($class, null, $info);
-
- $sendConfig = (bool)(int)Mage::helper('M2ePro/Module')->getConfig()
- ->getGroupValue('/server/logging/', 'send');
-
- if (!$sendToServer || !$sendConfig) {
- return;
- }
-
- $info .= Mage::helper('M2ePro/Module_Log')->platformInfo();
- $info .= Mage::helper('M2ePro/Module_Log')->moduleInfo();
-
- $this->send($info, $class);
-
- // @codingStandardsIgnoreLine
} catch (Exception $exceptionTemp) {}
}
@@ -80,19 +66,4 @@ protected function getStackTraceInfo()
}
//########################################
-
- protected function send($logData, $type)
- {
- $dispatcherObject = Mage::getModel('M2ePro/M2ePro_Connector_Dispatcher');
- $connectorObj = $dispatcherObject->getVirtualConnector(
- 'logger', 'add', 'entity',
- array(
- 'info' => $logData,
- 'type' => $type
- )
- );
- $dispatcherObject->process($connectorObj);
- }
-
- //########################################
}
diff --git a/app/code/community/Ess/M2ePro/Helper/Server/Request.php b/app/code/community/Ess/M2ePro/Helper/Server/Request.php
index 7fd0bfe37..498c94023 100644
--- a/app/code/community/Ess/M2ePro/Helper/Server/Request.php
+++ b/app/code/community/Ess/M2ePro/Helper/Server/Request.php
@@ -49,8 +49,7 @@ public function single(
'curl_error_message' => $response['curl_error_message'],
'curl_info' => $response['curl_info']
),
- 'Curl Empty Response',
- false
+ 'Curl Empty Response'
);
if ($this->canRepeatRequest(
@@ -169,8 +168,7 @@ public function multiple(
'curl_error_message' => $response['curl_error_message'],
'curl_info' => $response['curl_info']
),
- 'Curl Empty Response',
- false
+ 'Curl Empty Response'
);
break;
}
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Action/Type/List/Linking.php b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Action/Type/List/Linking.php
index 45e85f95f..9da4b65ad 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Action/Type/List/Linking.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Action/Type/List/Linking.php
@@ -215,7 +215,7 @@ protected function linkChildProduct()
try {
$parentTypeModel->getProcessor()->process();
} catch (\Exception $exception) {
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
return false;
}
@@ -264,7 +264,7 @@ protected function linkParentProduct()
try {
$typeModel->getProcessor()->process();
} catch (\Exception $exception) {
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
return false;
}
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/RemoveHandler.php b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/RemoveHandler.php
index 31df4582c..2bbb7da8b 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/RemoveHandler.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/RemoveHandler.php
@@ -52,7 +52,7 @@ protected function eventAfterProcess()
try {
$parentTypeModel->getProcessor()->process();
} catch (\Exception $exception) {
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
}
}
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent.php b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent.php
index 4d5fa6fa6..4ebe79f6f 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent.php
@@ -754,7 +754,7 @@ protected function getUnusedOptions($currentOptions, $usedOptions)
foreach ($currentOptions as $id => $currentOption) {
$isExist = false;
foreach ($usedOptions as $option) {
- if ($option != $currentOption) {
+ if ($option !== $currentOption) {
continue;
}
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Mass.php b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Mass.php
index 55a647349..7545dd3ad 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Mass.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Mass.php
@@ -53,7 +53,7 @@ public function execute()
try {
$processor->process();
} catch (\Exception $exception) {
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
continue;
}
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Sub/Options.php b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Sub/Options.php
index 84b130bab..3c75c8fd8 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Sub/Options.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Product/Variation/Manager/Type/Relation/Parent/Processor/Sub/Options.php
@@ -57,6 +57,11 @@ protected function check()
}
if ($typeModel->isVariationChannelMatched()) {
+ if (empty($channelVariations[$amazonListingProduct->getGeneralId()])) {
+ $typeModel->unsetChannelVariation();
+ continue;
+ }
+
$currentChannelOptions = $channelVariations[$amazonListingProduct->getGeneralId()];
$childChannelOptions = $typeModel->getChannelOptions();
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Abstract.php b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Abstract.php
index bcfcfcf86..936d8d496 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Abstract.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Abstract.php
@@ -78,7 +78,7 @@ protected function processErrorMessages($response)
);
$exception = new Exception($message->getText());
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
}
}
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Account.php b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Account.php
index 3f0167bf1..a58504aae 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Account.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Account.php
@@ -64,7 +64,7 @@ protected function sendData($command, array $data, $backUrl)
try {
$result = $this->getHelper()->sendRequest($command, $requestData);
} catch (Exception $e) {
- Mage::helper('M2ePro/Module_Exception')->process($e, false);
+ Mage::helper('M2ePro/Module_Exception')->process($e);
$this->getSynchronizationLog()->addMessageFromException($e);
return false;
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Product.php b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Product.php
index dace4b905..ccf5ce8b1 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Product.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Action/Product.php
@@ -58,7 +58,7 @@ public function getActionResponseData($responseToken)
)
);
} catch (Exception $e) {
- Mage::helper('M2ePro/Module_Exception')->process($e, false);
+ Mage::helper('M2ePro/Module_Exception')->process($e);
$this->getSynchronizationLog()->addMessageFromException($e);
return false;
@@ -96,7 +96,7 @@ protected function sendData($command, array $offersData, $backUrl)
)
);
} catch (Exception $e) {
- Mage::helper('M2ePro/Module_Exception')->process($e, false);
+ Mage::helper('M2ePro/Module_Exception')->process($e);
$this->getSynchronizationLog()->addMessageFromException($e);
return false;
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Synchronization/Abstract.php b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Synchronization/Abstract.php
index 2c47faa44..419d410d2 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Synchronization/Abstract.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Synchronization/Abstract.php
@@ -43,7 +43,7 @@ protected function sendRequest(array $filters = array())
$requestData
);
} catch (Exception $e) {
- Mage::helper('M2ePro/Module_Exception')->process($e, false);
+ Mage::helper('M2ePro/Module_Exception')->process($e);
$this->getSynchronizationLog()->addMessageFromException($e);
return false;
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Updating.php b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Updating.php
index 6a7352522..94c85602d 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Updating.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Repricing/Updating.php
@@ -80,7 +80,7 @@ protected function sendData(array $changesData)
)
);
} catch (Exception $e) {
- Mage::helper('M2ePro/Module_Exception')->process($e, false);
+ Mage::helper('M2ePro/Module_Exception')->process($e);
$this->getSynchronizationLog()->addMessageFromException($e);
return false;
diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Search/Settings.php b/app/code/community/Ess/M2ePro/Model/Amazon/Search/Settings.php
index 7202a2e0b..db4bab200 100644
--- a/app/code/community/Ess/M2ePro/Model/Amazon/Search/Settings.php
+++ b/app/code/community/Ess/M2ePro/Model/Amazon/Search/Settings.php
@@ -242,7 +242,7 @@ protected function processParentResult(array $result)
try {
$typeModel->getProcessor()->process();
} catch (\Exception $exception) {
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
}
}
diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Connection/Multiple.php b/app/code/community/Ess/M2ePro/Model/Connector/Connection/Multiple.php
index e9804945e..0a25edae3 100644
--- a/app/code/community/Ess/M2ePro/Model/Connector/Connection/Multiple.php
+++ b/app/code/community/Ess/M2ePro/Model/Connector/Connection/Multiple.php
@@ -68,11 +68,11 @@ protected function processRequestResult(array $result)
} catch (Ess_M2ePro_Model_Exception_Connection_InvalidResponse $exception) {
$responseError = true;
$this->_responses[$key] = $this->createFailedResponse($this->getConnectionErrorMessage());
- Mage::helper('M2ePro/Module_Logger')->process($response, 'Invalid Response Format', false);
+ Mage::helper('M2ePro/Module_Logger')->process($response, 'Invalid Response Format');
} catch (Exception $exception) {
$responseError = true;
$this->_responses[$key] = $this->createFailedResponse($this->getConnectionErrorMessage());
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
}
}
diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Connection/Single.php b/app/code/community/Ess/M2ePro/Model/Connector/Connection/Single.php
index 26ffdb91c..3879e8291 100644
--- a/app/code/community/Ess/M2ePro/Model/Connector/Connection/Single.php
+++ b/app/code/community/Ess/M2ePro/Model/Connector/Connection/Single.php
@@ -45,7 +45,7 @@ protected function processRequestResult(array $result)
} catch (Ess_M2ePro_Model_Exception_Connection_InvalidResponse $exception) {
$this->isTryToSwitchEndpointOnError() && Mage::helper('M2ePro/Server')->switchEndpoint();
- Mage::helper('M2ePro/Module_Logger')->process($result, 'Invalid Response Format', false);
+ Mage::helper('M2ePro/Module_Logger')->process($result, 'Invalid Response Format');
throw new Ess_M2ePro_Model_Exception_Connection($this->getConnectionErrorMessage(), $result);
}
diff --git a/app/code/community/Ess/M2ePro/Model/Cron/Task/Ebay/Listing/Product/ProcessScheduledActions.php b/app/code/community/Ess/M2ePro/Model/Cron/Task/Ebay/Listing/Product/ProcessScheduledActions.php
index f39a37c64..8dcc52fef 100644
--- a/app/code/community/Ess/M2ePro/Model/Cron/Task/Ebay/Listing/Product/ProcessScheduledActions.php
+++ b/app/code/community/Ess/M2ePro/Model/Cron/Task/Ebay/Listing/Product/ProcessScheduledActions.php
@@ -68,7 +68,7 @@ protected function performActions()
$listingProduct = $scheduledAction->getListingProduct();
$additionalData = $scheduledAction->getAdditionalData();
} catch (\Ess_M2ePro_Model_Exception_Logic $e) {
- Mage::helper('M2ePro/Module_Exception')->process($e, false);
+ Mage::helper('M2ePro/Module_Exception')->process($e);
$scheduledAction->delete();
continue;
diff --git a/app/code/community/Ess/M2ePro/Model/Cron/Task/System/Processing/ProcessResult.php b/app/code/community/Ess/M2ePro/Model/Cron/Task/System/Processing/ProcessResult.php
index b44541ca5..0eca5b68b 100644
--- a/app/code/community/Ess/M2ePro/Model/Cron/Task/System/Processing/ProcessResult.php
+++ b/app/code/community/Ess/M2ePro/Model/Cron/Task/System/Processing/ProcessResult.php
@@ -52,7 +52,7 @@ protected function removeMissedProcessingLocks()
if (!empty($logData)) {
Mage::helper('M2ePro/Module_Logger')->process(
- $logData, 'Processing Locks Records were broken and removed', false
+ $logData, 'Processing Locks Records were broken and removed'
);
}
}
diff --git a/app/code/community/Ess/M2ePro/Model/Magento/Customer.php b/app/code/community/Ess/M2ePro/Model/Magento/Customer.php
index 7c6ec4078..80ee5b8ef 100644
--- a/app/code/community/Ess/M2ePro/Model/Magento/Customer.php
+++ b/app/code/community/Ess/M2ePro/Model/Magento/Customer.php
@@ -103,7 +103,7 @@ public function buildAttribute($code, $label)
$attribute->getId(), $defaultAttributeSetId, $this->getDefaultAttributeGroupId($defaultAttributeSetId)
);
} catch (Exception $exception) {
- Mage::helper('M2ePro/Module_Exception')->process($exception, false);
+ Mage::helper('M2ePro/Module_Exception')->process($exception);
}
}
diff --git a/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php b/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php
index 128a7f1d5..8d7a4cac7 100644
--- a/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php
+++ b/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php
@@ -46,7 +46,7 @@ public function getVariationTypeStandard(array $options)
$tempOption[$variationOption['attribute']] = $variationOption['option'];
}
- if ($options == $tempOption) {
+ if (!array_diff_assoc($options,$tempOption)) {
return $variation;
}
}
@@ -242,7 +242,7 @@ protected function getConfigurableVariationsTypeStandard()
->setProduct($childProduct)
->getAttributeValue($attributeCode);
- if (empty($attributeValue)) {
+ if ($attributeValue === '' || $attributeValue === null) {
break;
}
diff --git a/app/code/community/Ess/M2ePro/Model/Servicing/Dispatcher.php b/app/code/community/Ess/M2ePro/Model/Servicing/Dispatcher.php
index dd8cd93a7..b8fb9c6e6 100644
--- a/app/code/community/Ess/M2ePro/Model/Servicing/Dispatcher.php
+++ b/app/code/community/Ess/M2ePro/Model/Servicing/Dispatcher.php
@@ -163,7 +163,6 @@ public function getRegisteredTasks()
'license',
'messages',
'settings',
- 'exceptions',
'marketplaces',
'cron',
'statistic',
@@ -179,7 +178,6 @@ public function getRegisteredTasks()
public function getSlowTasks()
{
return array(
- 'exceptions',
'statistic',
'analytics'
);
diff --git a/app/code/community/Ess/M2ePro/Model/Servicing/Task/Exceptions.php b/app/code/community/Ess/M2ePro/Model/Servicing/Task/Exceptions.php
deleted file mode 100644
index 1eda43b36..000000000
--- a/app/code/community/Ess/M2ePro/Model/Servicing/Task/Exceptions.php
+++ /dev/null
@@ -1,98 +0,0 @@
-prepareAndCheckReceivedData($data);
-
- Mage::helper('M2ePro/Module')->getConfig()->setGroupValue(
- '/server/exceptions/', 'filters', (int)$data['is_filter_enable']
- );
- Mage::helper('M2ePro/Module')->getConfig()->setGroupValue(
- '/server/fatal_error/', 'send', (int)$data['send_to_server']['fatal']
- );
- Mage::helper('M2ePro/Module')->getConfig()->setGroupValue(
- '/server/exceptions/', 'send', (int)$data['send_to_server']['exception']
- );
-
- Mage::helper('M2ePro/Module')->getRegistry()->setValue('/exceptions_filters/', $data['filters']);
- }
-
- //########################################
-
- protected function prepareAndCheckReceivedData($data)
- {
- // Send To Server
- // ---------------------------------------
- if (!isset($data['send_to_server']['fatal']) || !is_bool($data['send_to_server']['fatal'])) {
- $data['send_to_server']['fatal'] = true;
- }
-
- if (!isset($data['send_to_server']['exception']) || !is_bool($data['send_to_server']['exception'])) {
- $data['send_to_server']['exception'] = true;
- }
-
- // ---------------------------------------
-
- // Exceptions Filters
- // ---------------------------------------
- if (!isset($data['is_filter_enable']) || !is_bool($data['is_filter_enable'])) {
- $data['is_filter_enable'] = false;
- }
-
- if (!isset($data['filters']) || !is_array($data['filters'])) {
- $data['filters'] = array();
- }
-
- $validatedFilters = array();
-
- $allowedFilterTypes = array(
- Ess_M2ePro_Helper_Module_Exception::FILTER_TYPE_TYPE,
- Ess_M2ePro_Helper_Module_Exception::FILTER_TYPE_INFO,
- Ess_M2ePro_Helper_Module_Exception::FILTER_TYPE_MESSAGE
- );
-
- foreach ($data['filters'] as $filter) {
- if (!isset($filter['preg_match']) || $filter['preg_match'] == '' ||
- !in_array($filter['type'], $allowedFilterTypes)) {
- continue;
- }
-
- $validatedFilters[] = $filter;
- }
-
- $data['filters'] = $validatedFilters;
- // ---------------------------------------
-
- return $data;
- }
-
- //########################################
-}
diff --git a/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php b/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php
index 198f83d61..9074ac5b2 100644
--- a/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php
+++ b/app/code/community/Ess/M2ePro/Model/Servicing/Task/Settings.php
@@ -46,7 +46,6 @@ public function processResponseData(array $data)
$this->updateServersBaseUrls($data);
$this->updateDefaultServerBaseUrlIndex($data);
$this->updateLastVersion($data);
- $this->updateSendLogs($data);
$this->updateAnalytics($data);
$this->updateStatistic($data);
}
@@ -164,17 +163,6 @@ protected function updateLastVersion(array $data)
);
}
- protected function updateSendLogs(array $data)
- {
- if (!isset($data['send_logs'])) {
- return;
- }
-
- Mage::helper('M2ePro/Module')->getConfig()->setGroupValue(
- '/server/logging/', 'send', (int)$data['send_logs']
- );
- }
-
protected function updateAnalytics(array $data)
{
if (empty($data['analytics'])) {
diff --git a/app/code/community/Ess/M2ePro/Model/StopQueue.php b/app/code/community/Ess/M2ePro/Model/StopQueue.php
index 17137c793..c7f119d94 100644
--- a/app/code/community/Ess/M2ePro/Model/StopQueue.php
+++ b/app/code/community/Ess/M2ePro/Model/StopQueue.php
@@ -63,8 +63,7 @@ public function add(Ess_M2ePro_Model_Listing_Product $listingProduct, $actionTyp
$sku,
$exception->getMessage()
),
- 'Product was not added to stop queue',
- false
+ 'Product was not added to stop queue'
);
Mage::helper('M2ePro/Module_Exception')->process($exception);
diff --git a/app/code/community/Ess/M2ePro/Model/Walmart/Listing/Product/Variation/Manager/Type/Relation/Parent.php b/app/code/community/Ess/M2ePro/Model/Walmart/Listing/Product/Variation/Manager/Type/Relation/Parent.php
index 2f1f74242..177ed4070 100644
--- a/app/code/community/Ess/M2ePro/Model/Walmart/Listing/Product/Variation/Manager/Type/Relation/Parent.php
+++ b/app/code/community/Ess/M2ePro/Model/Walmart/Listing/Product/Variation/Manager/Type/Relation/Parent.php
@@ -511,7 +511,7 @@ protected function getUnusedOptions($currentOptions, $usedOptions)
foreach ($currentOptions as $id => $currentOption) {
$isExist = false;
foreach ($usedOptions as $option) {
- if ($option != $currentOption) {
+ if ($option !== $currentOption) {
continue;
}
diff --git a/app/code/community/Ess/M2ePro/Observer/Shipment/Item.php b/app/code/community/Ess/M2ePro/Observer/Shipment/Item.php
index 043cecdf0..4de799d4d 100644
--- a/app/code/community/Ess/M2ePro/Observer/Shipment/Item.php
+++ b/app/code/community/Ess/M2ePro/Observer/Shipment/Item.php
@@ -25,8 +25,7 @@ public function process()
$class = get_class($this);
Mage::helper('M2ePro/Module_Logger')->process(
array(),
- "M2ePro observer $class cannot get shipment data from event or database",
- false
+ "M2ePro observer $class cannot get shipment data from event or database"
);
return;
diff --git a/app/code/community/Ess/M2ePro/Observer/Shipment/Track.php b/app/code/community/Ess/M2ePro/Observer/Shipment/Track.php
index 9832c3999..19ede35d4 100644
--- a/app/code/community/Ess/M2ePro/Observer/Shipment/Track.php
+++ b/app/code/community/Ess/M2ePro/Observer/Shipment/Track.php
@@ -25,8 +25,7 @@ public function process()
$class = get_class($this);
Mage::helper('M2ePro/Module_Logger')->process(
array(),
- "M2ePro observer $class cannot get shipment data from event or database",
- false
+ "M2ePro observer $class cannot get shipment data from event or database"
);
return;
diff --git a/app/code/community/Ess/M2ePro/composer.json b/app/code/community/Ess/M2ePro/composer.json
index c2a05fa14..3d5ce24f2 100644
--- a/app/code/community/Ess/M2ePro/composer.json
+++ b/app/code/community/Ess/M2ePro/composer.json
@@ -2,7 +2,7 @@
"name": "m2epro/magento1-extension",
"description": "M2E Pro is a Magento trusted (TM), award-winning extension, which allows merchants of all sizes to fully integrate Magento based system(s) into eBay/Amazon/Walmart platforms.",
"type": "magento-module",
- "version": "6.21.2",
+ "version": "6.21.3",
"license": "proprietary",
"keywords": ["ebay", "amazon", "walmart", "magento"],
"homepage": "https://www.m2epro.com/",
diff --git a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/AccountController.php b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/AccountController.php
index fbc08df07..2f3fbe099 100644
--- a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/AccountController.php
+++ b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/AccountController.php
@@ -334,7 +334,7 @@ public function isReadyForDocumentGenerationAction()
/** @var Ess_M2ePro_Model_Listing $listing */
$storeData = Mage::getStoreConfig('general/store_information', $listing->getStoreId());
- if (empty($storeData['name']) || empty($storeData['address '])) {
+ if (empty($storeData['name']) || empty($storeData['address'])) {
$result = false;
break;
}
diff --git a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/Listing/Variation/Product/ManageController.php b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/Listing/Variation/Product/ManageController.php
index a91a39276..95a54313a 100644
--- a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/Listing/Variation/Product/ManageController.php
+++ b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Amazon/Listing/Variation/Product/ManageController.php
@@ -220,7 +220,7 @@ public function setChildListingProductOptionsAction()
$result['vocabulary_attribute_options'] = $optionsForAddingToVocabulary;
}
- return $this->getResponse()->setBody(Mage::helper('M2ePro')->jsonEncode($result));
+ return $this->getResponse()->setBody(json_encode($result, JSON_FORCE_OBJECT));
}
foreach ($optionsForAddingToVocabulary as $channelAttribute => $options) {
@@ -682,7 +682,7 @@ public function createNewChildAction()
$result['vocabulary_attribute_options'] = $optionsForAddingToVocabulary;
}
- return $this->getResponse()->setBody(Mage::helper('M2ePro')->jsonEncode($result));
+ return $this->getResponse()->setBody(json_encode($result, JSON_FORCE_OBJECT));
}
foreach ($optionsForAddingToVocabulary as $channelAttribute => $options) {
diff --git a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Walmart/Listing/Variation/Product/ManageController.php b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Walmart/Listing/Variation/Product/ManageController.php
index 660c4e44e..c99fbf577 100644
--- a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Walmart/Listing/Variation/Product/ManageController.php
+++ b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Walmart/Listing/Variation/Product/ManageController.php
@@ -224,7 +224,7 @@ public function setChildListingProductOptionsAction()
$result['vocabulary_attribute_options'] = $optionsForAddingToVocabulary;
}
- return $this->getResponse()->setBody(Mage::helper('M2ePro')->jsonEncode($result));
+ return $this->getResponse()->setBody(json_encode($result, JSON_FORCE_OBJECT));
}
foreach ($optionsForAddingToVocabulary as $channelAttribute => $options) {
diff --git a/app/code/community/Ess/M2ePro/etc/config.xml b/app/code/community/Ess/M2ePro/etc/config.xml
index ebae45a75..951b8c787 100644
--- a/app/code/community/Ess/M2ePro/etc/config.xml
+++ b/app/code/community/Ess/M2ePro/etc/config.xml
@@ -2,7 +2,7 @@
- 6.21.2
+ 6.21.3
diff --git a/app/code/community/Ess/M2ePro/sql/Install/General.php b/app/code/community/Ess/M2ePro/sql/Install/General.php
index 0c5aa3b6c..2e588200a 100644
--- a/app/code/community/Ess/M2ePro/sql/Install/General.php
+++ b/app/code/community/Ess/M2ePro/sql/Install/General.php
@@ -814,10 +814,6 @@ public function execute()
('/license/ip/', 'is_valid', NULL, NOW(), NOW()),
('/license/info/', 'email', NULL, NOW(), NOW()),
('/server/', 'application_key', 'b79a495170da3b081c9ebae6c255c7fbe1b139b5', NOW(), NOW()),
- ('/server/exceptions/', 'send', '1', NOW(), NOW()),
- ('/server/exceptions/', 'filters', '0', NOW(), NOW()),
- ('/server/fatal_error/', 'send', '1', NOW(), NOW()),
- ('/server/logging/', 'send', 1, NOW(), NOW()),
('/server/location/1/', 'baseurl', 'https://s1.m2epro.com/', NOW(), NOW()),
('/server/location/', 'default_index', '1', NOW(), NOW()),
('/server/location/', 'current_index', '1', NOW(), NOW()),
diff --git a/app/code/community/Ess/M2ePro/sql/Update/y22_m04/RemoveUnnecessaryConfig.php b/app/code/community/Ess/M2ePro/sql/Update/y22_m04/RemoveUnnecessaryConfig.php
new file mode 100644
index 000000000..2c4adb037
--- /dev/null
+++ b/app/code/community/Ess/M2ePro/sql/Update/y22_m04/RemoveUnnecessaryConfig.php
@@ -0,0 +1,19 @@
+_installer->getMainConfigModifier()->delete('/server/exceptions/', 'send');
+ $this->_installer->getMainConfigModifier()->delete('/server/exceptions/', 'filters');
+ $this->_installer->getMainConfigModifier()->delete('/server/fatal_error/', 'send');
+ $this->_installer->getMainConfigModifier()->delete('/server/logging/', 'send');
+ }
+
+ //########################################
+}
diff --git a/app/code/community/Ess/M2ePro/sql/Upgrade/v6_21_2__v6_21_3/Config.php b/app/code/community/Ess/M2ePro/sql/Upgrade/v6_21_2__v6_21_3/Config.php
new file mode 100644
index 000000000..7eb058b9a
--- /dev/null
+++ b/app/code/community/Ess/M2ePro/sql/Upgrade/v6_21_2__v6_21_3/Config.php
@@ -0,0 +1,21 @@
+getVirtualChannelAttributes();
- getProductVariationsTree()) ?>
+ getProductVariationsTree(), JSON_FORCE_OBJECT) ?>
- getChannelVariationsTree()) ?>
+ getChannelVariationsTree(), JSON_FORCE_OBJECT) ?>
__('Cancel'); ?>
@@ -164,4 +164,4 @@ $virtualChannelAttributes = $this->getVirtualChannelAttributes();