1

I want display Terms and Conditions in file payments.phtml, how i can do better?

when i try add <?php echo $this->getChildHtml('agreements') ?> in payments.phtml - not working and block Terms and Conditions not display. Where wrong?

Thanks

Sergey
  • 251
  • 1
  • 4
  • 13

1 Answers1

1

Hi As it called in review step using code:

     <block type="checkout/agreements" name="checkout.onepage.agreements"
 as="paymentagreements" template="checkout/onepage/agreements.phtml"/>

and it called in side under checkout_onepage_review handler.

So need called in checkout_onepage_paymentmethod handler at checkout payment method.

please add this code at checkout.xml

 <checkout_onepage_paymentmethod>
    <remove name="right"/>
    <remove name="left"/>
    <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
<!-- add here -->
    <block type="checkout/agreements" name="checkout.payment.agreements" as="payment" template="checkout/onepage/agreements.phtml"/>

        <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
        <block type="core/template" name="checkout.onepage.payment.methods.scripts" as="scripts" />
        <block type="core/template" name="checkout.onepage.payment.methods.additional" as="additional" />
    </block>
</checkout_onepage_paymentmethod>

add add <?php echo $this->getChildHtml('paymentagreements') ?> to payment.phtml

Amit Bera
  • 77,456
  • 20
  • 123
  • 237