0

I am passing data from magento controller to view but my theme is not showing the content in the view is displayed in a white page here is my code

$block = $this->getLayout()->createBlock('core/template')
->setData('products_notavailable',$Not_available_products)
->setData('products_available',$available_products)
->setData('quantity',$submit_qty)
->setTemplate('availableorders/display.phtml');
$this->renderLayout();
$this->getResponse()->setBody($block->toHtml());
1

you need to insert the block, I assume you want to insert to content.

add this before render

$this->getLayout()->getBlock('content')->insert($block);

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.