Public Member Functions | |
getProduct () | |
getDisplayMinimalPrice () | |
setIdSuffix ($idSuffix) | |
getIdSuffix () | |
getTierPrices ($product=null) | |
Protected Attributes | |
$_priceDisplayType = null | |
$_idSuffix = '' |
Definition at line 34 of file Price.php.
getDisplayMinimalPrice | ( | ) |
getIdSuffix | ( | ) |
getProduct | ( | ) |
Reimplemented in Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option.
Definition at line 39 of file Price.php.
00040 { 00041 $product = $this->_getData('product'); 00042 if (!$product) { 00043 $product = Mage::registry('product'); 00044 } 00045 return $product; 00046 }
getTierPrices | ( | $ | product = null |
) |
Get tier prices (formatted)
Mage_Catalog_Model_Product | $product |
Definition at line 70 of file Price.php.
00071 { 00072 if (is_null($product)) { 00073 $product = $this->getProduct(); 00074 } 00075 $prices = $product->getFormatedTierPrice(); 00076 00077 $res = array(); 00078 if (is_array($prices)) { 00079 foreach ($prices as $price) { 00080 $price['price_qty'] = $price['price_qty']*1; 00081 00082 if ($product->getPrice() != $product->getFinalPrice()) { 00083 $productPrice = $product->getFinalPrice(); 00084 } else { 00085 $productPrice = $product->getPrice(); 00086 } 00087 00088 if ($price['price']<$productPrice) { 00089 $price['savePercent'] = ceil(100 - (( 100/$productPrice ) * $price['price'] )); 00090 $price['formated_price'] = Mage::app()->getStore()->formatPrice(Mage::app()->getStore()->convertPrice(Mage::helper('tax')->getPrice($product, $price['website_price']))); 00091 $price['formated_price_incl_tax'] = Mage::app()->getStore()->formatPrice(Mage::app()->getStore()->convertPrice(Mage::helper('tax')->getPrice($product, $price['website_price'], true))); 00092 00093 $res[] = $price; 00094 } 00095 } 00096 } 00097 00098 return $res; 00099 }
setIdSuffix | ( | $ | idSuffix | ) |