I want to include my custom HTML block in One Page Checkout.

The block will display some additional details about the payment methods and it will be showed under Payment Information tab. Just like info.phtml, I want to include my phtml file too.

In my mymodule.xml, I've tried including like below but no luck.

        <reference name="checkout.onepage.payment">
            <block type="core/template" name="customer_mymodule_checkout" as="mymodule_checkout" after="methods" template="mymodule/checkout/onepage/payment/mymodule.phtml" />

How can I achieve this ?



You need to add the block in the layout AND get it's content in the .phtml file using code

echo $this->getChildHtml('yourblock')

It's confusing, because magento has several types of blocks.

One is list type, like 'content' and it just outputs all children blocks.

And one is 'template', it outputs it's phtml template and requires from us to define a place in this template where we want to see the inner blocks.

  • I want to call my .phtml file just like methods.phtml. This will show my custom HTMl data. I am using core/template and calling using getChildHtml() method, but its not showing up.
    – Jordan
    Aug 11 '14 at 7:03

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.