I need to add some complex information to 'one page checkout', in billing.phtml. As it requires a lot of php code I need to put it in a separate phtml file. How do I insert this file after billing form(address details)?
I've tried putting this code into custom .xml layout file:
<layout version="0.1.0">
<checkout_onepage_index translate="label">
<reference name="checkout.onepage">
<block type="core/template" name="checkout.onepage.dealer" after="checkout.onepage.billing" template="checkoutfields/search.phtml" as="checkout_dealer_search" />
</reference>
</checkout_onepage_index>
</layout>
and then calling this in username/persistent/checkout/onepage/billing.phtml (the one that was being used):
echo $this->getChildHtml('checkout_dealer_search');
but nothing was added under address details form. My search.phtml contains a test string.
Update
When I change reference in checkoutfields.xml to
<reference name="checkout.onepage.billing">
it doesn't work but when I paste my block into base layout file persistence.xml in
<checkout_onepage_index>
<reference name="checkout.onepage.billing">
it works. I have a feeling that I am missing something simple. Do I have to register this custom xml file somehow(it's not a part of a module)?