I want to add some custom information below the payment method list in the "Payment Information" tab.
I have noticed the following method call in app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml:
<?php echo $this->getChildChildHtml('additional'); ?>
This would be perfect for me as it would allow me to add my custom block without modifying any templates.
However, looking at the XML layout for that specific template, I see no reference to that additional block (app/design/frontend/base/default/layout/checkout.xml):
<checkout_onepage_index translate="label"> ... <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml"> <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action> </block> ... </checkout_onepage_index>
Since the method call in the methods.phtml template file uses the getChildChildHtml (and not getChildHtml) method, I can't simply add a block with the name additional to my custom XML layout. Instead I have to do this:
<checkout_onepage_index translate="label"> <reference name="checkout.payment.methods"> <block type="core/text_list" name="checkout.payment.methods.additional" as="additional" translate="label"> <block type="cms/block" name="my.custom.block" as="custom"><action method="setBlockId"><block_id>test</block_id></action></block> </block> </reference> </checkout_onepage_index>
This works, because I have created a text list block with the name additional and have added my custom block as a child to that block.
But now I feel like this is not the perfect solution. If another XML layout had to use that additional block, my definition would get overwritten, right?