How to Format price in Magento?

There are a couple of methods to format price in Magento. The easiest and most used is:

For Example:

Sometimes you don’t need currency symbols in your prices, then you will need something like:

The value for the display can be:

  • Zend_Currency::NO_SYMBOL : It will remove the symbol and show only the price.
  • Zend_Currency::USE_SYMBOL : Shows the currency symbol before the price.
  • Zend_Currency::USE_SHORTNAME : Shows the abbreviation of the currency before the price.
  • Zend_Currency::USE_NAME : shows the full name of the currency before the price.

Example outputs:

Leave a Reply

Your email address will not be published. Required fields are marked *