1

i have created a custom module called Custom_AvailableOrders in which customers can add multiple items to cart, For this i had created a form for the customers to enter multiple products and when this form is submited its values is posted to indexcontroller.php and then i am filtering this products based on their stockavailablity and displaying them in display.phtml file as a new table.

$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 Answer 1

2

I think, you have to call $this->getLayout()->loadLayout() to load the update handles which add the CSS files.

$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->getLayout()->setBlock('root', $block);
$this->renderLayout(); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.