/** * Get shipping rate code title and its price or error message * * @param Varien_Object $rate * @param string $format * @param string $inclTaxFormat * @return string */ public function renderShippingRateOption($rate, $format = '%s - %s%s', $inclTaxFormat = ' (%s %s)') { $renderedInclTax = ''; if ($rate->getErrorMessage()) { $price = $rate->getErrorMessage(); } else { $price = $this->_getShippingPrice($rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); $incl = $this->_getShippingPrice($rate->getPrice(), true); if ($incl != $price && $this->helper('tax')->displayShippingBothPrices()) { $renderedInclTax = sprintf($inclTaxFormat, Mage::helper('tax')->__('Incl. Tax'), $incl); } } return sprintf($format, $this->escapeHtml($rate->getMethodTitle()), $price, $renderedInclTax); }