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


PHP Ess_M2ePro_Model_Listing_Product::getComponentMode方法代码示例

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


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

示例1: getItemDataByListingProduct

 private function getItemDataByListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $connectorClassName = 'Ess_M2ePro_Model_Connector_Server_' . ucfirst($listingProduct->getComponentMode()) . '_';
     $connectorClassName .= $listingProduct->isComponentModeEbay() ? 'Item' : 'Product';
     $connectorClassName .= '_Stop_Multiple';
     try {
         $connector = new $connectorClassName(array(), array($listingProduct));
         $itemData = $connector->getRequestDataPackage();
     } catch (Exception $exception) {
         return NULL;
     }
     if (!isset($itemData['data']['items'])) {
         return NULL;
     }
     return array_shift($itemData['data']['items']);
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:16,代码来源:StopQueue.php

示例2: getItemDataByListingProduct

 private function getItemDataByListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $connectorClassName = 'Ess_M2ePro_Model_Connector_' . ucfirst($listingProduct->getComponentMode()) . '_';
     $connectorClassName .= $listingProduct->isComponentModeEbay() ? 'Item' : 'Product';
     $connectorClassName .= '_Stop_Multiple' . ($listingProduct->isComponentModeEbay() ? '' : 'Requester');
     $connectorParams = array('logs_action_id' => 0, 'status_changer' => Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_UNKNOWN);
     try {
         $connector = new $connectorClassName($connectorParams, array($listingProduct));
         $itemData = $connector->getRequestDataPackage();
     } catch (Exception $exception) {
         return NULL;
     }
     if (!isset($itemData['data']['items'])) {
         return NULL;
     }
     return array_shift($itemData['data']['items']);
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:17,代码来源:StopQueue.php

示例3: logListingProductMessage

 private function logListingProductMessage(Ess_M2ePro_Model_Listing_Product $listingProduct, $action, $oldValue, $newValue, $messagePostfix = '')
 {
     // M2ePro_TRANSLATIONS
     // From [%from%] to [%to%].
     $log = Mage::getModel('M2ePro/' . ucfirst($listingProduct->getComponentMode()) . '_Listing_Log');
     $oldValue = strlen($oldValue) > 150 ? substr($oldValue, 0, 150) . ' ...' : $oldValue;
     $newValue = strlen($newValue) > 150 ? substr($newValue, 0, 150) . ' ...' : $newValue;
     $messagePostfix = trim(trim($messagePostfix), '.');
     if (!empty($messagePostfix)) {
         $messagePostfix = ' ' . $messagePostfix;
     }
     if ($listingProduct->isComponentModeEbay() && is_array($listingProduct->getData('found_options_ids'))) {
         $collection = Mage::getModel('M2ePro/Listing_Product_Variation_Option')->getCollection()->addFieldToFilter('main_table.id', array('in' => $listingProduct->getData('found_options_ids')));
         $additionalData = array();
         foreach ($collection as $listingProductVariationOption) {
             /** @var Ess_M2ePro_Model_Listing_Product_Variation_Option $listingProductVariationOption  */
             $additionalData['variation_options'][$listingProductVariationOption->getAttribute()] = $listingProductVariationOption->getOption();
         }
         if (!empty($additionalData['variation_options']) && $collection->getFirstItem()->getProductType() == Ess_M2ePro_Model_Magento_Product::TYPE_BUNDLE) {
             foreach ($additionalData['variation_options'] as $attribute => $option) {
                 $log->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, NULL, $action, Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('From [%from%] to [%to%]' . $messagePostfix . '.', array('!from' => $oldValue, '!to' => $newValue)), Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW, array('variation_options' => array($attribute => $option)));
             }
             return;
         }
         $log->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, NULL, $action, Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('From [%from%] to [%to%]' . $messagePostfix . '.', array('!from' => $oldValue, '!to' => $newValue)), Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW, $additionalData);
         return;
     }
     $log->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, NULL, $action, Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('From [%from%] to [%to%]' . $messagePostfix . '.', array('!from' => $oldValue, '!to' => $newValue)), Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:29,代码来源:After.php

示例4: logListingProductMessage

 private function logListingProductMessage(Ess_M2ePro_Model_Listing_Product $listingProduct, $action, $oldValue, $newValue)
 {
     // M2ePro_TRANSLATIONS
     // From [%from%] to [%to%].
     $log = Mage::getModel('M2ePro/Listing_Log');
     $log->setComponentMode($listingProduct->getComponentMode());
     $log->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, NULL, $action, Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('From [%from%] to [%to%].', array('from' => $oldValue, 'to' => $newValue)), Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:8,代码来源:Quote.php

示例5: logListingProductMessage

 private function logListingProductMessage(Ess_M2ePro_Model_Listing_Product $listingProduct, $action, $oldValue, $newValue, $messagePostfix = '')
 {
     // M2ePro_TRANSLATIONS
     // From [%from%] to [%to%].
     if ($listingProduct->isComponentModeEbay()) {
         $log = Mage::getModel('M2ePro/Listing_Log');
         $log->setComponentMode($listingProduct->getComponentMode());
     } else {
         $log = Mage::getModel('M2ePro/' . ucfirst($listingProduct->getComponentMode()) . '_Listing_Log');
     }
     $oldValue = strlen($oldValue) > 150 ? substr($oldValue, 0, 150) . ' ...' : $oldValue;
     $newValue = strlen($newValue) > 150 ? substr($newValue, 0, 150) . ' ...' : $newValue;
     $messagePostfix = trim(trim($messagePostfix), '.');
     if (!empty($messagePostfix)) {
         $messagePostfix = ' ' . $messagePostfix;
     }
     $log->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, NULL, $action, Mage::getModel('M2ePro/Log_Abstract')->encodeDescription('From [%from%] to [%to%]' . $messagePostfix . '.', array('!from' => $oldValue, '!to' => $newValue)), Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:18,代码来源:After.php


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