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


PHP Mage_Sales_Model_Order_Item::getStoreId方法代码示例

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


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

示例1: itemToQuoteItem

 /**
  * Retrieve
  *
  * @param Mage_Sales_Model_Order_Item $item
  * @return unknown
  */
 public function itemToQuoteItem(Mage_Sales_Model_Order_Item $item)
 {
     $quoteItem = Mage::getModel('sales/quote_item')->setStoreId($item->getStoreId())->setQuoteItemId($item->getId())->setProductId($item->getProductId())->setSuperProductId($item->getSuperProductId())->setParentProductId($item->getParentProductId())->setSku($item->getSku())->setName($item->getName())->setDescription($item->getDescription())->setWeight($item->getWeight())->setCustomPrice($item->getPrice())->setDiscountPercent($item->getDiscountPercent())->setDiscountAmount($item->getDiscountAmount())->setTaxPercent($item->getTaxPercent())->setTaxAmount($item->getTaxAmount())->setRowWeight($item->getRowWeight())->setRowTotal($item->getRowTotal())->setAppliedRuleIds($item->getAppliedRuleIds())->setBaseDiscountAmount($item->getBaseDiscountAmount())->setBaseTaxAmount($item->getBaseTaxAmount())->setBaseRowTotal($item->getBaseRowTotal());
     return $quoteItem;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:11,代码来源:Order.php

示例2: sync

 /**
  * Sync the given order item to Klevu. Returns true on successful sync and
  * the error message otherwise.
  *
  * @param Mage_Sales_Model_Order_Item $item
  *
  * @return bool|string
  */
 protected function sync($item)
 {
     if (!$this->getApiKey($item->getStoreId())) {
         return "Klevu Search is not configured for this store.";
     }
     $parent = null;
     if ($item->getParentItemId()) {
         $parent = Mage::getModel("sales/order_item")->load($item->getParentItemId());
     }
     $response = Mage::getModel("klevu_search/api_action_producttracking")->execute(array("klevu_apiKey" => $this->getApiKey($item->getStoreId()), "klevu_type" => "checkout", "klevu_productId" => Mage::helper("klevu_search")->getKlevuProductId($item->getProductId(), $parent ? $parent->getProductId() : 0), "klevu_unit" => $item->getQtyOrdered() ? $item->getQtyOrdered() : ($parent ? $parent->getQtyOrdered() : null), "klevu_salePrice" => $item->getPriceInclTax() ? $item->getPriceInclTax() : ($parent ? $parent->getPriceInclTax() : null), "klevu_currency" => $this->getStoreCurrency($item->getStoreId()), "klevu_shopperIP" => $this->getOrderIP($item->getOrderId())));
     if ($response->isSuccessful()) {
         return true;
     } else {
         return $response->getMessage();
     }
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:24,代码来源:Sync.php

示例3: loadOrderItemOptions

 /**
  * load option data for $item
  *
  * @param  Mage_Sales_Model_Order_Item
  * @return Mage_Eav_Model_Resource_Entity_Attribute_Option_Collection
  */
 protected function loadOrderItemOptions(Mage_Sales_Model_Order_Item $item)
 {
     $buyRequest = $item->getProductOptionByCode('info_buyRequest');
     $attrs = isset($buyRequest['super_attribute']) ? $buyRequest['super_attribute'] : [];
     $attrTable = ['attribute_table' => Mage::getSingleton('core/resource')->getTableName('eav/attribute')];
     $options = Mage::getResourceModel('eav/entity_attribute_option_collection');
     // join with the attribute table to get the attribute code.
     $options->getSelect()->join($attrTable, 'main_table.attribute_id=attribute_table.attribute_id', ['attribute_code']);
     $options->setStoreFilter($item->getStoreId());
     $options->addFieldToFilter('main_table.attribute_id', ['in' => array_keys($attrs)]);
     $options->addFieldToFilter('main_table.option_id', ['in' => array_values($attrs)]);
     return $options;
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:19,代码来源:Orderitem.php

示例4: _getGoogleShoppingItemInfo

 /**
  * Tries to load Google shopping info related to order item
  *
  * @param Mage_Sales_Model_Order_Item $item
  * @return array|null Null if cannot load; array if can
  */
 protected function _getGoogleShoppingItemInfo(Mage_Sales_Model_Order_Item $item)
 {
     $helper = Mage::getSingleton('googletrustedstore/googleShoppingAdapter');
     if ($helper->isActive()) {
         $product = Mage::getModel('catalog/product')->load($item->getProductId());
         if ($product->getId()) {
             $storeId = $item->getStoreId();
             $gsItemId = $helper->getItemId($product, $storeId);
             if ($gsItemId) {
                 return array('id' => $this->escapeHtml($gsItemId), 'account_id' => $this->escapeHtml($helper->getAccountId($storeId)), 'country' => $helper->getTargetCountry($storeId), 'language' => $helper->getTargetLanguage($storeId));
             }
         }
     }
 }
开发者ID:CE-Webmaster,项目名称:CE-Hub,代码行数:20,代码来源:Onepage.php

示例5: _createSimpleOrderLineData

 /**
  * Returns SimpleOrderLineData record
  *
  * @param Mage_Sales_Model_Order_Item $item
  * @return array
  */
 protected function _createSimpleOrderLineData(Mage_Sales_Model_Order_Item $item)
 {
     /** @var $product Mage_Catalog_Model_Product */
     $product = Mage::getModel('catalog/product')->setStoreId($item->getStoreId())->load($item->getProductId());
     $data = array('orderLineId' => null, 'itemId' => (string) $item->getId(), 'orderNumber' => (string) $this->getOrderNumber(), 'quantity' => (double) $item->getQtyOrdered(), 'productSku' => (string) $item->getSku(), 'itemDescription' => (string) ($product->getShortDescription() ? $product->getShortDescription() : $product->getDescription()), 'unitPrice' => $this->_createOrderLinePrice($item, $item->getQtyOrdered()), 'totalTaxAmount' => $this->_createCurrencyAmount($item->getTaxAmount()), 'status' => $this->_createOrderItemStatus($item), 'price' => $this->_createCurrencyAmount($item->getBaseRowTotal()), 'allDiscounts' => null, 'dateCancelled' => null, 'dateDelivered' => null, 'dateShipped' => null, 'dateReturned' => null, 'dateInvoiced' => null, 'destination' => $this->_createShipTo($item->getOrder()->getShippingAddress()), 'shipmentId' => null, 'offerId' => null, 'offerUrl' => null);
     return $data;
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:13,代码来源:Order.php

示例6: _getTaxClassId

 /**
  * @param Mage_Sales_Model_Order_Item $item
  * @return array|bool|string
  */
 protected function _getTaxClassId(Mage_Sales_Model_Order_Item $item)
 {
     return Mage::getResourceModel('catalog/product')->getAttributeRawValue($item->getProductId(), 'tax_class_id', $item->getStoreId());
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:8,代码来源:Observer.php

示例7: getFrontendProductUrlForOrderItem

 /**
  * @param Mage_Sales_Model_Order_Item $orderItem
  *
  * @return string
  */
 public function getFrontendProductUrlForOrderItem(Mage_Sales_Model_Order_Item $orderItem)
 {
     $productId = $orderItem->getProductId();
     if ($orderItem->getParentItemId()) {
         $parentItem = Mage::getModel('sales/order_item')->load($orderItem->getParentItemId());
         $productId = $parentItem->getProductId();
     }
     $product = Mage::getModel('catalog/product')->setStoreId($orderItem->getStoreId())->load($productId);
     if (null === $product->getId()) {
         return '#';
     }
     return $product->getProductUrl();
 }
开发者ID:protechhelp,项目名称:gamamba,代码行数:18,代码来源:CustomerOrders.php


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