0
votes

How to add the billing fax No. to custom column to magento customer grid ? Magento 1.8. CE

I´ve found this file with following solution, but it doesn´t help!

/pages/c9/43/d0009101/home/htdocs/development-environment-trend-mb/trendmb-de/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php

Adding This Line 55

->joinAttribute('billing_fax', 'customer_address/telephone', 'default_billing', null, 'left')

And Adding This Line 60

    $this->addColumn('Fax', array(
        'header'    => Mage::helper('customer')->__('Fax'),
        'width'     => '100',
        'index'     => 'billing_fax'
    ));

Fax Column will display, but without any fax No.

Could anyone help me?

1

1 Answers

0
votes

Your code is displaying telephone number instead of fax. Just change:

->joinAttribute('billing_fax', 'customer_address/telephone', 'default_billing', null, 'left')

to

->joinAttribute('billing_fax', 'customer_address/fax', 'default_billing', null, 'left')

And ensure that Fax field is not empty for customer default billing address.

(I will also suggest moving call to addColumn to the body of _prepareColumns() method, f.e. right after adding column for Telephone number)