0

If you install Magento and add Products and want to add a Price Slider you see The Price looks like that 0.2000 to 200.0000 on the left navigation bar. But in Europe you need only 2 digits after the decimal point so it should look like 0.20 to 200.00 how can I change that?

2

look at

https://stackoverflow.com/questions/6730180/format-price-in-the-current-locale-and-currency

you can use the same function in your slider template.

Example:

Mage::helper('core')->currency($yourPrice, true, false);
0
0

You could also do the sneaky way via PHP's number_format, i.e

echo "€ " . number_format($value, 2, ".", ",");

0

Or just to make code bit more advanced, you can make your currency dynamic:

Try something like this:

$currency_symbol = Mage::app()->getLocale()->currency( $currency_code )->getSymbol();
$priceFormatted = number_format($product->getPrice(), '2', '.', ',');
echo $currency_symbol.$priceFormatted;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.