Example #1
0
 protected function markAsPotentialDuplicate()
 {
     $additionalData = $this->listingProduct->getAdditionalData();
     $additionalData['last_failed_action_data'] = array('native_request_data' => $this->getRequestDataObject()->getData(), 'previous_status' => $this->listingProduct->getStatus(), 'action' => $this->getActionType(), 'request_time' => $this->getResponse()->getRequestTime());
     $this->listingProduct->addData(array('status' => \Ess\M2ePro\Model\Listing\Product::STATUS_BLOCKED, 'additional_data' => json_encode($additionalData)))->save();
     $this->listingProduct->getChildObject()->updateVariationsStatus();
 }
Example #2
0
 protected function isTriedToList(\Ess\M2ePro\Model\Listing\Product $listingProduct)
 {
     $listingProductAdditionalData = $listingProduct->getAdditionalData();
     if (empty($listingProductAdditionalData['last_list_attempt_date'])) {
         return false;
     }
     $lastListAttemptDate = new \DateTime($listingProductAdditionalData['last_list_attempt_date'], new \DateTimeZone('UTC'));
     $minDate = new \DateTime('now', new \DateTimeZone('UTC'));
     $minDate->modify('- 3 days');
     if ((int) $lastListAttemptDate->format('U') < (int) $minDate->format('U')) {
         return false;
     }
     return true;
 }
Example #3
0
 /**
  * @param \Ess\M2ePro\Model\Listing\Product $listingProduct
  * @return bool
  * @throws \Ess\M2ePro\Model\Exception
  * @throws \Ess\M2ePro\Model\Exception\Logic
  * @throws \Exception
  */
 public function isMeetListRequirements(\Ess\M2ePro\Model\Listing\Product $listingProduct)
 {
     if (!$listingProduct->isNotListed() || $listingProduct->isBlocked()) {
         return false;
     }
     if (!$listingProduct->isListable()) {
         return false;
     }
     /** @var \Ess\M2ePro\Model\Amazon\Listing\Product $amazonListingProduct */
     $amazonListingProduct = $listingProduct->getChildObject();
     $variationManager = $amazonListingProduct->getVariationManager();
     $searchGeneralId = $amazonListingProduct->getListingSource()->getSearchGeneralId();
     $searchWorldwideId = $amazonListingProduct->getListingSource()->getSearchWorldwideId();
     if ($variationManager->isVariationProduct()) {
         if ($variationManager->isPhysicalUnit() && !$variationManager->getTypeModel()->isVariationProductMatched()) {
             return false;
         }
         if ($variationManager->isRelationParentType() && $amazonListingProduct->getGeneralId()) {
             return false;
         }
         if ($variationManager->isRelationChildType()) {
             if (!$amazonListingProduct->getGeneralId() && !$amazonListingProduct->isGeneralIdOwner()) {
                 return false;
             }
         }
         if ($variationManager->isIndividualType()) {
             if (!$amazonListingProduct->getGeneralId() && ($listingProduct->getMagentoProduct()->isSimpleTypeWithCustomOptions() || $listingProduct->getMagentoProduct()->isBundleType())) {
                 return false;
             }
         }
         if ($variationManager->isRelationParentType() && empty($searchGeneralId) && !$amazonListingProduct->isGeneralIdOwner()) {
             return false;
         }
     }
     if (!$amazonListingProduct->getGeneralId() && !$amazonListingProduct->isGeneralIdOwner() && empty($searchGeneralId) && empty($searchWorldwideId)) {
         return false;
     }
     $amazonSynchronizationTemplate = $amazonListingProduct->getAmazonSynchronizationTemplate();
     if (!$amazonSynchronizationTemplate->isListMode()) {
         return false;
     }
     if ($listingProduct->isSetProcessingLock('in_action')) {
         return false;
     }
     $variationResource = $this->activeRecordFactory->getObject('Listing\\Product\\Variation')->getResource();
     $additionalData = $listingProduct->getAdditionalData();
     $log = $this->activeRecordFactory->getObject('Log\\AbstractLog');
     if ($amazonSynchronizationTemplate->isListStatusEnabled()) {
         if (!$listingProduct->getMagentoProduct()->isStatusEnabled()) {
             // M2ePro\TRANSLATIONS
             // Product was not automatically Listed according to the List Rules in Synchronization Policy. Status of Magento Product is Disabled (%date%) though in Synchronization Rules “Product Status” is set to Enabled.
             $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                  Status of Magento Product is Disabled (%date%) though in Synchronization Rules “Product Status”
                  is set to Enabled.', array('date' => $this->getHelper('Data')->getCurrentGmtDate()));
             $additionalData['synch_template_list_rules_note'] = $note;
             $listingProduct->setSettings('additional_data', $additionalData)->save();
             return false;
         } else {
             if ($variationManager->isPhysicalUnit() && $variationManager->getTypeModel()->isVariationProductMatched()) {
                 $temp = $variationResource->isAllStatusesDisabled($listingProduct->getId(), $listingProduct->getListing()->getStoreId());
                 if (!is_null($temp) && $temp) {
                     // M2ePro\TRANSLATIONS
                     // Product was not automatically Listed according to the List Rules in Synchronization Policy. Status of Magento Product Variation is Disabled (%date%) though in Synchronization Rules “Product Status“ is set to Enabled.
                     $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Status of Magento Product Variation is Disabled (%date%) though in Synchronization Rules
                      “Product Status“ is set to Enabled.', array('date' => $this->getHelper('Data')->getCurrentGmtDate()));
                     $additionalData['synch_template_list_rules_note'] = $note;
                     $listingProduct->setSettings('additional_data', $additionalData)->save();
                     return false;
                 }
             }
         }
     }
     if ($amazonSynchronizationTemplate->isListIsInStock()) {
         if (!$listingProduct->getMagentoProduct()->isStockAvailability()) {
             // M2ePro\TRANSLATIONS
             // Product was not automatically Listed according to the List Rules in Synchronization Policy. Stock Availability of Magento Product is Out of Stock though in Synchronization Rules “Stock Availability” is set to In Stock.
             $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                  Stock Availability of Magento Product is Out of Stock though in
                  Synchronization Rules “Stock Availability” is set to In Stock.', array('date' => $this->getHelper('Data')->getCurrentGmtDate()));
             $additionalData['synch_template_list_rules_note'] = $note;
             $listingProduct->setSettings('additional_data', $additionalData)->save();
             return false;
         } else {
             if ($variationManager->isPhysicalUnit() && $variationManager->getTypeModel()->isVariationProductMatched()) {
                 $temp = $variationResource->isAllDoNotHaveStockAvailabilities($listingProduct->getId(), $listingProduct->getListing()->getStoreId());
                 if (!is_null($temp) && $temp) {
                     // M2ePro\TRANSLATIONS
                     // Product was not automatically Listed according to the List Rules in Synchronization Policy. Stock Availability of Magento Product Variation is Out of Stock though in Synchronization Rules “Stock Availability” is set to In Stock.
                     $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Stock Availability of Magento Product Variation is Out of Stock though
                      in Synchronization Rules “Stock Availability” is set to In Stock.', array('date' => $this->getHelper('Data')->getCurrentGmtDate()));
                     $additionalData['synch_template_list_rules_note'] = $note;
                     $listingProduct->setSettings('additional_data', $additionalData)->save();
                     return false;
                 }
             }
         }
     }
     if ($amazonSynchronizationTemplate->isListWhenQtyMagentoHasValue()) {
         $result = false;
         if ($variationManager->isRelationParentType()) {
             $productQty = (int) $listingProduct->getMagentoProduct()->getQty(true);
         } else {
             $productQty = (int) $amazonListingProduct->getQty(true);
         }
         $typeQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueType();
         $minQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueMin();
         $maxQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueMax();
         $note = '';
         if ($typeQty == \Ess\M2ePro\Model\Amazon\Template\Synchronization::LIST_QTY_LESS) {
             if ($productQty <= $minQty) {
                 $result = true;
             } else {
                 // M2ePro\TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity“ is set to less then  %template_min_qty%.
                 $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity“ is set to less then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => $this->getHelper('Data')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == \Ess\M2ePro\Model\Amazon\Template\Synchronization::LIST_QTY_MORE) {
             if ($productQty >= $minQty) {
                 $result = true;
             } else {
                 // M2ePro\TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity” is set to more then  %template_min_qty%.
                 $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity” is set to more then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => $this->getHelper('Data')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == \Ess\M2ePro\Model\Amazon\Template\Synchronization::LIST_QTY_BETWEEN) {
             if ($productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             } else {
                 // M2ePro\TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity” is set between  %template_min_qty% and %template_max_qty%.
                 $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity” is set between  %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => $this->getHelper('Data')->getCurrentGmtDate()));
             }
         }
         if (!$result) {
             if (!empty($note)) {
                 $additionalData['synch_template_list_rules_note'] = $note;
                 $listingProduct->setSettings('additional_data', $additionalData)->save();
             }
             return false;
         }
     }
     if ($amazonSynchronizationTemplate->isListWhenQtyCalculatedHasValue() && !$variationManager->isRelationParentType()) {
         $result = false;
         $productQty = (int) $amazonListingProduct->getQty(false);
         $typeQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueType();
         $minQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueMin();
         $maxQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueMax();
         $note = '';
         if ($typeQty == \Ess\M2ePro\Model\Amazon\Template\Synchronization::LIST_QTY_LESS) {
             if ($productQty <= $minQty) {
                 $result = true;
             } else {
                 // M2ePro\TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set to less then %template_min_qty%.
                 $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set to less then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => $this->getHelper('Data')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == \Ess\M2ePro\Model\Amazon\Template\Synchronization::LIST_QTY_MORE) {
             if ($productQty >= $minQty) {
                 $result = true;
             } else {
                 // M2ePro\TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set to more then  %template_min_qty%.
                 $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set to more then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => $this->getHelper('Data')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == \Ess\M2ePro\Model\Amazon\Template\Synchronization::LIST_QTY_BETWEEN) {
             if ($productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             } else {
                 // M2ePro\TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set between  %template_min_qty% and %template_max_qty%.
                 $note = $log->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set between  %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => $this->getHelper('Data')->getCurrentGmtDate()));
             }
         }
         if (!$result) {
             if (!empty($note)) {
                 $additionalData['synch_template_list_rules_note'] = $note;
                 $listingProduct->setSettings('additional_data', $additionalData)->save();
             }
             return false;
         }
     }
     if ($listingProduct->getSynchStatus() != \Ess\M2ePro\Model\Listing\Product::SYNCH_STATUS_NEED && $this->isTriedToList($listingProduct) && $this->isChangeInitiatorOnlyInspector($listingProduct)) {
         return false;
     }
     return true;
 }
Example #4
0
 private function setListAttemptData(\Ess\M2ePro\Model\Listing\Product $listingProduct)
 {
     $additionalData = $listingProduct->getAdditionalData();
     $additionalData['last_list_attempt_date'] = $this->getHelper('Data')->getCurrentGmtDate();
     $listingProduct->setSettings('additional_data', $additionalData);
     $listingProduct->save();
 }
 protected function updateProduct(\Ess\M2ePro\Model\Listing\Product $listingProduct, array $response)
 {
     $productData = array();
     $descriptionTemplate = $listingProduct->getChildObject()->getDescriptionTemplate();
     $oldDescriptionTemplateId = $descriptionTemplate->getId();
     if (!isset($this->descriptionTemplatesIds[$oldDescriptionTemplateId]) && (trim($descriptionTemplate->getData('title_template')) != '#ebay_translated_title#' || trim($descriptionTemplate->getData('subtitle_template')) != '#ebay_translated_subtitle#' || trim($descriptionTemplate->getData('description_template')) != '#ebay_translated_description#')) {
         $data = $descriptionTemplate->getDataSnapshot();
         unset($data['id'], $data['update_date'], $data['create_date']);
         $data['title'] = $data['title'] . $this->getHelper('Module\\Translation')->__(' (Changed because Translation Service applied.)');
         $data['title_mode'] = \Ess\M2ePro\Model\Ebay\Template\Description::TITLE_MODE_CUSTOM;
         $data['title_template'] = '#ebay_translated_title#';
         $data['subtitle_mode'] = \Ess\M2ePro\Model\Ebay\Template\Description::SUBTITLE_MODE_CUSTOM;
         $data['subtitle_template'] = '#ebay_translated_subtitle#';
         $data['description_mode'] = \Ess\M2ePro\Model\Ebay\Template\Description::DESCRIPTION_MODE_CUSTOM;
         $data['description_template'] = '#ebay_translated_description#';
         $data['is_custom_template'] = 1;
         $newDescriptionTemplate = $this->modelFactory->getObject('Ebay\\Template\\Manager')->setTemplate(\Ess\M2ePro\Model\Ebay\Template\Manager::TEMPLATE_DESCRIPTION)->getTemplateBuilder()->build($data);
         $this->descriptionTemplatesIds[$oldDescriptionTemplateId] = $newDescriptionTemplate->getId();
     }
     if (isset($this->descriptionTemplatesIds[$oldDescriptionTemplateId])) {
         $productData['template_description_custom_id'] = $this->descriptionTemplatesIds[$oldDescriptionTemplateId];
         $productData['template_description_mode'] = \Ess\M2ePro\Model\Ebay\Template\Manager::MODE_CUSTOM;
     }
     $attributes = array('ebay_translated_title' => array('label' => 'Ebay Translated Title', 'type' => 'text'), 'ebay_translated_subtitle' => array('label' => 'Ebay Translated Subtitle', 'type' => 'text'), 'ebay_translated_description' => array('label' => 'Ebay Translated Description', 'type' => 'textarea'));
     $this->checkAndCreateMagentoAttributes($listingProduct->getMagentoProduct(), $attributes);
     $listingProduct->getMagentoProduct()->setAttributeValue('ebay_translated_title', $response['title'])->setAttributeValue('ebay_translated_subtitle', $response['subtitle'])->setAttributeValue('ebay_translated_description', $response['description']);
     //------------------------------
     $categoryPath = !is_null($response['category']['primary_id']) ? $this->getHelper('Component\\Ebay\\Category\\Ebay')->getPath((int) $response['category']['primary_id'], $this->params['marketplace_id']) : '';
     $response['category']['path'] = $categoryPath;
     if ($categoryPath) {
         $data = $this->activeRecordFactory->getObject('Ebay\\Template\\Category')->getDefaultSettings();
         $data['category_main_id'] = (int) $response['category']['primary_id'];
         $data['category_main_path'] = $categoryPath;
         $data['marketplace_id'] = $this->params['marketplace_id'];
         $data['specifics'] = $this->getSpecificsData($response['item_specifics']);
         $productData['template_category_id'] = $this->modelFactory->getObject('Ebay\\Template\\Category\\Builder')->build($data)->getId();
     } else {
         $response['category']['primary_id'] = null;
     }
     $additionalData = $listingProduct->getAdditionalData();
     $additionalData['translation_service']['to'] = array_merge($additionalData['translation_service']['to'], $response);
     $productData['additional_data'] = json_encode($additionalData);
     $listingProduct->addData($productData)->save();
     $listingProduct->getChildObject()->addData(array('translation_status' => \Ess\M2ePro\Model\Ebay\Listing\Product::TRANSLATION_STATUS_TRANSLATED, 'translated_date' => $this->getHelper('Data')->getCurrentGmtDate()))->save();
 }
 private function modifyAndLogListingProduct(\Ess\M2ePro\Model\Listing\Product $listingProduct, $status, $duplicateItemId = null)
 {
     /** @var \Ess\M2ePro\Model\Listing\Log $logModel */
     $logModel = $this->activeRecordFactory->getObject('Listing\\Log');
     $logModel->setComponentMode(\Ess\M2ePro\Helper\Component\Ebay::NICK);
     $logsActionId = $logModel->getNextActionId();
     $statusLogMessage = $this->getStatusLogMessage($listingProduct->getStatus(), $status);
     $logModel->addProductMessage($listingProduct->getData('listing_id'), $listingProduct->getData('product_id'), $listingProduct->getId(), \Ess\M2ePro\Helper\Data::INITIATOR_EXTENSION, $logsActionId, \Ess\M2ePro\Model\Listing\Log::ACTION_CHANNEL_CHANGE, $statusLogMessage, \Ess\M2ePro\Model\Log\AbstractLog::TYPE_SUCCESS, \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_LOW);
     $additionalData = $listingProduct->getAdditionalData();
     unset($additionalData['last_failed_action_data']);
     $listingProduct->addData(array('status' => $status, 'additional_data' => json_encode($additionalData)))->save();
     $listingProduct->getChildObject()->updateVariationsStatus();
     if (is_null($duplicateItemId)) {
         return;
     }
     // M2ePro\TRANSLATIONS
     // Duplicated Item %item_id% was found and Stopped on eBay.
     $textToTranslate = 'Duplicated Item %item_id% was found and stopped on eBay.';
     $duplicateDeletedMessage = $this->getHelper('Module\\Translation')->__($textToTranslate, $duplicateItemId);
     $logModel->addProductMessage($listingProduct->getData('listing_id'), $listingProduct->getData('product_id'), $listingProduct->getId(), \Ess\M2ePro\Helper\Data::INITIATOR_EXTENSION, $logsActionId, \Ess\M2ePro\Model\Listing\Log::ACTION_CHANNEL_CHANGE, $duplicateDeletedMessage, \Ess\M2ePro\Model\Log\AbstractLog::TYPE_WARNING, \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_LOW);
 }
Example #7
0
 private function getProductStatusChanges(\Ess\M2ePro\Model\Listing\Product $listingProduct, array $change)
 {
     $data = array();
     $qty = (int) $change['quantity'] < 0 ? 0 : (int) $change['quantity'];
     $qtySold = (int) $change['quantitySold'] < 0 ? 0 : (int) $change['quantitySold'];
     if (($change['listingStatus'] == self::EBAY_STATUS_COMPLETED || $change['listingStatus'] == self::EBAY_STATUS_ENDED) && $qty == $qtySold) {
         $data['status'] = \Ess\M2ePro\Model\Listing\Product::STATUS_SOLD;
     } else {
         if ($change['listingStatus'] == self::EBAY_STATUS_COMPLETED) {
             $data['status'] = \Ess\M2ePro\Model\Listing\Product::STATUS_STOPPED;
         } else {
             if ($change['listingStatus'] == self::EBAY_STATUS_ENDED) {
                 $data['status'] = \Ess\M2ePro\Model\Listing\Product::STATUS_FINISHED;
             } else {
                 if ($change['listingStatus'] == self::EBAY_STATUS_ACTIVE && $qty - $qtySold <= 0) {
                     $data['status'] = \Ess\M2ePro\Model\Listing\Product::STATUS_HIDDEN;
                 } else {
                     if ($change['listingStatus'] == self::EBAY_STATUS_ACTIVE) {
                         $data['status'] = \Ess\M2ePro\Model\Listing\Product::STATUS_LISTED;
                     }
                 }
             }
         }
     }
     $accountOutOfStockControl = $listingProduct->getAccount()->getChildObject()->getOutOfStockControl(true);
     if (isset($change['out_of_stock'])) {
         $data['additional_data'] = array('out_of_stock_control' => (bool) $change['out_of_stock']);
     } elseif ($data['status'] == \Ess\M2ePro\Model\Listing\Product::STATUS_HIDDEN && !is_null($accountOutOfStockControl) && !$accountOutOfStockControl) {
         // Listed Hidden Status can be only for GTC items
         if (is_null($listingProduct->getChildObject()->getOnlineDuration())) {
             $data['online_duration'] = \Ess\M2ePro\Helper\Component\Ebay::LISTING_DURATION_GTC;
         }
         $additionalData = $listingProduct->getAdditionalData();
         empty($additionalData['out_of_stock_control']) && ($additionalData['out_of_stock_control'] = true);
         $data['additional_data'] = json_encode($additionalData);
     }
     if ($listingProduct->getStatus() == $data['status']) {
         return $data;
     }
     $data['status_changer'] = \Ess\M2ePro\Model\Listing\Product::STATUS_CHANGER_COMPONENT;
     $statusChangedFrom = $this->getHelper('Component\\Ebay')->getHumanTitleByListingProductStatus($listingProduct->getStatus());
     $statusChangedTo = $this->getHelper('Component\\Ebay')->getHumanTitleByListingProductStatus($data['status']);
     if (!empty($statusChangedFrom) && !empty($statusChangedTo)) {
         // M2ePro\TRANSLATIONS
         // Item Status was successfully changed from "%from%" to "%to%" .
         $this->logReportChange($listingProduct, $this->getHelper('Module\\Translation')->__('Item Status was successfully changed from "%from%" to "%to%" .', $statusChangedFrom, $statusChangedTo));
     }
     $this->activeRecordFactory->getObject('ProductChange')->addUpdateAction($listingProduct->getProductId(), \Ess\M2ePro\Model\ProductChange::INITIATOR_SYNCHRONIZATION);
     if ($this->listingsProductsLockStatus[$listingProduct->getId()]) {
         $this->listingsProductsIdsForActionSkipping[] = $listingProduct->getId();
     }
     return $data;
 }