2

I have a grid in my module that shows a few columns, one is "price". But it shows the price like this "00.0000", how can I make it show "00,00"? I don't believe I need to post any part of my code for this, do I? If so, tell me what.

3

Declare your column like this:

$store = Mage::app()->getStore();
$this->addColumn('column_id_here', array(
    'header' => Mage::helper('module_alias_here')->__('label here'),
    'index' => 'column_name_here',
    'type'  => 'price',
    'currency_code' => $store->getBaseCurrency()->getCode(),
));
1
$this->addColumn('order_amount', array(
  'header'    => Mage::helper('manoreport')->__('Order Amount'),
  'width'     => '100px',
  'type'      => 'price',
  'index'     => 'subtotal_invoiced',
  'currency_code' => 'CURRENCY CODE HERE' 
));

Please try this.

'type'      => 'price',

OR You can create custom renderer follow below link: https://makandracards.com/magento1/35007-grid-column-options

  • That link is gonna be very useful to me in the future. But since your answer and Marius are basically the same, I'm gonna accept his answer because he send it first. Thank you very much! – Stordon Aug 25 '17 at 13:10

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.