Example #1
0
 protected function tryToResolveVariationMpnErrors()
 {
     if (!$this->canPerformGetItemCall()) {
         return;
     }
     $variationMpnValues = $this->getVariationMpnDataFromEbay();
     if ($variationMpnValues === false) {
         return;
     }
     $isVariationMpnFilled = !empty($variationMpnValues);
     $this->listingProduct->setSetting('additional_data', 'is_variation_mpn_filled', $isVariationMpnFilled);
     if (!$isVariationMpnFilled) {
         $this->listingProduct->setSetting('additional_data', 'without_mpn_variation_issue', true);
     }
     $this->listingProduct->save();
     if (!empty($variationMpnValues)) {
         $this->fillVariationMpnValues($variationMpnValues);
     }
     $message = $this->modelFactory->getObject('Connector\\Connection\\Response\\Message');
     $message->initFromPreparedData($this->getHelper('Module\\Translation')->__('It has been detected that this Item failed to be updated on eBay because of the errors.
             M2E Pro will automatically try to apply another solution to Revise this Item.'), Message::TYPE_SUCCESS);
     $this->getLogger()->logListingProductMessage($this->listingProduct, $message);
     $this->processAdditionalAction($this->getActionType(), $this->getConfigurator());
 }