public function eventAfterExecuting()
 {
     $responseMessages = $this->getResponse()->getMessages()->getEntities();
     if (!$this->listingProduct->getAccount()->getChildObject()->isModeSandbox() && $this->isEbayApplicationErrorAppeared($responseMessages)) {
         $this->markAsPotentialDuplicate();
         $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
         $message->initFromPreparedData('An error occurred while Listing the Item. The Item has been blocked.
              The next M2E Pro Synchronization will resolve the problem.', Message::TYPE_WARNING);
         $this->getLogger()->logListingProductMessage($this->listingProduct, $message);
     }
     parent::eventAfterExecuting();
 }
 public function eventAfterExecuting()
 {
     $responseMessages = $this->getResponse()->getMessages()->getEntities();
     if (!$this->listingProduct->getAccount()->getChildObject()->isModeSandbox() && $this->isEbayApplicationErrorAppeared($responseMessages)) {
         $this->markAsPotentialDuplicate();
         $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
         $message->initFromPreparedData('An error occurred while Listing the Item. The Item has been blocked.
              The next M2E Pro Synchronization will resolve the problem.', Message::TYPE_WARNING);
         $this->getLogger()->logListingProductMessage($this->listingProduct, $message);
     }
     if ($this->isConditionErrorAppeared($responseMessages)) {
         $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
         $message->initFromPreparedData($this->getHelper('Module\\Translation')->__('M2E Pro was not able to send Condition on eBay. Please try to perform the Relist Action once more.'), Message::TYPE_WARNING);
         $this->getLogger()->logListingProductMessage($this->listingProduct, $message);
         $additionalData = $this->listingProduct->getAdditionalData();
         $additionalData['is_need_relist_condition'] = true;
         $this->listingProduct->setSettings('additional_data', $additionalData)->save();
     }
     if ($this->getStatusChanger() == \Ess\M2ePro\Model\Listing\Product::STATUS_CHANGER_SYNCH && $this->isItemCanNotBeAccessed($responseMessages)) {
         $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
         $message->initFromPreparedData($this->getHelper('Module\\Translation')->__('It has been detected that the Category you are using is going to require the Product Identifiers
             to be specified (UPC, EAN, ISBN, etc.). The Relist Action will be automatically performed
             to send the value(s) of the required Identifier(s) based on the settings
             provided in eBay Catalog Identifiers section of the Description Policy.'), Message::TYPE_WARNING);
         $this->getLogger()->logListingProductMessage($this->listingProduct, $message);
         $configurator = $this->modelFactory->getObject('Ebay\\Listing\\Product\\Action\\Configurator');
         $this->processAdditionalAction(\Ess\M2ePro\Model\Listing\Product::ACTION_LIST, $configurator);
     }
     if ($this->getStatusChanger() == \Ess\M2ePro\Model\Listing\Product::STATUS_CHANGER_SYNCH && $this->getConfigurator()->isPartialMode() && $this->isNewRequiredSpecificNeeded($responseMessages)) {
         $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
         $message->initFromPreparedData('It has been detected that the Category you are using is going to require the Product Identifiers
             to be specified (UPC, EAN, ISBN, etc.). The Relist Action will be automatically performed
             to send the value(s) of the required Identifier(s) based on the settings
             provided in eBay Catalog Identifiers section of the Description Policy.', Message::TYPE_WARNING);
         $this->getLogger()->logListingProductMessage($this->listingProduct, $message);
         $configurator = $this->modelFactory->getObject('Ebay\\Listing\\Product\\Action\\Configurator');
         $this->processAdditionalAction($this->getActionType(), $configurator, array('skip_check_the_same_product_already_listed_ids' => array($this->listingProduct->getId())));
     }
     $additionalData = $this->listingProduct->getAdditionalData();
     if ($this->isVariationErrorAppeared($responseMessages) && $this->getRequestDataObject()->hasVariations() && !isset($additionalData['is_variation_mpn_filled'])) {
         $this->tryToResolveVariationMpnErrors();
     }
     parent::eventAfterExecuting();
 }
 public function eventAfterExecuting()
 {
     $responseMessages = $this->getResponse()->getMessages()->getEntities();
     if ($this->getStatusChanger() == \Ess\M2ePro\Model\Listing\Product::STATUS_CHANGER_SYNCH && $this->getConfigurator()->isPartialMode() && $this->isNewRequiredSpecificNeeded($responseMessages)) {
         $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
         $message->initFromPreparedData($this->getHelper('Module\\Translation')->__('It has been detected that the Category you are using is going to require the Product Identifiers
             to be specified (UPC, EAN, ISBN, etc.). Full Revise will be automatically performed to send
             the value(s) of the required Identifier(s) based on the settings
             provided in the eBay Catalog Identifiers section of the Description Policy.'), Message::TYPE_WARNING);
         $this->getLogger()->logListingProductMessage($this->listingProduct, $message);
         $configurator = $this->modelFactory->getObject('Ebay\\Listing\\Product\\Action\\Configurator');
         $this->processAdditionalAction($this->getActionType(), $configurator);
     }
     $additionalData = $this->listingProduct->getAdditionalData();
     if ($this->isVariationErrorAppeared($responseMessages) && $this->getRequestDataObject()->hasVariations() && !isset($additionalData['is_variation_mpn_filled'])) {
         $this->tryToResolveVariationMpnErrors();
     }
     parent::eventAfterExecuting();
 }
 protected function processResponseMessages()
 {
     $this->getLogger()->setStoreMode(true);
     parent::processResponseMessages();
 }