0

because of skipping the Review Page for Paypal Express I want to move the Tems and Conditions to the Payment Information as the customer should accept them after selecting Paypal Express (only available payment method) in the Onepage Checkout process.

I managed everything using this Answers
Terms and condition on checkout page except making the checkbox mandatory.

As far I understood there needs to be a modification in the

..\app\code\local\Mage\Checkout\controllers\OnepageController.php

The check

    if ($requiredAgreements = Mage::helper('checkout')->getRequiredAgreementIds()) {
        $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array()));
        if ($diff = array_diff($requiredAgreements, $postedAgreements)) {
            $result['success'] = false;
            $result['error'] = true;
            $result['error_messages'] = $this->__('Please agree to all the terms and conditions before placing the order.');
            $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
            return;
        }
    }

has to be moved from saveOrderAction() to savePaymentAction()

savePaymentAction() has another structure ... if anybody managed this some help would be appreciated.

Thanks,

Kozure

1

Found the following solution.

The terms and condition was moved to the 1. Step "Billing Information".

/app/design/frontend/default//layout/checkout.xml

add after line 323:

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

add after line 339:

<reference name="head">
   <action method="addItem"><type>skin_js</type><name>js/checkout/review.js</name></action>
</reference>

comment out line 417:

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

The result is as followed, the check box is mandatory.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.