public function process() { // Check tasks config mode //----------------------------- $config = Mage::helper('M2ePro/Module')->getSynchronizationConfig(); $listMode = (bool) (int) $config->getGroupValue('/ebay/templates/list/', 'mode'); $reviseMode = (bool) (int) $config->getGroupValue('/ebay/templates/revise/', 'mode'); $relistMode = (bool) (int) $config->getGroupValue('/ebay/templates/relist/', 'mode'); $stopMode = (bool) (int) $config->getGroupValue('/ebay/templates/stop/', 'mode'); if (!$listMode && !$reviseMode && !$relistMode && !$stopMode) { return false; } //----------------------------- // PREPARE SYNCH //--------------------------- $this->prepareSynch(); $this->createRunnerActions(); //--------------------------- // GET TEMPLATES //--------------------------- $this->_profiler->addEol(); $this->_lockItem->setPercents(self::PERCENTS_START + 5); $this->_lockItem->activate(); //--------------------------- // RUN CHILD SYNCH //--------------------------- if ($listMode) { $tempSynch = new Ess_M2ePro_Model_Ebay_Synchronization_Tasks_Templates_List(); $tempSynch->process(); } if ($reviseMode) { $tempSynch = new Ess_M2ePro_Model_Ebay_Synchronization_Tasks_Templates_Revise(); $tempSynch->process(); } if ($relistMode) { $tempSynch = new Ess_M2ePro_Model_Ebay_Synchronization_Tasks_Templates_Relist(); $tempSynch->process(); } if ($stopMode) { $tempSynch = new Ess_M2ePro_Model_Ebay_Synchronization_Tasks_Templates_Stop(); $tempSynch->process(); } //--------------------------- // UNSET TEMPLATES //--------------------------- Ess_M2ePro_Model_Ebay_Synchronization_Tasks_Templates_Abstract::clearCache(); //--------------------------- // CANCEL SYNCH //--------------------------- $this->executeRunnerActions(); $this->cancelSynch(); //--------------------------- }
public static function clearCache() { return self::$listingProductsCache = self::$listingProductsByParamsCache = array(); }