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


PHP Ess_M2ePro_Model_Listing_Product::isHidden方法代码示例

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


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

示例1: isMeetReviseGeneralRequirements

 /**
  * @param Ess_M2ePro_Model_Listing_Product $listingProduct
  * @return bool
  * @throws Ess_M2ePro_Model_Exception_Logic
  */
 public function isMeetReviseGeneralRequirements(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     if (!$listingProduct->isListed()) {
         return false;
     }
     if (!$listingProduct->isRevisable() || $listingProduct->isHidden()) {
         return false;
     }
     /** @var Ess_M2ePro_Model_Ebay_Listing_Product $ebayListingProduct */
     $ebayListingProduct = $listingProduct->getChildObject();
     if (!$ebayListingProduct->isSetCategoryTemplate()) {
         return false;
     }
     return true;
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:20,代码来源:Inspector.php

示例2: inspectReviseQtyRequirements

 private function inspectReviseQtyRequirements(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     // Is checked before?
     //--------------------
     if (in_array($listingProduct->getId(), $this->_checkedQtyListingsProductsIds)) {
         return false;
     } else {
         $this->_checkedQtyListingsProductsIds[] = $listingProduct->getId();
     }
     //--------------------
     // Prepare actions params
     //--------------------
     $actionParams = array('only_data' => array('qty' => true, 'variations' => true));
     //--------------------
     // eBay available status
     //--------------------
     if (!$listingProduct->isListed()) {
         return false;
     }
     if (!$listingProduct->isRevisable() || $listingProduct->isHidden()) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingProduct, Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_REVISE, $actionParams)) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingProduct->getChildObject()->isSetCategoryTemplate()) {
         return false;
     }
     if (!$listingProduct->getChildObject()->getEbaySynchronizationTemplate()->isReviseWhenChangeQty()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     $isVariationProduct = $listingProduct->getChildObject()->isVariationMode() && count($listingProduct->getVariations()) > 0;
     $isMaxAppliedValueModeOn = $listingProduct->getChildObject()->getEbaySynchronizationTemplate()->isReviseUpdateQtyMaxAppliedValueModeOn();
     $maxAppliedValue = $listingProduct->getChildObject()->getEbaySynchronizationTemplate()->getReviseUpdateQtyMaxAppliedValue();
     if (!$isVariationProduct) {
         $ebayListingProduct = $listingProduct->getChildObject();
         $productQty = $ebayListingProduct->getQty();
         $channelQty = $ebayListingProduct->getOnlineQty() - $ebayListingProduct->getOnlineQtySold();
         //-- Check ReviseUpdateQtyMaxAppliedValue
         if ($isMaxAppliedValueModeOn && $productQty > $maxAppliedValue && $channelQty > $maxAppliedValue) {
             return false;
         }
         if ($productQty > 0 && $productQty != $channelQty) {
             $this->_runnerActions->setProduct($listingProduct, Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_REVISE, $actionParams);
             return true;
         }
     } else {
         $totalQty = 0;
         $hasChange = false;
         $variations = $listingProduct->getVariations(true);
         foreach ($variations as $variation) {
             /** @var $variation Ess_M2ePro_Model_Listing_Product_Variation */
             $ebayVariation = $variation->getChildObject();
             $productQty = $ebayVariation->getQty();
             $channelQty = $ebayVariation->getOnlineQty() - $ebayVariation->getOnlineQtySold();
             if ($productQty != $channelQty) {
                 //-- Check ReviseUpdateQtyMaxAppliedValue
                 (!$isMaxAppliedValueModeOn || $productQty <= $maxAppliedValue || $channelQty <= $maxAppliedValue) && ($hasChange = true);
             }
             $totalQty += $productQty;
         }
         if ($totalQty > 0 && $hasChange) {
             $this->_runnerActions->setProduct($listingProduct, Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_REVISE, $actionParams);
             return true;
         }
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:75,代码来源:Revise.php

示例3: getRunnerRelistDataByListingProduct

 public function getRunnerRelistDataByListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $data = array();
     if ($listingProduct->isHidden()) {
         $data['action'] = Ess_M2ePro_Model_Listing_Product::ACTION_REVISE;
         $data['params'] = array('replaced_action' => Ess_M2ePro_Model_Listing_Product::ACTION_RELIST, 'all_data' => true);
     } else {
         if ($listingProduct->getChildObject()->getEbaySynchronizationTemplate()->isRelistSendData()) {
             $tempParams = array('all_data' => true);
         } else {
             $tempParams = array('only_data' => array('base' => true));
         }
         $data['action'] = Ess_M2ePro_Model_Listing_Product::ACTION_RELIST;
         $data['params'] = $tempParams;
     }
     return $data;
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:17,代码来源:Inspector.php

示例4: getRunnerData

 public function getRunnerData(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $data = array();
     /** @var Ess_M2ePro_Model_Ebay_Listing_Product $ebayListingProduct */
     $ebayListingProduct = $listingProduct->getChildObject();
     if ($listingProduct->isHidden()) {
         $data['action'] = Ess_M2ePro_Model_Listing_Product::ACTION_REVISE;
         if ($ebayListingProduct->getEbaySynchronizationTemplate()->isRelistSendData()) {
             $data['params'] = array('all_data' => true);
         } else {
             $data['params'] = array('only_data' => array('qty' => true, 'variations' => true));
         }
         $data['params']['replaced_action'] = Ess_M2ePro_Model_Listing_Product::ACTION_RELIST;
     } else {
         $data['action'] = Ess_M2ePro_Model_Listing_Product::ACTION_RELIST;
         if ($ebayListingProduct->getEbaySynchronizationTemplate()->isRelistSendData()) {
             $data['params'] = array('all_data' => true);
         } else {
             $data['params'] = array('only_data' => array('base' => true));
         }
     }
     return $data;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:23,代码来源:Relist.php

示例5: prepareConfigurator

 private function prepareConfigurator(Ess_M2ePro_Model_Listing_Product $listingProduct, Ess_M2ePro_Model_Ebay_Listing_Product_Action_Configurator $configurator, $action)
 {
     if ($action != Ess_M2ePro_Model_Listing_Product::ACTION_RELIST) {
         $configurator->setParams(array('replaced_action' => Ess_M2ePro_Model_Listing_Product::ACTION_RELIST));
     }
     /** @var Ess_M2ePro_Model_Ebay_Listing_Product $ebayListingProduct */
     $ebayListingProduct = $listingProduct->getChildObject();
     if ($ebayListingProduct->getEbaySynchronizationTemplate()->isRelistSendData()) {
         return;
     }
     if (!$listingProduct->isHidden() && $action == Ess_M2ePro_Model_Listing_Product::ACTION_RELIST) {
         $configurator->setEmptyMode();
         return;
     }
     $configurator->setPartialMode();
     $configurator->allowQty()->allowVariations();
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:17,代码来源:Relist.php

示例6: isMeetStopRequirements

 private function isMeetStopRequirements(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     // Is checked before?
     //--------------------
     if (in_array($listingProduct->getId(), $this->_checkedListingsProductsIds)) {
         return false;
     } else {
         $this->_checkedListingsProductsIds[] = $listingProduct->getId();
     }
     //--------------------
     // eBay available status
     //--------------------
     if (!$listingProduct->isListed()) {
         return false;
     }
     if (!$listingProduct->isStoppable() || $listingProduct->isHidden()) {
         return false;
     }
     $tempActionAndParams = $this->getActionAndParamsFromListingProduct($listingProduct);
     if ($this->_runnerActions->isExistProductAction($listingProduct, $tempActionAndParams['action'], $tempActionAndParams['params'])) {
         return false;
     }
     //--------------------
     $productsIdsForEachVariation = NULL;
     // Check filters
     //--------------------
     if ($listingProduct->getChildObject()->getEbaySynchronizationTemplate()->isStopStatusDisabled()) {
         if ($listingProduct->getMagentoProduct()->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED) {
             return true;
         } else {
             if (is_null($productsIdsForEachVariation)) {
                 $productsIdsForEachVariation = $listingProduct->getProductsIdsForEachVariation();
             }
             if (count($productsIdsForEachVariation) > 0) {
                 $tempStatuses = $listingProduct->getVariationsStatuses($productsIdsForEachVariation);
                 // all variations are disabled
                 if ((int) min($tempStatuses) == Mage_Catalog_Model_Product_Status::STATUS_DISABLED) {
                     return true;
                 }
             }
         }
     }
     if ($listingProduct->getChildObject()->getEbaySynchronizationTemplate()->isStopOutOfStock()) {
         if (!$listingProduct->getMagentoProduct()->getStockAvailability()) {
             return true;
         } else {
             if (is_null($productsIdsForEachVariation)) {
                 $productsIdsForEachVariation = $listingProduct->getProductsIdsForEachVariation();
             }
             if (count($productsIdsForEachVariation) > 0) {
                 $tempStocks = $listingProduct->getVariationsStockAvailabilities($productsIdsForEachVariation);
                 // all variations are out of stock
                 if (!(int) max($tempStocks)) {
                     return true;
                 }
             }
         }
     }
     if ($listingProduct->getChildObject()->getEbaySynchronizationTemplate()->isStopWhenQtyHasValue()) {
         $productQty = (int) $listingProduct->getChildObject()->getQtyTotal(true);
         $ebaySynchronizationTemplate = $listingProduct->getChildObject()->getEbaySynchronizationTemplate();
         $typeQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueType();
         $minQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMin();
         $maxQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMax();
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::STOP_QTY_LESS && $productQty <= $minQty) {
             return true;
         }
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::STOP_QTY_MORE && $productQty >= $minQty) {
             return true;
         }
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::STOP_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
             return true;
         }
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:77,代码来源:Stop.php

示例7: getActionAndParamsFromListingProduct

 private function getActionAndParamsFromListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $actionAndParams = array();
     if ($listingProduct->isHidden()) {
         $actionAndParams['action'] = Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_REVISE;
         $actionAndParams['params'] = array('replaced_action' => Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_RELIST, 'all_data' => true);
     } else {
         if ($listingProduct->getChildObject()->getEbaySynchronizationTemplate()->isRelistSendData()) {
             $tempParams = array('all_data' => true);
         } else {
             $tempParams = array('only_data' => array('base' => true));
         }
         $actionAndParams['action'] = Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_RELIST;
         $actionAndParams['params'] = $tempParams;
     }
     return $actionAndParams;
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:17,代码来源:Relist.php


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