[magento]\app\code\core\Mage\Checkout\Helper\Data.php
добавить ниже функции
public function customformatPrice($price)
{
return $this->getQuote()->getStore()->customformatPrice($price);
}
добавить ниже функции в [Magento] \ приложение \ код \ ядро \ Mage \ Ядро \ Модель \ Store.php
public function customformatPrice($price, $includeContainer = true)
{
if ($this->getCurrentCurrency()) {
//sets the floating point precision to 3 points
return $this->getCurrentCurrency()->format($price, array('precision'=>3), $includeContainer);
}
return $price;
}
вы можете использовать выше, например
//magento default call
echo Mage::helper('checkout')->formatPrice(3000.1231);//Rs3,000.12
echo "<br>";
//customized function call
echo Mage::helper('checkout')->customformatPrice(3000.12313);//Rs3,000.123
на самом деле вы можете направить изменения formatPrice() в [Magento] \ приложение \ код \ ядро \ Mage \ Ядро \ Model \ Store.php, но, как вы хотите, как формат мы создаем пользовательскую функцию
надежда это полезно для вас
. Спасибо, уважаю, verry. Thats it;) – Tonysday
Я очень не рекомендую людям менять основные файлы, это плохая практика, а затем не позволяет вам модернизировать Magento! –