00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Bundle_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
00036 {
00037
00038
00039
00040
00041
00042
00043 public function getTierPrices($product = null)
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 }
00063 }