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


PHP Ess_M2ePro_Model_Listing_Product::getMarketplace方法代码示例

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


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

示例1: __construct

 public function __construct(array $params = array(), Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     if (!is_null($listingProduct->getActionConfigurator())) {
         $actionConfigurator = $listingProduct->getActionConfigurator();
     } else {
         $actionConfigurator = Mage::getModel('M2ePro/Ebay_Listing_Product_Action_Configurator');
     }
     $this->listingProduct = $listingProduct->loadInstance($listingProduct->getId());
     $this->listingProduct->setActionConfigurator($actionConfigurator);
     parent::__construct($params, $this->listingProduct->getMarketplace(), $this->listingProduct->getAccount());
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:11,代码来源:SingleAbstract.php

示例2: __construct

 public function __construct(array $params = array(), Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $this->listingProduct = $listingProduct;
     parent::__construct($params, $this->listingProduct->getMarketplace(), $this->listingProduct->getAccount());
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:5,代码来源:SingleAbstract.php

示例3: updateProductAfterAction

 protected function updateProductAfterAction(Ess_M2ePro_Model_Listing_Product $listingProduct, array $nativeRequestData = array(), array $params = array(), $ebayItemsId = NULL, $saveSoldData = false)
 {
     $dataForUpdate = array('status' => Ess_M2ePro_Model_Listing_Product::STATUS_LISTED, 'additional_data' => $listingProduct->getAdditionalData());
     !empty($nativeRequestData['title']) && ($dataForUpdate['online_title'] = $nativeRequestData['title']);
     !empty($nativeRequestData['sku']) && ($dataForUpdate['online_sku'] = $nativeRequestData['sku']);
     $dataForUpdate['additional_data']['is_eps_ebay_images_mode'] = $params['is_eps_ebay_images_mode'];
     $isImagesUploadError = isset($params['is_images_upload_error']) ? $params['is_images_upload_error'] : false;
     if (isset($nativeRequestData['images']['images']) && !$isImagesUploadError) {
         $dataForUpdate['additional_data']['ebay_product_images_hash'] = sha1(json_encode($nativeRequestData['images']['images']));
     }
     !is_null($ebayItemsId) && ($dataForUpdate['ebay_item_id'] = (int) $ebayItemsId);
     isset($params['status_changer']) && ($dataForUpdate['status_changer'] = (int) $params['status_changer']);
     if (isset($nativeRequestData['category_main_id'])) {
         $dataForUpdate['online_category'] = Mage::helper('M2ePro/Component_Ebay_Category_Ebay')->getPath($nativeRequestData['category_main_id'], $listingProduct->getMarketplace()->getId()) . ' (' . $nativeRequestData['category_main_id'] . ')';
     }
     if (isset($params['start_date_raw'])) {
         $dataForUpdate['start_date'] = Ess_M2ePro_Model_Connector_Server_Ebay_Abstract::ebayTimeToString($params['start_date_raw']);
     }
     if (isset($params['end_date_raw'])) {
         $dataForUpdate['end_date'] = Ess_M2ePro_Model_Connector_Server_Ebay_Abstract::ebayTimeToString($params['end_date_raw']);
     }
     if ($saveSoldData) {
         $dataForUpdate['online_qty_sold'] = is_null($listingProduct->getChildObject()->getOnlineQtySold()) ? 0 : $listingProduct->getChildObject()->getOnlineQtySold();
         $tempIsVariation = $nativeRequestData['is_variation_item'] && isset($nativeRequestData['variation']);
         $tempUpdateFlag = $tempIsVariation || isset($nativeRequestData['qty']);
         if ($tempUpdateFlag) {
             $tempQty = $tempIsVariation ? $listingProduct->getChildObject()->getQty() : $nativeRequestData['qty'];
             $dataForUpdate['online_qty'] = (int) $tempQty + (int) $dataForUpdate['online_qty_sold'];
         }
     } else {
         $dataForUpdate['online_qty_sold'] = 0;
         $tempIsVariation = $nativeRequestData['is_variation_item'] && isset($nativeRequestData['variation']);
         $tempUpdateFlag = $tempIsVariation || isset($nativeRequestData['qty']);
         if ($tempUpdateFlag) {
             $tempQty = $tempIsVariation ? $listingProduct->getChildObject()->getQty() : $nativeRequestData['qty'];
             $dataForUpdate['online_qty'] = $tempQty;
         }
     }
     if ($listingProduct->getChildObject()->isListingTypeFixed()) {
         $dataForUpdate['online_start_price'] = NULL;
         $dataForUpdate['online_reserve_price'] = NULL;
         $dataForUpdate['online_bids'] = NULL;
         $tempIsVariation = $nativeRequestData['is_variation_item'] && isset($nativeRequestData['variation']);
         $tempUpdateFlag = $tempIsVariation || isset($nativeRequestData['price_fixed']);
         if ($tempUpdateFlag) {
             if ($tempIsVariation) {
                 $tempPrice = NULL;
                 foreach ($nativeRequestData['variation'] as $variation) {
                     if ((int) $variation['qty'] <= 0) {
                         continue;
                     }
                     if (!is_null($tempPrice) && (double) $variation['price'] >= $tempPrice) {
                         continue;
                     }
                     $tempPrice = (double) $variation['price'];
                 }
             } else {
                 $tempPrice = $nativeRequestData['price_fixed'];
             }
             $dataForUpdate['online_buyitnow_price'] = (double) $tempPrice;
         }
     } else {
         !$saveSoldData && ($dataForUpdate['online_bids'] = 0);
         if (isset($nativeRequestData['price_start'])) {
             $dataForUpdate['online_start_price'] = (double) $nativeRequestData['price_start'];
         }
         if (isset($nativeRequestData['price_reserve'])) {
             $dataForUpdate['online_reserve_price'] = (double) $nativeRequestData['price_reserve'];
         }
         if (isset($nativeRequestData['price_buyitnow'])) {
             $dataForUpdate['online_buyitnow_price'] = (double) $nativeRequestData['price_buyitnow'];
         }
     }
     $dataForUpdate['additional_data'] = json_encode($dataForUpdate['additional_data']);
     $listingProduct->addData($dataForUpdate)->save();
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:76,代码来源:Helper.php


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