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


PHP Ess_M2ePro_Model_Listing_Product::getProductId方法代码示例

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


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

示例1: validateChannelConditions

 protected function validateChannelConditions($sourceVariations, $writeLogs = true)
 {
     $tempLog = Mage::getModel('M2ePro/Listing_Log');
     $tempLog->setComponentMode(Ess_M2ePro_Helper_Component_Ebay::NICK);
     $failResult = array('set' => array(), 'variations' => array());
     $set = $sourceVariations['set'];
     $variations = $sourceVariations['variations'];
     foreach ($set as $singleSet) {
         if (count($singleSet) > 30) {
             // Maximum 30 options by one attribute:
             // Color: Red, Blue, Green, ...
             $writeLogs && $tempLog->addProductMessage($this->listingProduct->getListingId(), $this->listingProduct->getProductId(), $this->listingProduct->getId(), $this->logsInitiator, $this->logsActionId, $this->logsAction, 'The product will be listed as a simple product as it has limitation for multi-variation items. Reason: ' . 'number of values for each option more than 30.', Ess_M2ePro_Model_Log_Abstract::TYPE_WARNING, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM);
             return $failResult;
         }
     }
     foreach ($variations as $singleVariation) {
         if (count($singleVariation) > 5) {
             // Max 5 pair attribute-option:
             // Color: Blue, Size: XL, ...
             $writeLogs && $tempLog->addProductMessage($this->listingProduct->getListingId(), $this->listingProduct->getProductId(), $this->listingProduct->getId(), Ess_M2ePro_Model_Log_Abstract::INITIATOR_UNKNOWN, NULL, Ess_M2ePro_Model_Listing_Log::ACTION_ADD_PRODUCT_TO_LISTING, 'The product will be listed as a simple product as it has limitation for multi-variation items. Reason: ' . 'number of options more than 5.', Ess_M2ePro_Model_Log_Abstract::TYPE_WARNING, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM);
             return $failResult;
         }
     }
     if (count($variations) > 250) {
         // Not more that 250 possible variations
         $writeLogs && $tempLog->addProductMessage($this->listingProduct->getListingId(), $this->listingProduct->getProductId(), $this->listingProduct->getId(), Ess_M2ePro_Model_Log_Abstract::INITIATOR_UNKNOWN, NULL, Ess_M2ePro_Model_Listing_Log::ACTION_ADD_PRODUCT_TO_LISTING, 'The product will be listed as a simple product as it has limitation for multi-variation items. Reason: ' . 'sum of quantities of all possible products options more than 250.', Ess_M2ePro_Model_Log_Abstract::TYPE_WARNING, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM);
         return $failResult;
     }
     return $sourceVariations;
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:30,代码来源:Updater.php

示例2: logListingProductMessage

 public function logListingProductMessage(Ess_M2ePro_Model_Listing_Product $listingProduct, array $messageData, $priority = Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM)
 {
     if ($this->storeMode) {
         $this->storedMessages[] = array('type' => $this->initLogType($messageData[Ess_M2ePro_Model_Connector_Protocol::MESSAGE_TYPE_KEY]), 'text' => $messageData[Ess_M2ePro_Model_Connector_Protocol::MESSAGE_TEXT_KEY]);
         return;
     }
     $this->getListingLog()->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), $this->initiator, $this->actionId, $this->action, $messageData[Ess_M2ePro_Model_Connector_Protocol::MESSAGE_TEXT_KEY], $this->initLogType($messageData[Ess_M2ePro_Model_Connector_Protocol::MESSAGE_TYPE_KEY]), $priority);
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:8,代码来源:Logger.php

示例3: addListingsProductsLogsMessage

 protected function addListingsProductsLogsMessage(Ess_M2ePro_Model_Listing_Product $listingProduct, $text, $type = Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, $priority = Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM)
 {
     $action = Ess_M2ePro_Model_Listing_Log::ACTION_TRANSLATE_PRODUCT;
     if ($this->getStatusChanger() == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_UNKNOWN) {
         $initiator = Ess_M2ePro_Helper_Data::INITIATOR_UNKNOWN;
     } else {
         if ($this->getStatusChanger() == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_USER) {
             $initiator = Ess_M2ePro_Helper_Data::INITIATOR_USER;
         } else {
             $initiator = Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION;
         }
     }
     $logModel = Mage::getModel('M2ePro/Listing_Log');
     $logModel->setComponentMode(Ess_M2ePro_Helper_Component_Ebay::NICK);
     $logModel->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), $initiator, $this->getLogsActionId(), $action, $text, $type, $priority);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:16,代码来源:MultipleResponser.php

示例4: addBaseListingsLogsMessage

 protected function addBaseListingsLogsMessage(Ess_M2ePro_Model_Listing_Product $listingProduct, $text, $type = Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, $priority = Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM, $isListingMode = true)
 {
     $action = $this->getListingsLogsCurrentAction();
     is_null($action) && ($action = Ess_M2ePro_Model_Listing_Log::ACTION_UNKNOWN);
     switch ($type) {
         case Ess_M2ePro_Model_Log_Abstract::TYPE_ERROR:
             $this->setStatus(Ess_M2ePro_Helper_Data::STATUS_ERROR);
             break;
         case Ess_M2ePro_Model_Log_Abstract::TYPE_WARNING:
             $this->setStatus(Ess_M2ePro_Helper_Data::STATUS_WARNING);
             break;
         case Ess_M2ePro_Model_Log_Abstract::TYPE_SUCCESS:
         case Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE:
             $this->setStatus(Ess_M2ePro_Helper_Data::STATUS_SUCCESS);
             break;
         default:
             $this->setStatus(Ess_M2ePro_Helper_Data::STATUS_ERROR);
             break;
     }
     $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_UNKNOWN;
     if ($this->params['status_changer'] == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_UNKNOWN) {
         $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_UNKNOWN;
     } else {
         if ($this->params['status_changer'] == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_USER) {
             $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_USER;
         } else {
             $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_EXTENSION;
         }
     }
     $logModel = Mage::getModel('M2ePro/Listing_Log');
     $logModel->setComponentMode(Ess_M2ePro_Helper_Component_Play::NICK);
     if ($isListingMode) {
         $logModel->addListingMessage($listingProduct->getListingId(), $initiator, $this->logsActionId, $action, $text, $type, $priority);
     } else {
         $logModel->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), $initiator, $this->logsActionId, $action, $text, $type, $priority);
     }
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:37,代码来源:Requester.php

示例5: createNewAmazonItem

 protected function createNewAmazonItem(Ess_M2ePro_Model_Listing_Product $listingProduct, $sku)
 {
     $dataForAdd = array('account_id' => (int) $listingProduct->getListing()->getAccountId(), 'marketplace_id' => (int) $listingProduct->getListing()->getMarketplaceId(), 'sku' => $sku, 'product_id' => (int) $listingProduct->getProductId(), 'store_id' => (int) $listingProduct->getListing()->getStoreId());
     if ($listingProduct->getChildObject()->isVariationMatched() && $listingProduct->getChildObject()->isVariationProduct()) {
         $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']);
     }
     return Mage::getModel('M2ePro/Amazon_Item')->setData($dataForAdd)->save()->getId();
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:16,代码来源:Helper.php

示例6: addBaseListingsLogsMessage

 protected function addBaseListingsLogsMessage(Ess_M2ePro_Model_Listing_Product $listingProduct, $text, $type = Ess_M2ePro_Model_Log_Abstract::TYPE_NOTICE, $priority = Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM, $isListingMode = true)
 {
     $action = $this->getListingsLogsCurrentAction();
     is_null($action) && ($action = Ess_M2ePro_Model_Listing_Log::ACTION_UNKNOWN);
     $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_UNKNOWN;
     if ($this->getStatusChanger() == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_UNKNOWN) {
         $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_UNKNOWN;
     } else {
         if ($this->getStatusChanger() == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_USER) {
             $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_USER;
         } else {
             $initiator = Ess_M2ePro_Model_Log_Abstract::INITIATOR_EXTENSION;
         }
     }
     $logModel = Mage::getModel('M2ePro/Listing_Log');
     $logModel->setComponentMode(Ess_M2ePro_Helper_Component_Play::NICK);
     if ($isListingMode) {
         $logModel->addListingMessage($listingProduct->getListingId(), $initiator, $this->getLogsActionId(), $action, $text, $type, $priority);
     } else {
         $logModel->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), $initiator, $this->getLogsActionId(), $action, $text, $type, $priority);
     }
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:22,代码来源:Responser.php

示例7: prepareChangedListingsProducts

 private function prepareChangedListingsProducts(Ess_M2ePro_Model_Listing_Product $tempListingProductModel, $ebayChange)
 {
     /** @var $tempEbayListingProductModel Ess_M2ePro_Model_Ebay_Listing_Product */
     $tempEbayListingProductModel = $tempListingProductModel->getChildObject();
     // Prepare eBay changes values
     //--------------------------
     $tempEbayChanges = array();
     if ($tempEbayListingProductModel->isListingTypeAuction()) {
         $tempEbayChanges['online_start_price'] = (double) $ebayChange['currentPrice'] < 0 ? 0 : (double) $ebayChange['currentPrice'];
     }
     if ($tempEbayListingProductModel->isListingTypeFixed()) {
         $tempEbayChanges['online_buyitnow_price'] = (double) $ebayChange['currentPrice'] < 0 ? 0 : (double) $ebayChange['currentPrice'];
     }
     $tempEbayChanges['online_qty'] = (int) $ebayChange['quantity'] < 0 ? 0 : (int) $ebayChange['quantity'];
     $tempEbayChanges['online_qty_sold'] = (int) $ebayChange['quantitySold'] < 0 ? 0 : (int) $ebayChange['quantitySold'];
     if ($tempEbayListingProductModel->isListingTypeAuction()) {
         $tempEbayChanges['online_qty'] = 1;
         $tempEbayChanges['online_bids'] = (int) $ebayChange['bidCount'] < 0 ? 0 : (int) $ebayChange['bidCount'];
     }
     $tempEbayChanges['start_date'] = Ess_M2ePro_Model_Connector_Ebay_Abstract::ebayTimeToString($ebayChange['startTime']);
     $tempEbayChanges['end_date'] = Ess_M2ePro_Model_Connector_Ebay_Abstract::ebayTimeToString($ebayChange['endTime']);
     if ($tempEbayChanges['online_qty'] == $tempEbayChanges['online_qty_sold'] && ($ebayChange['listingStatus'] == self::EBAY_STATUS_COMPLETED || $ebayChange['listingStatus'] == self::EBAY_STATUS_ENDED)) {
         $tempEbayChanges['status'] = Ess_M2ePro_Model_Listing_Product::STATUS_SOLD;
     } else {
         if ($ebayChange['listingStatus'] == self::EBAY_STATUS_COMPLETED) {
             $tempEbayChanges['status'] = Ess_M2ePro_Model_Listing_Product::STATUS_STOPPED;
         } else {
             if ($ebayChange['listingStatus'] == self::EBAY_STATUS_ENDED) {
                 $tempEbayChanges['status'] = Ess_M2ePro_Model_Listing_Product::STATUS_FINISHED;
             } else {
                 if ($ebayChange['listingStatus'] == self::EBAY_STATUS_ACTIVE) {
                     $tempEbayChanges['status'] = Ess_M2ePro_Model_Listing_Product::STATUS_LISTED;
                 }
             }
         }
     }
     if ($tempListingProductModel->getStatus() != $tempEbayChanges['status'] || $tempListingProductModel->getChildObject()->getOnlineQty() != $tempEbayChanges['online_qty'] || $tempListingProductModel->getChildObject()->getOnlineQtySold() != $tempEbayChanges['online_qty_sold']) {
         Mage::getModel('M2ePro/ProductChange')->addUpdateAction($tempListingProductModel->getProductId(), Ess_M2ePro_Model_ProductChange::CREATOR_TYPE_SYNCHRONIZATION);
     }
     if ($tempEbayChanges['status'] != $tempListingProductModel->getStatus()) {
         $tempEbayChanges['status_changer'] = Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_COMPONENT;
         $tempLogMessage = '';
         switch ($tempEbayChanges['status']) {
             case Ess_M2ePro_Model_Listing_Product::STATUS_LISTED:
                 // Parser hack -> Mage::helper('M2ePro')->__('Item status was successfully changed to "Listed".');
                 $tempLogMessage = 'Item status was successfully changed to "Listed".';
                 break;
             case Ess_M2ePro_Model_Listing_Product::STATUS_SOLD:
                 // Parser hack -> Mage::helper('M2ePro')->__('Item status was successfully changed to "Sold".');
                 $tempLogMessage = 'Item status was successfully changed to "Sold".';
                 break;
             case Ess_M2ePro_Model_Listing_Product::STATUS_STOPPED:
                 // Parser hack -> Mage::helper('M2ePro')->__('Item status was successfully changed to "Stopped".');
                 $tempLogMessage = 'Item status was successfully changed to "Stopped".';
                 break;
             case Ess_M2ePro_Model_Listing_Product::STATUS_FINISHED:
                 // Parser hack -> Mage::helper('M2ePro')->__('Item status was successfully changed to "Finished".');
                 $tempLogMessage = 'Item status was successfully changed to "Finished".';
                 break;
         }
         $tempLog = Mage::getModel('M2ePro/Listing_Log');
         $tempLog->setComponentMode(Ess_M2ePro_Helper_Component_Ebay::NICK);
         $tempLog->addProductMessage($tempListingProductModel->getListingId(), $tempListingProductModel->getProductId(), $tempListingProductModel->getId(), Ess_M2ePro_Model_Log_Abstract::INITIATOR_EXTENSION, $this->getLogActionId(), Ess_M2ePro_Model_Listing_Log::ACTION_CHANGE_STATUS_ON_CHANNEL, $tempLogMessage, Ess_M2ePro_Model_Log_Abstract::TYPE_SUCCESS, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
     }
     //--------------------------
     // Create changed listings products
     //--------------------------
     $changedListingsProducts = array('ebay_item_id' => $ebayChange['id'], 'listing_product' => array('instance' => $tempListingProductModel, 'changes' => $tempEbayChanges), 'listings_products_variations' => array());
     //--------------------------
     // Cancel when have not eBay variations
     //--------------------------
     if (!isset($ebayChange['variations']) || is_null($ebayChange['variations'])) {
         return $changedListingsProducts;
     }
     //--------------------------
     // Get listings products variations
     //-----------------------
     $tempVariations = $tempListingProductModel->getVariations(true);
     if (count($tempVariations) == 0) {
         return $changedListingsProducts;
     }
     //-----------------------
     // Get listings products variations with options
     //-----------------------
     $tempVariationsWithOptions = array();
     foreach ($tempVariations as $variation) {
         /** @var $variation Ess_M2ePro_Model_Listing_Product_Variation */
         $options = $variation->getOptions(true);
         if (count($options) == 0) {
             continue;
         }
         $tempVariationsWithOptions[] = array('variation' => $variation, 'options' => $options);
     }
     if (count($tempVariationsWithOptions) == 0) {
         return $changedListingsProducts;
     }
     //-----------------------
     // Search our variations for eBay variations
     //--------------------------
     foreach ($ebayChange['variations'] as $ebayVariation) {
//.........这里部分代码省略.........
开发者ID:technomagegithub,项目名称:magento,代码行数:101,代码来源:UpdateListingsProducts.php

示例8: isTheSameProductAlreadyListed

 protected function isTheSameProductAlreadyListed(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $config = Mage::helper('M2ePro/Module')->getConfig()->getGroupValue('/ebay/connector/listing/', 'check_the_same_product_already_listed');
     if (!is_null($config) && $config != 1) {
         return false;
     }
     $listingProductCollection = Mage::helper('M2ePro/Component_Ebay')->getCollection('Listing_Product');
     $listingTable = Mage::getResourceModel('M2ePro/Listing')->getMainTable();
     $listingProductCollection->getSelect()->join(array('l' => $listingTable), '`main_table`.`listing_id` = `l`.`id`', array());
     $listingProductCollection->addFieldToFilter('status', array('neq' => Ess_M2ePro_Model_Listing_Product::STATUS_NOT_LISTED))->addFieldToFilter('product_id', $listingProduct->getProductId())->addFieldToFilter('account_id', $this->account->getId())->addFieldToFilter('marketplace_id', $this->marketplace->getId());
     $theSameListingProduct = $listingProductCollection->getFirstItem();
     if (!$theSameListingProduct->getId()) {
         return false;
     }
     $listing = $theSameListingProduct->getListing();
     $message = Mage::helper('M2ePro')->__('There is another item with the same eBay user ID, product ID and marketplace presented in "%s" (%d) Listing.', $listing->getTitle(), $listing->getId());
     $message = array(parent::MESSAGE_TEXT_KEY => $message, parent::MESSAGE_TYPE_KEY => parent::MESSAGE_TYPE_ERROR);
     $this->addListingsProductsLogsMessage($listingProduct, $message, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM);
     return true;
 }
开发者ID:xiaoguizhidao,项目名称:bb,代码行数:20,代码来源:Abstract.php

示例9: createNewAmazonItem

 protected function createNewAmazonItem(Ess_M2ePro_Model_Listing_Product $listingProduct, $sku)
 {
     $dataForAdd = array('account_id' => (int) $listingProduct->getListing()->getGeneralTemplate()->getAccountId(), 'marketplace_id' => (int) $listingProduct->getListing()->getGeneralTemplate()->getMarketplaceId(), 'sku' => $sku, 'product_id' => (int) $listingProduct->getProductId(), 'store_id' => (int) $listingProduct->getListing()->getStoreId());
     return Mage::getModel('M2ePro/Amazon_Item')->setData($dataForAdd)->save()->getId();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:5,代码来源:Helper.php

示例10: logChangeOfStatus

 private function logChangeOfStatus(Ess_M2ePro_Model_Listing_Product $listingProduct, $status)
 {
     $message = '';
     switch ($status) {
         case Ess_M2ePro_Model_Listing_Product::STATUS_LISTED:
             // M2ePro_TRANSLATIONS
             // Item status was successfully changed to "Listed".
             $message = 'Item status was successfully changed to "Listed".';
             break;
         case Ess_M2ePro_Model_Listing_Product::STATUS_HIDDEN:
             // M2ePro_TRANSLATIONS
             // Item status was successfully changed to "Listed(Hidden)".
             $message = 'Item status was successfully changed to "Listed(Hidden)".';
             break;
         case Ess_M2ePro_Model_Listing_Product::STATUS_SOLD:
             // M2ePro_TRANSLATIONS
             // Item status was successfully changed to "Sold".
             $message = 'Item status was successfully changed to "Sold".';
             break;
         case Ess_M2ePro_Model_Listing_Product::STATUS_STOPPED:
             // M2ePro_TRANSLATIONS
             // Item status was successfully changed to "Stopped".
             $message = 'Item status was successfully changed to "Stopped".';
             break;
         case Ess_M2ePro_Model_Listing_Product::STATUS_FINISHED:
             // M2ePro_TRANSLATIONS
             // Item status was successfully changed to "Finished".
             $message = 'Item status was successfully changed to "Finished".';
             break;
     }
     $log = Mage::getModel('M2ePro/Listing_Log');
     $log->setComponentMode(Ess_M2ePro_Helper_Component_Ebay::NICK);
     $log->addProductMessage($listingProduct->getListingId(), $listingProduct->getProductId(), $listingProduct->getId(), Ess_M2ePro_Helper_Data::INITIATOR_EXTENSION, $this->getLogsActionId(), Ess_M2ePro_Model_Listing_Log::ACTION_CHANGE_STATUS_ON_CHANNEL, $message, Ess_M2ePro_Model_Log_Abstract::TYPE_SUCCESS, Ess_M2ePro_Model_Log_Abstract::PRIORITY_LOW);
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:34,代码来源:UpdateListingsProducts.php

示例11: updateListingsProductChange

 private function updateListingsProductChange(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     Mage::getModel('M2ePro/ProductChange')->addUpdateAction($listingProduct->getProductId(), Ess_M2ePro_Model_ProductChange::CREATOR_TYPE_SYNCHRONIZATION);
     $variations = $listingProduct->getVariations(true);
     foreach ($variations as $variation) {
         /** @var $variation Ess_M2ePro_Model_Listing_Product_Variation */
         $options = $variation->getOptions(true);
         foreach ($options as $option) {
             /** @var $option Ess_M2ePro_Model_Listing_Product_Variation_Option */
             Mage::getModel('M2ePro/ProductChange')->addUpdateAction($option->getProductId(), Ess_M2ePro_Model_ProductChange::CREATOR_TYPE_SYNCHRONIZATION);
         }
     }
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:13,代码来源:Circle.php

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

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

示例14: duplicateListingProduct

 private function duplicateListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct)
 {
     $duplicatedListingProduct = $listingProduct->getListing()->addProduct($listingProduct->getProductId(), false, false);
     $variationManager = $listingProduct->getChildObject()->getVariationManager();
     if (!$variationManager->isVariationProduct()) {
         return $duplicatedListingProduct;
     }
     if ($listingProduct->isComponentModeAmazon()) {
         $duplicatedListingProductManager = $duplicatedListingProduct->getChildObject()->getVariationManager();
         if ($variationManager->isIndividualType() && $duplicatedListingProductManager->modeCanBeSwitched()) {
             $duplicatedListingProductManager->switchModeToAnother();
         }
     }
     return $duplicatedListingProduct;
 }
开发者ID:ppkowalski,项目名称:M2E,代码行数:15,代码来源:ListingController.php

示例15: updateListingProduct

 private function updateListingProduct(Ess_M2ePro_Model_Listing_Product $listingProduct, $generalId)
 {
     $tempSku = $listingProduct->getChildObject()->getAddingSku();
     $data = array('general_id' => $generalId, 'sku' => $tempSku, 'existance_check_status' => Ess_M2ePro_Model_Buy_Listing_Product::EXISTANCE_CHECK_STATUS_FOUND, 'status' => Ess_M2ePro_Model_Listing_Product::STATUS_STOPPED);
     $listingProduct->addData($data)->save();
     $dataForAdd = array('account_id' => $listingProduct->getListing()->getGeneralTemplate()->getAccountId(), 'marketplace_id' => $listingProduct->getListing()->getGeneralTemplate()->getMarketplaceId(), 'sku' => $tempSku, 'product_id' => $listingProduct->getProductId(), 'store_id' => $listingProduct->getListing()->getStoreId());
     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:xiaoguizhidao,项目名称:beut,代码行数:10,代码来源:Multiple.php


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