in the app/design/frontend/base/default/template/payment/form/cc.phtml template, around line 76, there is a spot to echo out child html. how do I reference that block to add a child into it?
I'm trying to add a section in my layout class, but it doesn't appear to be working correctly.
<?xml version="1.0"?>
<layout version="0.1.0">
<checkout_onepage_index>
<reference name="payment.method.authorizenet">
<block type="abt_authnet/foo_bar_baz" name="foobar" as="foobar" template="abt/foobar.phtml" />
</reference>
</checkout_onepage_index>
</layout>
Am I doing this wrong? my feeling is I'm referencing the wrong block?
-
What payment method are you using? Authorize.net or Saved CC?jharrison.au– jharrison.au2013年04月01日 22:55:00 +00:00Commented Apr 1, 2013 at 22:55
-
@jharrison.au, I'm using authorize.netveilig– veilig2013年04月01日 23:00:51 +00:00Commented Apr 1, 2013 at 23:00
1 Answer 1
I have no experience with authorize.net but when I see this correctly, the template payment/form/cc.phtml is from Mage_Payment and therefore not from Authorize.net
But both templates from Authorize.net
authorizenet/directpost/form.phtmlauthorizenet/directpost/iframe.phtml
has a <?php echo $_form->getChildHtml() ?> somewhere in the code, where you can echo any content.
But obviosuly this is in the review step:
<checkout_onepage_review>
<reference name="checkout.onepage.review.info.items.after">
<block type="directpost/form" name="payment.form.directpost" template="authorizenet/directpost/form.phtml">
<action method="setMethodInfo"></action>
</block>
</reference>
</checkout_onepage_review>
So you can reference the form block:
<?xml version="1.0"?>
<layout version="0.1.0">
<checkout_onepage_review>
<reference name="payment.form.directpost">
<block type="abt_authnet/foo_bar_baz" name="foobar" as="foobar" template="abt/foobar.phtml" />
</reference>
</checkout_onepage_review>
</layout>
Where is the payment.method.authorizenet from? Just a guess?
-
seems like
payment.method.authorizenetis fromMage_Checkout_Block_Onepage_Payment_Methods->getPaymentMethodFormHtml, not really remember though. the block is created inMage_Payment_Block_Form_Container->_prepareLayoutivantedja– ivantedja2013年07月06日 02:59:31 +00:00Commented Jul 6, 2013 at 2:59