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


PHP Ess_M2ePro_Model_Listing_Other::isListed方法代码示例

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


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

示例1: isMeetStopRequirements

 private function isMeetStopRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isStoppable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->getRunner()->isExistProduct($listingOther, Ess_M2ePro_Model_Listing_Product::ACTION_STOP, array())) {
         return false;
     }
     //--------------------
     /** @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
     $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
     // Correct synchronization
     //--------------------
     if (!$ebaySynchronizationTemplate->isMode()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     if ($ebaySynchronizationTemplate->isStopStatusDisabled()) {
         if (!$listingOther->getMagentoProduct()->isStatusEnabled()) {
             return true;
         }
     }
     if ($ebaySynchronizationTemplate->isStopOutOfStock()) {
         if (!$listingOther->getMagentoProduct()->isStockAvailability()) {
             return true;
         }
     }
     if ($ebaySynchronizationTemplate->isStopWhenQtyHasValue()) {
         $productQty = $listingOther->getChildObject()->getMappedQty();
         if (!is_null($productQty)) {
             $typeQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueType();
             $minQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMin();
             $maxQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMax();
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_LESS && $productQty <= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_MORE && $productQty >= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
                 return true;
             }
         }
     }
     //--------------------
     return false;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:57,代码来源:Stop.php

示例2: isMeetStopRequirements

 private function isMeetStopRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isStoppable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingOther, Ess_M2ePro_Model_Connector_Server_Ebay_Item_Dispatcher::ACTION_STOP, array())) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingOther->getAccount()->getChildObject()->isOtherListingsMappedSynchronizationEnabled()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     if ($listingOther->getChildObject()->getSynchronizationModel()->isStopStatusDisabled()) {
         if ($listingOther->getMagentoProduct()->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED) {
             return true;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isStopOutOfStock()) {
         if (!$listingOther->getMagentoProduct()->getStockAvailability()) {
             return true;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isStopWhenQtyHasValue()) {
         $productQty = $listingOther->getChildObject()->getMappedQty();
         if (!is_null($productQty)) {
             /** @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
             $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
             $typeQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueType();
             $minQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMin();
             $maxQty = (int) $ebaySynchronizationTemplate->getStopWhenQtyHasValueMax();
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_LESS && $productQty <= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_MORE && $productQty >= $minQty) {
                 return true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::STOP_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
                 return true;
             }
         }
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:57,代码来源:Stop.php

示例3: isMeetReviseGeneralRequirements

 /**
  * @param Ess_M2ePro_Model_Listing_Other $listingOther
  * @return bool
  * @throws Ess_M2ePro_Model_Exception_Logic
  */
 protected function isMeetReviseGeneralRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     if (!$listingOther->isListed() || !$listingOther->isRevisable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     /** @var Ess_M2ePro_Model_Ebay_Listing_Other $ebayListingOther */
     $ebayListingOther = $listingOther->getChildObject();
     $ebaySynchronizationTemplate = $ebayListingOther->getSynchronizationModel();
     if (!$ebaySynchronizationTemplate->isMode()) {
         return false;
     }
     return true;
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:21,代码来源:Inspector.php

示例4: isMeetRelistRequirements

 private function isMeetRelistRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // eBay available status
     //--------------------
     if ($listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isRelistable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingOther, Ess_M2ePro_Model_Connector_Ebay_Item_Dispatcher::ACTION_RELIST, array())) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingOther->getAccount()->getChildObject()->isOtherListingsMappedSynchronizationEnabled()) {
         return false;
     }
     if (!$listingOther->getChildObject()->getSynchronizationModel()->isRelistMode()) {
         return false;
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistFilterUserLock() && $listingOther->getStatusChanger() == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_USER) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistStatusEnabled()) {
         if ($listingOther->getMagentoProduct()->getStatus() != Mage_Catalog_Model_Product_Status::STATUS_ENABLED) {
             return false;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistIsInStock()) {
         if (!$listingOther->getMagentoProduct()->getStockAvailability()) {
             return false;
         }
     }
     if ($listingOther->getChildObject()->getSynchronizationModel()->isRelistWhenQtyHasValue()) {
         $productQty = $listingOther->getChildObject()->getMappedQty();
         if (!is_null($productQty)) {
             $result = false;
             /** @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
             $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
             $typeQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueType();
             $minQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueMin();
             $maxQty = (int) $ebaySynchronizationTemplate->getRelistWhenQtyHasValueMax();
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_LESS && $productQty <= $minQty) {
                 $result = true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_MORE && $productQty >= $minQty) {
                 $result = true;
             }
             if ($typeQty == Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization::RELIST_QTY_BETWEEN && $productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             }
             if (!$result) {
                 return false;
             }
         }
     }
     //--------------------
     return true;
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:67,代码来源:Relist.php

示例5: inspectRevisePriceRequirements

 private function inspectRevisePriceRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // Prepare actions params
     //--------------------
     $actionParams = array('only_data' => array('price' => true));
     //--------------------
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isRevisable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->_runnerActions->isExistProductAction($listingOther, Ess_M2ePro_Model_Connector_Server_Ebay_Item_Dispatcher::ACTION_REVISE, $actionParams)) {
         return false;
     }
     //--------------------
     // Correct synchronization
     //--------------------
     if (!$listingOther->getAccount()->getChildObject()->isOtherListingsMappedSynchronizationEnabled()) {
         return false;
     }
     if (!$listingOther->getChildObject()->getSynchronizationModel()->isReviseWhenChangePrice()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     $ebayListingOther = $listingOther->getChildObject();
     $currentPrice = $ebayListingOther->getMappedPrice();
     if (is_null($currentPrice)) {
         return false;
     }
     $onlinePrice = $ebayListingOther->getOnlinePrice();
     if ($currentPrice != $onlinePrice) {
         $this->_runnerActions->setProduct($listingOther, Ess_M2ePro_Model_Connector_Server_Ebay_Item_Dispatcher::ACTION_REVISE, $actionParams);
         return true;
     }
     //--------------------
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:45,代码来源:Revise.php

示例6: inspectRevisePriceRequirements

 private function inspectRevisePriceRequirements(Ess_M2ePro_Model_Listing_Other $listingOther)
 {
     // Prepare actions params
     //--------------------
     $actionParams = array('only_data' => array('price' => true));
     //--------------------
     // eBay available status
     //--------------------
     if (!$listingOther->isListed()) {
         return false;
     }
     if (!$listingOther->isRevisable()) {
         return false;
     }
     if (is_null($listingOther->getProductId())) {
         return false;
     }
     if ($this->getRunner()->isExistProduct($listingOther, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams)) {
         return false;
     }
     //--------------------
     /* @var $ebaySynchronizationTemplate Ess_M2ePro_Model_Ebay_Listing_Other_Synchronization */
     $ebaySynchronizationTemplate = $listingOther->getChildObject()->getSynchronizationModel();
     // Correct synchronization
     //--------------------
     if (!$ebaySynchronizationTemplate->isMode()) {
         return false;
     }
     if (!$ebaySynchronizationTemplate->isReviseWhenChangePrice()) {
         return false;
     }
     //--------------------
     // Check filters
     //--------------------
     $ebayListingOther = $listingOther->getChildObject();
     $currentPrice = $ebayListingOther->getMappedPrice();
     if (is_null($currentPrice)) {
         return false;
     }
     $onlinePrice = $ebayListingOther->getOnlinePrice();
     if ($currentPrice != $onlinePrice) {
         $this->getRunner()->addProduct($listingOther, Ess_M2ePro_Model_Listing_Product::ACTION_REVISE, $actionParams);
         return true;
     }
     //--------------------
     return false;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:47,代码来源:Revise.php


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