0

I have idea we can get including customer address from data flow profiles export customers.

but client requirement is getting customer information including shipping address from customer grid.

Note: i dont want shipping address columns in grid.but i want columns only in csv.

can you give some over all idea to start this task?

1

You have to extend/rewrite the Mage_Adminhtml_CustomerController class.

public function exportCsvAction()
    {
        $fileName   = 'customers.csv';
        $content    = $this->getLayout()->createBlock('adminhtml/customer_grid')
            ->getCsvFile();

        $this->_prepareDownloadResponse($fileName, $content);
    }

With you own action:

public function exportCsvAction() // Modified version
    {
        $fileName   = 'customers.csv';
        $content    = $this->getLayout()->createBlock('adminhtml/customer_modified_grid') // call to a new block class.
            ->getCsvFile();

        $this->_prepareDownloadResponse($fileName, $content);
    }

The extend the Mage_Adminhtml_Block_Customer_Grid with your own :

and the in the protected function _prepareColumns() you can put the csv columns!

| improve this answer | |

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.