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


PHP Ess_M2ePro_Model_Listing_Product::getGeneralTemplate方法代码示例

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


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

示例1: runManual

 public function runManual(Ess_M2ePro_Model_Listing_Product $listingProduct, $query, Ess_M2ePro_Model_Marketplace $marketplace = NULL, Ess_M2ePro_Model_Account $account = NULL)
 {
     if (!$listingProduct->isNotListed() || empty($query)) {
         return false;
     }
     $params = array('listing_product' => $listingProduct, 'query' => $query);
     if (is_null($marketplace)) {
         $marketplace = $listingProduct->getGeneralTemplate()->getMarketplace();
     }
     if (is_null($account)) {
         $account = $listingProduct->getGeneralTemplate()->getAccount();
     }
     try {
         $dispatcherObject = Mage::getModel('M2ePro/Amazon_Connector')->getDispatcher();
         $dispatcherObject->processConnector('search', 'manual', 'requester', $params, $marketplace, $account, 'Ess_M2ePro_Model_Amazon');
     } catch (Exception $exception) {
         Mage::helper('M2ePro/Exception')->process($exception, true);
         return false;
     }
     $result = Mage::helper('M2ePro')->getGlobalValue('temp_amazon_manual_search_asin_result');
     Mage::helper('M2ePro')->unsetGlobalValue('temp_amazon_manual_search_asin_result');
     if (!is_array($result)) {
         return array();
     }
     return $result;
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:26,代码来源:Dispatcher.php

示例2: isAddedNewVariationsAttributes

 public function isAddedNewVariationsAttributes(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     if (!$listingProduct->getChildObject()->isListingTypeFixed() || !$listingProduct->getGeneralTemplate()->getChildObject()->isVariationMode()) {
         return false;
     }
     return parent::isAddedNewVariationsAttributes($listingProduct);
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:7,代码来源:Updater.php

示例3: calculateCurrentData

 private function calculateCurrentData()
 {
     if (!empty($this->currentQuery) || $this->currentStep > self::STEP_MAGENTO_TITLE) {
         return;
     }
     switch ($this->currentStep) {
         case self::STEP_GENERAL_ID:
             $tempQuery = $this->listingProduct->getChildObject()->getGeneralId();
             empty($tempQuery) && ($tempQuery = $this->listingProduct->getChildObject()->getAddingGeneralId());
             !empty($tempQuery) && ($this->currentStep = self::STEP_GENERAL_ID);
             !empty($tempQuery) && ($this->currentQuery = (string) $tempQuery);
             break;
         case self::STEP_MAGENTO_TITLE:
             $tempQuery = '';
             if ($this->listingProduct->getGeneralTemplate()->getChildObject()->isSearchByMagentoTitleModeEnabled()) {
                 $tempQuery = $this->listingProduct->getMagentoProduct()->getName();
             }
             !empty($tempQuery) && ($this->currentStep = self::STEP_MAGENTO_TITLE);
             !empty($tempQuery) && ($this->currentQuery = (string) $tempQuery);
             break;
     }
     empty($this->currentQuery) && $this->currentStep++;
     $this->calculateCurrentData();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:24,代码来源:Requester.php

示例4: addInternationalTradeData

 protected function addInternationalTradeData(Ess_M2ePro_Model_Listing_Product $listingProduct, array &$requestData)
 {
     $requestData['international_trade'] = 'None';
     $internationalTrade = $listingProduct->getGeneralTemplate()->getChildObject()->getSettings('international_trade');
     if (!empty($internationalTrade)) {
         if (isset($internationalTrade['international_trade_uk']) && (int) $internationalTrade['international_trade_uk'] == 1) {
             $requestData['international_trade'] = 'UK';
         }
         if (isset($internationalTrade['international_trade_na']) && (int) $internationalTrade['international_trade_na'] == 1) {
             $requestData['international_trade'] = 'North America';
         }
     }
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:13,代码来源:Helper.php

示例5: updateAfterAction

 public function updateAfterAction(Ess_M2ePro_Model_Listing_Product $listingProduct, array $nativeRequestData = array(), array $params = array(), $saveEbayQtySold = false)
 {
     if (!$listingProduct->getChildObject()->isListingTypeFixed() || !$listingProduct->getGeneralTemplate()->getChildObject()->isVariationMode() || $listingProduct->getMagentoProduct()->isProductWithoutVariations()) {
         return;
     }
     // Delete Variations
     //-----------------------------
     $productVariations = $listingProduct->getVariations(true);
     foreach ($productVariations as $variation) {
         /** @var $variation Ess_M2ePro_Model_Listing_Product_Variation */
         $variation->isDelete() && $variation->deleteInstance();
     }
     //-----------------------------
     // Update Variations
     //-----------------------------
     $productVariations = $listingProduct->getVariations(true);
     foreach ($productVariations as $variation) {
         /** @var $variation Ess_M2ePro_Model_Listing_Product_Variation */
         $dataForUpdate = array('online_price' => $variation->getChildObject()->getPrice(), 'add' => Ess_M2ePro_Model_Listing_Product_Variation::ADD_NO, 'delete' => Ess_M2ePro_Model_Listing_Product_Variation::DELETE_NO, 'status' => Ess_M2ePro_Model_Listing_Product::STATUS_LISTED);
         if ($saveEbayQtySold) {
             $dataForUpdate['online_qty_sold'] = is_null($variation->getChildObject()->getOnlineQtySold()) ? 0 : $variation->getChildObject()->getOnlineQtySold();
             $dataForUpdate['online_qty'] = $variation->getChildObject()->getQty() + $dataForUpdate['online_qty_sold'];
         } else {
             $dataForUpdate['online_qty_sold'] = 0;
             $dataForUpdate['online_qty'] = $variation->getChildObject()->getQty();
         }
         if ($dataForUpdate['online_qty'] <= $dataForUpdate['online_qty_sold']) {
             $dataForUpdate['status'] = Ess_M2ePro_Model_Listing_Product::STATUS_SOLD;
         }
         if ($dataForUpdate['online_qty'] <= 0) {
             $dataForUpdate['status'] = Ess_M2ePro_Model_Listing_Product::STATUS_NOT_LISTED;
         }
         $variation->addData($dataForUpdate)->save();
     }
     //-----------------------------
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:36,代码来源:HelperVariations.php

示例6: isWorldWideIdAlreadyExists

 private function isWorldWideIdAlreadyExists($worldwideId, Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     if (!$worldwideId) {
         return false;
     }
     $marketplaceObj = $listingProduct->getGeneralTemplate()->getMarketplace();
     $accountObj = $listingProduct->getGeneralTemplate()->getAccount();
     /** @var $dispatcher Ess_M2ePro_Model_Amazon_Search_Dispatcher */
     $dispatcher = Mage::getModel('M2ePro/Amazon_Search_Dispatcher');
     $results = $dispatcher->runManual($listingProduct, $worldwideId, $marketplaceObj, $accountObj);
     if (empty($results)) {
         return false;
     }
     return true;
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:15,代码来源:Multiple.php


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