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


PHP Ess_M2ePro_Model_Listing_Product::getData方法代码示例

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


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

示例1: saveVariationsSets

 protected function saveVariationsSets(Ess_M2ePro_Model_Listing_Product $listingProduct, $variations)
 {
     if (!isset($variations['set'])) {
         return;
     }
     $additionalData = $listingProduct->getData('additional_data');
     $additionalData = is_null($additionalData) ? array() : json_decode($additionalData, true);
     $additionalData['variations_sets'] = $variations['set'];
     $listingProduct->setData('additional_data', json_encode($additionalData))->save();
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:10,代码来源:Updater.php

示例2: saveVariationsData

 protected function saveVariationsData(Ess_M2ePro_Model_Listing_Product $listingProduct, $variationsData)
 {
     $additionalData = $listingProduct->getData('additional_data');
     $additionalData = is_null($additionalData) ? array() : (array) json_decode($additionalData, true);
     if (isset($variationsData['set'])) {
         $additionalData['variations_sets'] = $variationsData['set'];
     }
     if (isset($variationsData['additional']['attributes'])) {
         $additionalData['configurable_attributes'] = $variationsData['additional']['attributes'];
     }
     $listingProduct->setData('additional_data', json_encode($additionalData))->save();
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:12,代码来源:Updater.php

示例3: isChangeInitiatorOnlyInspector

 protected function isChangeInitiatorOnlyInspector(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $changeInitiators = $listingProduct->getData('change_initiators');
     if (empty($changeInitiators)) {
         return false;
     }
     $changeInitiators = (array) explode(',', $changeInitiators);
     $changeInitiators = array_unique($changeInitiators);
     if (count($changeInitiators) != 1) {
         return false;
     }
     if ((int) reset($changeInitiators) != Ess_M2ePro_Model_ProductChange::INITIATOR_INSPECTOR) {
         return false;
     }
     return true;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:16,代码来源:Inspector.php

示例4: linkItem

 private function linkItem(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $data = array('general_id' => $listingProduct->getData('general_id'), 'is_isbn_general_id' => Mage::helper('M2ePro')->isISBN($listingProduct->getData('general_id')), 'sku' => $listingProduct->getData('sku'), 'status' => Ess_M2ePro_Model_Listing_Product::STATUS_STOPPED);
     $listingProduct->addData($data)->save();
     $dataForAdd = array('account_id' => $listingProduct->getListing()->getAccountId(), 'marketplace_id' => $listingProduct->getListing()->getMarketplaceId(), 'sku' => $listingProduct->getData('sku'), 'product_id' => $listingProduct->getProductId(), 'store_id' => $listingProduct->getListing()->getStoreId());
     Mage::getModel('M2ePro/Amazon_Item')->setData($dataForAdd)->save();
     $message = Mage::helper('M2ePro')->__('The product was found in your Amazon inventory and linked by SKU.');
     $this->addListingsProductsLogsMessage($listingProduct, $message, Ess_M2ePro_Model_Log_Abstract::TYPE_SUCCESS, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:9,代码来源:Multiple.php

示例5: modifyAndLogListingProduct

 private function modifyAndLogListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct, $status, $duplicateItemId = null)
 {
     /** @var Ess_M2ePro_Model_Listing_Log $logModel */
     $logModel = Mage::getModel('M2ePro/Listing_Log');
     $logModel->setComponentMode(Ess_M2ePro_Helper_Component_Ebay::NICK);
     $logsActionId = $logModel->getNextActionId();
     $statusLogMessage = $this->getStatusLogMessage($listingProduct->getStatus(), $status);
     $logModel->addProductMessage($listingProduct->getData('listing_id'), $listingProduct->getData('product_id'), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, $logsActionId, Ess_M2ePro_Model_Listing_Log::ACTION_CHANNEL_CHANGE, $statusLogMessage, Ess_M2ePro_Model_Log_Abstract::TYPE_SUCCESS, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
     $additionalData = $listingProduct->getAdditionalData();
     unset($additionalData['last_failed_action_data']);
     $listingProduct->addData(array('status' => $status, 'additional_data' => json_encode($additionalData)))->save();
     $listingProduct->getChildObject()->updateVariationsStatus();
     if (is_null($duplicateItemId)) {
         return;
     }
     // M2ePro_TRANSLATIONS
     // Duplicated Item %item_id% was found and Stopped on eBay.
     $textToTranslate = 'Duplicated Item %item_id% was found and stopped on eBay.';
     $duplicateDeletedMessage = Mage::helper('M2ePro')->__($textToTranslate, $duplicateItemId);
     $logModel->addProductMessage($listingProduct->getData('listing_id'), $listingProduct->getData('product_id'), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, $logsActionId, Ess_M2ePro_Model_Listing_Log::ACTION_CHANNEL_CHANGE, $duplicateDeletedMessage, Ess_M2ePro_Model_Log_Abstract::TYPE_WARNING, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:21,代码来源:RemoveDuplicates.php

示例6: linkItem

 private function linkItem(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $data = array('general_id' => $listingProduct->getData('general_id'), 'sku' => $listingProduct->getData('sku'), 'status' => Ess_M2ePro_Model_Listing_Product::STATUS_STOPPED);
     $listingProduct->addData($data)->save();
     $dataForAdd = array('account_id' => $listingProduct->getListing()->getAccountId(), 'marketplace_id' => $listingProduct->getListing()->getMarketplaceId(), 'sku' => $listingProduct->getData('sku'), 'product_id' => $listingProduct->getProductId(), 'store_id' => $listingProduct->getListing()->getStoreId());
     if ($listingProduct->getChildObject()->isVariationsReady()) {
         $variations = $listingProduct->getVariations(true);
         /* @var $variation Ess_M2ePro_Model_Listing_Product_Variation */
         $variation = reset($variations);
         $options = $variation->getOptions();
         $dataForAdd['variation_options'] = array();
         foreach ($options as $optionData) {
             $dataForAdd['variation_options'][$optionData['attribute']] = $optionData['option'];
         }
         $dataForAdd['variation_options'] = json_encode($dataForAdd['variation_options']);
     }
     Mage::getModel('M2ePro/Buy_Item')->setData($dataForAdd)->save();
     $message = Mage::helper('M2ePro')->__('The product was found in your Rakuten.com inventory and linked by Reference ID.');
     $this->addListingsProductsLogsMessage($listingProduct, $message, Ess_M2ePro_Model_Log_Abstract::TYPE_SUCCESS, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM);
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:20,代码来源:Multiple.php

示例7: 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


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