Public Member Functions | |
getTierPrices ($product=null) |
Definition at line 35 of file View.php.
getTierPrices | ( | $ | product = null |
) |
Get tier prices (formatted)
Mage_Catalog_Model_Product | $product |
Reimplemented from Mage_Catalog_Block_Product_Abstract.
Definition at line 43 of file View.php.
00044 { 00045 if (is_null($product)) { 00046 $product = $this->getProduct(); 00047 } 00048 $prices = $product->getFormatedTierPrice(); 00049 00050 $res = array(); 00051 if (is_array($prices)) { 00052 foreach ($prices as $price) { 00053 $price['price_qty'] = $price['price_qty']*1; 00054 $price['savePercent'] = ceil(100 - $price['price'] ); 00055 $price['formated_price'] = Mage::app()->getStore()->formatPrice(Mage::app()->getStore()->convertPrice(Mage::helper('tax')->getPrice($product, $price['website_price']))); 00056 $price['formated_price_incl_tax'] = Mage::app()->getStore()->formatPrice(Mage::app()->getStore()->convertPrice(Mage::helper('tax')->getPrice($product, $price['website_price'], true))); 00057 $res[] = $price; 00058 } 00059 } 00060 00061 return $res; 00062 }