本文整理汇总了PHP中Mage_Sales_Model_Quote_Item::getStore方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote_Item::getStore方法的具体用法?PHP Mage_Sales_Model_Quote_Item::getStore怎么用?PHP Mage_Sales_Model_Quote_Item::getStore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Quote_Item
的用法示例。
在下文中一共展示了Mage_Sales_Model_Quote_Item::getStore方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _filterQuoteItem
/**
* @param Mage_Sales_Model_Quote_Item $item
* @param int $index
*
* @return Bronto_Common_Model_Email_Template_Filter
*/
protected function _filterQuoteItem($item, $index = null)
{
if ($item->getParentItem()) {
return $this;
}
if (Mage::helper('bronto_common')->displayPriceIncTax($item->getStore())) {
$checkout = Mage::helper('checkout');
$this->setField("productPrice_{$index}", $this->formatPrice($checkout->getPriceInclTax($item)));
$this->setField("productTotal_{$index}", $this->formatPrice($checkout->getSubtotalInclTax($item)));
} else {
$this->setField("productPrice_{$index}", $this->formatPrice($item->getPrice()));
$this->setField("productTotal_{$index}", $this->formatPrice($item->getRowTotal()));
}
$this->setField("productName_{$index}", $item->getName());
$this->setField("productSku_{$index}", $item->getSku());
$this->setField("productQty_{$index}", $item->getQty());
$this->setField("productUrl_{$index}", $this->_getQuoteItemUrl($item));
/* @var $product Mage_Catalog_Model_Product */
$product = $item->getProduct();
if (!$product) {
$product = Mage::helper('bronto_common/product')->getProduct($item->getProductId(), $this->getStoreId());
}
$this->_filterProduct($product, $index);
return $this;
}
示例2: checkProductmaxAmount
/**
* Check max amount after adding product to cart
*
* @param Mage_Sales_Model_Quote_Item $quoteItem
*/
public function checkProductmaxAmount($quoteItem)
{
$quoteStore = $quoteItem->getStore();
if ($this->isProductEnable($quoteStore)) {
$maxAmount = $this->getCartMaxAmount($quoteStore);
/* @var $quote Mage_Sales_Model_Quote */
$quote = $quoteItem->getQuote();
$grandTotal = $quote->getGrandTotal();
$_product = Mage::getModel('catalog/product')->load($quoteItem->getProduct()->getId());
$grandTotal += $_product->getFinalPrice($quoteItem->getQty());
if ($grandTotal > $maxAmount) {
$formater = new Varien_Filter_Template();
$formater->setVariables(array('amount' => Mage::helper('core')->currency($maxAmount, true, false)));
$format = $this->getProductMessage($quoteStore);
// throw exception for "remove" product to cart
Mage::throwException($formater->filter($format));
}
}
}