当前位置: 首页>>代码示例>>PHP>>正文


PHP Ess_M2ePro_Model_Listing_Product::isBlocked方法代码示例

本文整理汇总了PHP中Ess_M2ePro_Model_Listing_Product::isBlocked方法的典型用法代码示例。如果您正苦于以下问题:PHP Ess_M2ePro_Model_Listing_Product::isBlocked方法的具体用法?PHP Ess_M2ePro_Model_Listing_Product::isBlocked怎么用?PHP Ess_M2ePro_Model_Listing_Product::isBlocked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ess_M2ePro_Model_Listing_Product的用法示例。


在下文中一共展示了Ess_M2ePro_Model_Listing_Product::isBlocked方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: inspectRevisePriceRequirements

 public function inspectRevisePriceRequirements(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     // Is checked before?
     //--------------------
     if (in_array($listingProduct->getId(), $this->_checkedPriceListingsProductsIds)) {
         return false;
     } else {
         $this->_checkedPriceListingsProductsIds[] = $listingProduct->getId();
     }
     //--------------------
     // Prepare actions params
     //--------------------
     $actionParams = array('only_data' => array('price' => true));
     //--------------------
     // Amazon available status
     //--------------------
     if (!$listingProduct->isListed() || $listingProduct->isBlocked()) {
         return false;
     }
     if (!$listingProduct->isRevisable()) {
         return false;
     }
     if ($this->getRunner()->isExistProduct($listingProduct, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams)) {
         return false;
     }
     if ($listingProduct->isLockedObject(NULL) || $listingProduct->isLockedObject('in_action')) {
         return false;
     }
     //--------------------
     /* @var $amazonSynchronizationTemplate Ess_M2ePro_Model_Amazon_Template_Synchronization */
     $amazonSynchronizationTemplate = $listingProduct->getChildObject()->getAmazonSynchronizationTemplate();
     // Correct synchronization
     //--------------------
     if (!$amazonSynchronizationTemplate->isReviseWhenChangePrice()) {
         return false;
     }
     if ($listingProduct->getChildObject()->isVariationProduct() && !$listingProduct->getChildObject()->isVariationMatched()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     $currentPrice = $listingProduct->getChildObject()->getPrice();
     $onlinePrice = $listingProduct->getChildObject()->getOnlinePrice();
     if ($currentPrice != $onlinePrice) {
         $this->getRunner()->addProduct($listingProduct, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams);
         return true;
     }
     $currentSalePriceInfo = $listingProduct->getChildObject()->getSalePriceInfo();
     $currentSalePrice = $currentSalePriceInfo['price'];
     $onlineSalePrice = $listingProduct->getChildObject()->getOnlineSalePrice();
     if (is_null($currentSalePrice) && !is_null($onlineSalePrice) || !is_null($currentSalePrice) && is_null($onlineSalePrice) || (double) $currentSalePrice != (double) $onlineSalePrice) {
         $this->getRunner()->addProduct($listingProduct, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams);
         return true;
     }
     //--------------------
     //--------------------
     $currentSalePriceStartDate = $currentSalePriceInfo['start_date'];
     $onlineSalePriceStartDate = $listingProduct->getChildObject()->getOnlineSalePriceStartDate();
     $currentSalePriceEndDate = $currentSalePriceInfo['end_date'];
     $onlineSalePriceEndDate = $listingProduct->getChildObject()->getOnlineSalePriceEndDate();
     if ($currentSalePriceStartDate != $onlineSalePriceStartDate || $currentSalePriceEndDate != $onlineSalePriceEndDate) {
         $this->getRunner()->addProduct($listingProduct, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams);
         return true;
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:68,代码来源:Inspector.php

示例2: isMeetReviseGeneralRequirements

 /**
  * @param Ess_M2ePro_Model_Listing_Product $listingProduct
  * @return bool
  * @throws Ess_M2ePro_Model_Exception
  * @throws Ess_M2ePro_Model_Exception_Logic
  */
 public function isMeetReviseGeneralRequirements(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     /** @var Ess_M2ePro_Model_Amazon_Listing_Product $amazonListingProduct */
     $amazonListingProduct = $listingProduct->getChildObject();
     if (!$amazonListingProduct->isAfnChannel() && (!$listingProduct->isListed() || $listingProduct->isBlocked())) {
         return false;
     }
     if (!$listingProduct->isRevisable()) {
         return false;
     }
     $variationManager = $amazonListingProduct->getVariationManager();
     if ($variationManager->isVariationProduct()) {
         if ($variationManager->isRelationParentType()) {
             return false;
         }
         if ($variationManager->isPhysicalUnit() && !$variationManager->getTypeModel()->isVariationProductMatched()) {
             return false;
         }
     }
     if ($listingProduct->isLockedObject('in_action')) {
         return false;
     }
     return true;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:30,代码来源:Inspector.php

示例3: inspectRevisePriceRequirements

 public function inspectRevisePriceRequirements(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     // Is checked before?
     //--------------------
     if (in_array($listingProduct->getId(), $this->_checkedPriceListingsProductsIds)) {
         return false;
     } else {
         $this->_checkedPriceListingsProductsIds[] = $listingProduct->getId();
     }
     //--------------------
     // Prepare actions params
     //--------------------
     $actionParams = array('only_data' => array('price' => true));
     //--------------------
     // Amazon available status
     //--------------------
     if (!$listingProduct->isListed() || $listingProduct->isBlocked()) {
         return false;
     }
     if (!$listingProduct->isRevisable()) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingProduct, Ess_M2ePro_Model_Connector_Server_Amazon_Product_Dispatcher::ACTION_REVISE, $actionParams)) {
         return false;
     }
     if ($listingProduct->isLockedObject(NULL) || $listingProduct->isLockedObject('in_action')) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingProduct->getChildObject()->getAmazonSynchronizationTemplate()->isReviseWhenChangePrice()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     $currentPrice = $listingProduct->getChildObject()->getPrice();
     $onlinePrice = $listingProduct->getChildObject()->getOnlinePrice();
     if ($currentPrice != $onlinePrice) {
         $this->_runnerActions->setProduct($listingProduct, Ess_M2ePro_Model_Connector_Server_Amazon_Product_Dispatcher::ACTION_REVISE, $actionParams);
         return true;
     }
     $currentSalePrice = $listingProduct->getChildObject()->getSalePrice();
     $onlineSalePrice = $listingProduct->getChildObject()->getOnlineSalePrice();
     if (is_null($currentSalePrice) && !is_null($onlineSalePrice) || !is_null($currentSalePrice) && is_null($onlineSalePrice) || (double) $currentSalePrice != (double) $onlineSalePrice) {
         $this->_runnerActions->setProduct($listingProduct, Ess_M2ePro_Model_Connector_Server_Amazon_Product_Dispatcher::ACTION_REVISE, $actionParams);
         return true;
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:52,代码来源:ProductInspector.php


注:本文中的Ess_M2ePro_Model_Listing_Product::isBlocked方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。