Magento Snippet: Admin grid currency type with currency symbol

October 6, 2015

Image for Magento Snippet: Admin grid currency type with currency symbol from unsplash.com

Here's a snippet for using a currency column type with the currency symbol prefix in Magento admin grids:

        $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();

        $this->addColumnAfter('total_revenue', array(
            'header'    => 'Total Revenue',
            'type'      => 'currency',
            'currency_code'  => $currencyCode,
            'filter'    => false,
            'index'     => 'total_revenue',

        ), 'total_num_orders');