Пример #1
0
 protected function processParentProcessors()
 {
     if (empty($this->params['params']['remove'])) {
         parent::processParentProcessors();
         return;
     }
     foreach ($this->parentsForProcessing as $listingProduct) {
         /** @var \Ess\M2ePro\Model\Amazon\Listing\Product $amazonListingProduct */
         $amazonListingProduct = $listingProduct->getChildObject();
         $amazonListingProduct->getVariationManager()->getTypeModel()->getProcessor()->process();
     }
 }
Пример #2
0
 protected function processSuccess(\Ess\M2ePro\Model\Listing\Product $listingProduct, array $params = array())
 {
     /** @var \Ess\M2ePro\Model\Amazon\Listing\Product $amazonListingProduct */
     $amazonListingProduct = $listingProduct->getChildObject();
     if ($amazonListingProduct->getVariationManager()->isRelationMode() && !$this->getRequestDataObject($listingProduct)->hasProductId() && empty($params['general_id'])) {
         $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
         $message->initFromPreparedData('Unexpected error. The ASIN/ISBN for Parent or Child Product was not returned from Amazon.
              Operation cannot be finished correctly.', \Ess\M2ePro\Model\Connector\Connection\Response\Message::TYPE_ERROR);
         $this->getLogger()->logListingProductMessage($listingProduct, $message, \Ess\M2ePro\Model\Log\AbstractLog::PRIORITY_MEDIUM);
         return;
     }
     parent::processSuccess($listingProduct, $params);
 }