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


PHP Ess_M2ePro_Model_Listing_Product::getSynchStatus方法代码示例

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


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

示例1: isMeetListRequirements


//.........这里部分代码省略.........
             $productQty = (int) $amazonListingProduct->getQty(true);
         }
         $typeQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueType();
         $minQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueMin();
         $maxQty = (int) $amazonSynchronizationTemplate->getListWhenQtyMagentoHasValueMax();
         $note = '';
         if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_LESS) {
             if ($productQty <= $minQty) {
                 $result = true;
             } else {
                 // M2ePro_TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity“ is set to less then  %template_min_qty%.
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity“ is set to less then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_MORE) {
             if ($productQty >= $minQty) {
                 $result = true;
             } else {
                 // M2ePro_TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity” is set to more then  %template_min_qty%.
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity” is set to more then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_BETWEEN) {
             if ($productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             } else {
                 // M2ePro_TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Magento Quantity” is set between  %template_min_qty% and %template_max_qty%.
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity” is set between  %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if (!$result) {
             if (!empty($note)) {
                 $additionalData['synch_template_list_rules_note'] = $note;
                 $listingProduct->setSettings('additional_data', $additionalData)->save();
             }
             return false;
         }
     }
     if ($amazonSynchronizationTemplate->isListWhenQtyCalculatedHasValue() && !$variationManager->isRelationParentType()) {
         $result = false;
         $productQty = (int) $amazonListingProduct->getQty(false);
         $typeQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueType();
         $minQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueMin();
         $maxQty = (int) $amazonSynchronizationTemplate->getListWhenQtyCalculatedHasValueMax();
         $note = '';
         if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_LESS) {
             if ($productQty <= $minQty) {
                 $result = true;
             } else {
                 // M2ePro_TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set to less then %template_min_qty%.
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set to less then %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_MORE) {
             if ($productQty >= $minQty) {
                 $result = true;
             } else {
                 // M2ePro_TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set to more then  %template_min_qty%.
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set to more then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Amazon_Template_Synchronization::LIST_QTY_BETWEEN) {
             if ($productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             } else {
                 // M2ePro_TRANSLATIONS
                 // Product was not automatically Listed according to the List Rules in Synchronization Policy. Quantity of Magento Product is %product_qty% though in Synchronization Rules “Calculated Quantity” is set between  %template_min_qty% and %template_max_qty%.
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set between  %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if (!$result) {
             if (!empty($note)) {
                 $additionalData['synch_template_list_rules_note'] = $note;
                 $listingProduct->setSettings('additional_data', $additionalData)->save();
             }
             return false;
         }
     }
     if ($listingProduct->getSynchStatus() != Ess_M2ePro_Model_Listing_Product::SYNCH_STATUS_NEED && $this->isTriedToList($listingProduct) && $this->isChangeInitiatorOnlyInspector($listingProduct)) {
         return false;
     }
     return true;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:101,代码来源:Inspector.php

示例2: isMeetListRequirements


//.........这里部分代码省略.........
                 if (!is_null($temp) && $temp) {
                     $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Stock Availability of Magento Product Variation is Out of Stock though
                      in Synchronization Rules “Stock Availability” is set to In Stock.', array('date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
                     $additionalData['synch_template_list_rules_note'] = $note;
                     $listingProduct->setSettings('additional_data', $additionalData)->save();
                     return false;
                 }
             }
         }
     }
     if ($ebaySynchronizationTemplate->isListWhenQtyMagentoHasValue()) {
         $result = false;
         $productQty = (int) $listingProduct->getMagentoProduct()->getQty(true);
         $typeQty = (int) $ebaySynchronizationTemplate->getListWhenQtyMagentoHasValueType();
         $minQty = (int) $ebaySynchronizationTemplate->getListWhenQtyMagentoHasValueMin();
         $maxQty = (int) $ebaySynchronizationTemplate->getListWhenQtyMagentoHasValueMax();
         $note = '';
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_LESS) {
             if ($productQty <= $minQty) {
                 $result = true;
             } else {
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity“ is set to less then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_MORE) {
             if ($productQty >= $minQty) {
                 $result = true;
             } else {
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity” is set to more then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_BETWEEN) {
             if ($productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             } else {
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Magento Quantity” is set between  %template_min_qty% and %template_max_qty%', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if (!$result) {
             if (!empty($note)) {
                 $additionalData['synch_template_list_rules_note'] = $note;
                 $listingProduct->setSettings('additional_data', $additionalData)->save();
             }
             return false;
         }
     }
     if ($ebaySynchronizationTemplate->isListWhenQtyCalculatedHasValue()) {
         $result = false;
         $productQty = (int) $ebayListingProduct->getQty();
         $typeQty = (int) $ebaySynchronizationTemplate->getListWhenQtyCalculatedHasValueType();
         $minQty = (int) $ebaySynchronizationTemplate->getListWhenQtyCalculatedHasValueMin();
         $maxQty = (int) $ebaySynchronizationTemplate->getListWhenQtyCalculatedHasValueMax();
         $note = '';
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_LESS) {
             if ($productQty <= $minQty) {
                 $result = true;
             } else {
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set to less then %template_min_qty%', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_MORE) {
             if ($productQty >= $minQty) {
                 $result = true;
             } else {
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set to more then  %template_min_qty%.', array('!template_min_qty' => $minQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if ($typeQty == Ess_M2ePro_Model_Ebay_Template_Synchronization::LIST_QTY_BETWEEN) {
             if ($productQty >= $minQty && $productQty <= $maxQty) {
                 $result = true;
             } else {
                 $note = Mage::getSingleton('M2ePro/Log_Abstract')->encodeDescription('Product was not automatically Listed according to the List Rules in Synchronization Policy.
                      Quantity of Magento Product is %product_qty% though in Synchronization Rules
                      “Calculated Quantity” is set between  %template_min_qty% and %template_max_qty%.', array('!template_min_qty' => $minQty, '!template_max_qty' => $maxQty, '!product_qty' => $productQty, '!date' => Mage::helper('M2ePro')->getCurrentGmtDate()));
             }
         }
         if (!$result) {
             if (!empty($note)) {
                 $additionalData['synch_template_list_rules_note'] = $note;
                 $listingProduct->setSettings('additional_data', $additionalData)->save();
             }
             return false;
         }
     }
     if ($listingProduct->getSynchStatus() != Ess_M2ePro_Model_Listing_Product::SYNCH_STATUS_NEED && $this->isTriedToList($listingProduct) && $this->isChangeInitiatorOnlyInspector($listingProduct)) {
         return false;
     }
     return true;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:101,代码来源:Inspector.php


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