I have a template in template/checkout/onepage/hello.phtml
I want to include this phtml file in the success page, i.e template/checkout/success.phtml
So I have created a block in the checkout.xml inside the "checkout_onepage_success" handle as:
<checkout_onepage_success translate="label">
<label>One Page Checkout Success</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block type="core/template" name="onepagehello" template="checkout/onepage/hello.phtml"/>
<block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
</reference>
</checkout_onepage_success>
And this phtml file gets rendered in the success page on the top of the page.
When I write getChildHtml(onepagehello);
in success.phtml
page, then nothing comes.
- I want to know when
getChildHtml()
works and when the block gets rendered ? - I want to get "hello.phtml" from
getChildHtml()
, so that I can put this block wherever necessary throughout the page.