0

I am using magento 1.9 version. I am having custom order collection in Block and also i can get it in related phtml file too.

But i need the collection data in controller to export CSV.

I tried by setting collection in session and registry. No luck.

How to get it.

2

I Got it using this code

$this->getLayout()->getBlockSingleton('mymodule/block_name')->getCollection()->getData()

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.