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());
Marius
  • 197,939
  • 53
  • 422
  • 830
user2830891
  • 123
  • 11

1 Answers1

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);
Tai
  • 439
  • 2
  • 4