Magento Paypal express review remove terms and conditions

When you’ve placed an order in Magento using Paypal express checkout you are taken to /paypal/express/review/ if you’ve read my previous posts you will see my method of removing this step. If you remove the step as I suggested but have terms and conditions that you have to agree too, you will still be taken to that page , to avoid this go to:

/app/code/core/Mage/Paypal/Controller/Express/Abstract.php

Search for :

public function placeOrderAction()
{
try {
$requiredAgreements = Mage::helper(‘checkout’)->getRequiredAgreementIds();
if ($requiredAgreements) {
$postedAgreements = array_keys($this->getRequest()->getPost(‘agreement’, array()));
if (array_diff($requiredAgreements, $postedAgreements)) {
Mage::throwException(Mage::helper(‘paypal’)->__(‘Please agree to all the terms and conditions before placing the order.’));
}
}

 

Comment out the following lines with a simple // at the beginning :

//if (array_diff($requiredAgreements, $postedAgreements)) {
// Mage::throwException(Mage::helper(‘paypal’)->__(‘Please agree to all the terms and conditions before placing the order.’));
// }

Join the Conversation

5 Comments

  1. Hi,

    Thanks lot for the great tutorial.it worked with Magento ver. 1.9.0.0 and it saved my day.great work.

    Thanks
    Duminda

  2. Hi, i look for /app/code/core/Mage/Paypal/Controller/Express/Abstract.php in my magento 1.9.2.2 bat in this magento version not exist this directory and this file. How can i do ?

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.