public function __construct(Ess_M2ePro_Model_Processing_Request $processingRequest) { parent::__construct($processingRequest); foreach ($this->params['products'] as $listingProductId => $listingProductData) { try { $this->listingsProducts[] = Mage::helper('M2ePro/Component_Ebay')->getObject('Listing_Product', (int) $listingProductId); } catch (Exception $exception) { } } }
public function eventFailedExecuting($message) { parent::eventFailedExecuting($message); $alreadyLoggedListings = array(); foreach ($this->listingsProducts as $listingProduct) { $listingProduct->getChildObject()->setData('translation_status', Ess_M2ePro_Model_Ebay_Listing_Product::TRANSLATION_STATUS_PENDING)->save(); /** @var $listingProduct Ess_M2ePro_Model_Listing_Product */ if (isset($alreadyLoggedListings[$listingProduct->getListingId()])) { continue; } $this->addListingsProductsLogsMessage($listingProduct, $message, Ess_M2ePro_Model_Log_Abstract::TYPE_ERROR, Ess_M2ePro_Model_Log_Abstract::PRIORITY_HIGH); $alreadyLoggedListings[$listingProduct->getListingId()] = true; } }