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


PHP Mage_Sales_Model_Order_Item::getQuoteItemId方法代码示例

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


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

示例1: getItemAllocationInformation

 /**
  * get allocation information for an item
  *
  * @param  Mage_Sales_Model_Order_Item
  * @return EbayEnterprise_Inventory_Model_Allocation|null
  */
 public function getItemAllocationInformation(Mage_Sales_Model_Order_Item $item)
 {
     $result = $this->getInventorySession()->getAllocationResult();
     if ($result) {
         return $result->lookupAllocationByItemId($item->getQuoteItemId());
     }
     $this->logger->debug('Unable to get allocation information for item {sku} id {item_id}', $this->logContext->getMetaData(__CLASS__, ['sku' => $item->getSku(), 'item_id' => $item->getQuoteItemId()]));
     return null;
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:15,代码来源:Service.php

示例2: addSalesOrderItemFilter

 /**
  *
  * @param Mage_Sales_Model_Order_Item $item
  */
 public function addSalesOrderItemFilter(Mage_Sales_Model_Order_Item $item)
 {
     $this->getSelect()->join(array('stqt' => $this->getTable('adm_warehouse/sales_item_quote')), 'main_table.stock_id=stqt.stock_id AND main_table.product_id=stqt.product_id', array('quote_qty' => 'stqt.qty'))->where('quote_item_id=?', $item->getQuoteItemId());
     return $this;
 }
开发者ID:Rugento,项目名称:ADM_Warehouse,代码行数:9,代码来源:Collection.php

示例3: getDetailsForOrderItem

 /**
  * Get item details for the given order item.
  * returns null if the item was excluded from the request or if
  * there was an error in the sdk
  *
  * @param  Mage_Sales_Model_Order_Item
  * @return EbayEnterprise_Inventory_Model_Details_Item|null
  */
 public function getDetailsForOrderItem(Mage_Sales_Model_Order_Item $item)
 {
     try {
         $result = $this->factory->createDetailsModel()->fetch($item->getOrder()->getQuote());
         return !is_null($result) ? $result->lookupDetailsByItemId($item->getQuoteItemId()) : $result;
     } catch (EbayEnterprise_Inventory_Exception_Details_Operation_Exception $e) {
         return null;
     }
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:17,代码来源:Service.php

示例4: initFromOrderItem

 /**
  * Initialize creation data from existing order Item
  *
  * @param Mage_Sales_Model_Order_Item $orderItem
  * @param int $qty
  * @return Mage_Sales_Model_Quote_Item | string
  */
 public function initFromOrderItem(Mage_Sales_Model_Order_Item $orderItem, $qty = null)
 {
     if (!$orderItem->getId()) {
         return $this;
     }
     $product = Mage::getModel('catalog/product')->setStoreId($this->getSession()->getStoreId())->load($orderItem->getProductId());
     if ($product->getId()) {
         $product->setSkipCheckRequiredOption(true);
         $buyRequest = $orderItem->getBuyRequest();
         if (is_numeric($qty)) {
             $buyRequest->setQty($qty);
         }
         $item = $this->getQuote()->addProduct($product, $buyRequest);
         if (is_string($item)) {
             return $item;
         }
         /*********************************************Set custom price selected starts************************************************************/
         if (!$this->getSession()->getReordered() && $orderItem->getOriginalPrice() != $orderItem->getPrice()) {
             if ($orderItem->getProductType() == 'configurable' || $orderItem->getProductType() == 'bundle') {
                 $productId = $orderItem->getProductId();
                 $quoteItemId = $orderItem->getQuoteItemId();
                 $items = $this->getQuote()->getItemsCollection();
                 foreach ($items as $item) {
                     if ($item->getProduct()->getId() == $productId && !$item->getApplyPriceFlag()) {
                         if ($orderItem->getOriginalPrice() != $orderItem->getPrice()) {
                             $item->setCustomPrice($orderItem->getPrice())->setOriginalCustomPrice($orderItem->getPrice());
                         }
                         //$item->setApplyPriceFlag(true);
                     }
                 }
             } else {
                 $item->setCustomPrice($orderItem->getPrice())->setOriginalCustomPrice($orderItem->getPrice());
             }
         }
         /*********************************************Set custom price selected ends************************************************************/
         if ($additionalOptions = $orderItem->getProductOptionByCode('additional_options')) {
             $item->addOption(new Varien_Object(array('product' => $item->getProduct(), 'code' => 'additional_options', 'value' => serialize($additionalOptions))));
         }
         Mage::dispatchEvent('sales_convert_order_item_to_quote_item', array('order_item' => $orderItem, 'quote_item' => $item));
         return $item;
     }
     return $this;
 }
开发者ID:CE-Webmaster,项目名称:CE-Hub,代码行数:50,代码来源:Create.php

示例5: prepareOrderItemData

 /**
  * @param Mage_Sales_Model_Order_Item $orderItem
  * @return array
  */
 public function prepareOrderItemData($orderItem)
 {
     $data = array($this->getOpportunityKey() => $orderItem->getQuoteItemId(), self::IS_CLOSED => true, self::IS_WON => true, self::CLOSE_DATE => $this->_getDateTimeHelper()->getServerDate(), self::STAGE => $this->_getHelper()->getHardcodedOpportunityFields("purchase_stage"), self::PROBABILITY => $this->_getHelper()->getHardcodedOpportunityFields("purchase_probability"));
     $this->_addCommonData($data);
     Mage::dispatchEvent("opportunity_dynamic_before_update", array("opportunity_data" => &$data, "order_item" => $orderItem));
     return $data;
 }
开发者ID:sereban,项目名称:magento-marketo-integration,代码行数:11,代码来源:Opportunity.php


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