How can I move the terms and conditions from the last checkout step to th开发者_StackOverflow中文版e first one ?
I have tried only with the xml files, but I can't continue to the next step in this case.
Please help to do that.
In checkout.xml
, move
<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
from <checkout_onepage_review>
handle into <checkout_onepage_index>
:
You have to modify
<block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
into
<block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"></block>
and put the line inside.
In info.phtml
(or review.phtml for v1.4.2) cut
<?php echo $this->getChildHtml('agreements') ?>
and paste that line you've just cut into billing.phtml
.
Long time done this post but those that are still in need:
To add to that contributed from @OSdave - as @Bizboss is saying the terms and conditions checkbox doesn't have to be checked to proceed to the next step. To provide a front end solution with least fuss just add required-entry
to the class name - e.g.
<input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->htmlEscape($_a->getCheckboxText()) ?>" class="checkbox required-entry" />
This employs JS validation to prevent it from proceeding to the next stage without being checked.
精彩评论