I am trying to update order summary block on payment method change but it display

Fatal error: Call to a member function toHtml() on boolean in C:\xampp\htdocs\young\app\code\local\Mage\Checkout\controllers\OnepageController.php on line 172

170 protected function _getReviewHtml()
171 {
172    return $this->getLayout()->getBlock('root')->toHtml();
173 }

public function orderupdateAction()
    if ($this->_expireAjax()) {
    $result['goto_section'] = 'review';
    $result['update_section'] = array(
        'name' => 'review',
        'html' => $this->_getReviewHtml()

1 Answer 1


This will be an issue with the layout.xml and your custom controller action.

Magento cannot find the root block for your action and fatals when trying to call toHtml on it.

Adding the following to create an empty root block into your checkout.xml layout should allow you to not fatal.

    <block name="root" type="core/template"/>

(Obviously if you want _getReviewHtml to return something viable you will have to pop a valid block in the layout definition, as currently it will just return nothing)

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.