コード例 #1
0
ファイル: Stop.php プロジェクト: technomagegithub/magento
 private function immediatelyChangedProducts()
 {
     $this->_profiler->addTimePoint(__METHOD__, 'Immediately when product was changed');
     // Get changed listings products
     //------------------------------------
     $changedListingsProducts = $this->getChangedInstances(array(Ess_M2ePro_Model_ProductChange::UPDATE_ATTRIBUTE_CODE));
     //------------------------------------
     // Filter only needed listings products
     //------------------------------------
     /** @var $listingProduct Ess_M2ePro_Model_Listing_Product */
     foreach ($changedListingsProducts as $listingProduct) {
         if (!$this->_productInspector->isMeetStopRequirements($listingProduct)) {
             continue;
         }
         $this->_runnerActions->setProduct($listingProduct, Ess_M2ePro_Model_Connector_Buy_Product_Dispatcher::ACTION_STOP, array());
     }
     //------------------------------------
     $this->_profiler->saveTimePoint(__METHOD__);
 }
コード例 #2
0
ファイル: Stop.php プロジェクト: xiaoguizhidao/beut
 private function immediatelyChangedProducts()
 {
     $this->_profiler->addTimePoint(__METHOD__, 'Immediately when product was changed');
     // Get changed listings products
     //------------------------------------
     $changedListingsProducts = Mage::getModel('M2ePro/Listing_Product')->getChangedItemsByAttributesWithOptions(array(Ess_M2ePro_Model_ProductChange::UPDATE_ATTRIBUTE_CODE), Ess_M2ePro_Helper_Component_Buy::NICK);
     //------------------------------------
     // Filter only needed listings products
     //------------------------------------
     foreach ($changedListingsProducts as $changedListingProduct) {
         /** @var $listingProduct Ess_M2ePro_Model_Listing_Product */
         $listingProduct = Mage::helper('M2ePro/Component_Buy')->getObject('Listing_Product', $changedListingProduct['id']);
         if (!$this->_productInspector->isMeetStopRequirements($listingProduct)) {
             continue;
         }
         $this->_runnerActions->setProduct($listingProduct, Ess_M2ePro_Model_Buy_Connector_Product_Dispatcher::ACTION_STOP, array());
     }
     //------------------------------------
     $this->_profiler->saveTimePoint(__METHOD__);
 }