Magento:轻松删除“paypal / express / review”步骤

时间:2021-12-09 15:30:05

When ordering using paypal in magento, it takes you to paypal, paypal already displays a confirmation, you confirm, you get redirected to another confirmation page (/paypal/express/review), it is an extra step that is unnecessary for user experience, I would like to remove it and make the order automatically placed when user confirm on paypal page, once leave paypal if order successful the customer should see the success page.

当使用paypal在magento中订购时,它会将您带到paypal,paypal已经显示确认,您确认,您将被重定向到另一个确认页面(/ paypal / express / review),这是一个额外的步骤,对于用户体验来说是不必要的,我想删除它并在用户在paypal页面上确认时自动下订单,一旦离开paypal,如果订单成功,客户应该看到成功页面。

is there any easy solution to this I might have overlooked or at least if you can point me to the right direction to remove that step.

有没有任何简单的解决方案,我可能忽略了,或者至少如果你能指出我正确的方向去除那一步。

8 个解决方案

#1


9  

don't use paypal express and use paypal standard if you don't need this feature. paypal express is a checkout method and not a payment method

如果您不需要此功能,请不要使用paypal express并使用paypal标准。 paypal express是一种结账方式,而不是付款方式

edit: this is now configurable in 1.9, still retarded but doable.

编辑:现在可配置为1.9,仍然是延迟但可行的。

#2


12  

Actually, Express Checkout can handle this no problem, and I would personally recommend sticking with it.

实际上,Express Checkout可以解决这个问题,我个人建议坚持下去。

After the SetExpressCheckout request you redirect the user over to PayPal. You can append useraction=commit to this URL in order to trigger the confirmation from PayPal pages.

在SetExpressCheckout请求之后,您将用户重定向到PayPal。您可以将useraction = commit附加到此URL,以便从PayPal页面触发确认。

This causes the "Continue" button on PayPal to switch to a "Pay" button and informs the user that this is their final confirmation...clicking Pay will submit the payment.

这会导致PayPal上的“继续”按钮切换到“付款”按钮,并通知用户这是他们的最终确认...点击付款将提交付款。

You still have to call DoExpressCheckoutPayment on your server to complete the process, but GetExpressCheckoutDetails is optional at this point. When using useraction=commit you'll get the PayerID back as a URL parameter in your ReturnURL so you don't have to call GECD if you don't want/need to.

您仍然需要在服务器上调用DoExpressCheckoutPayment来完成此过程,但此时GetExpressCheckoutDetails是可选的。当使用useraction = commit时,您将在ReturnURL中将PayerID作为URL参数返回,因此如果您不需要/不需要,则不必调用GECD。

You can take this all a setup farther and use the callback API (also known as instant update API) to feed shipping and sales tax information to the PayPal review page. This allows you to populate the drop down values on PayPal's review page with your own shipping data based on the user's shipping address selected on the PayPal review page.

您可以将此设置更进一步,并使用回调API(也称为即时更新API)将运费和销售税信息提供给PayPal审核页面。这允许您根据在PayPal评论页面上选择的用户送货地址,使用您自己的送货数据填充PayPal评论页面上的下拉值。

The introduction of those features was to do exactly what you specified...eliminate the additional review process.

这些功能的引入完全符合您的要求......消除了额外的审核流程。

All of that said, if the Magento module for Express Checkout doesn't provide options for all of this you'll need to extend it and build them in yourself. I'm pretty it does, though.

所有这些都说,如果Express Checkout的Magento模块没有为所有这些提供选项,你需要扩展它并自己构建它们。不过,我很喜欢它。

#3


11  

Actually all the solutions mentioned here required to edit the Magento core. This is known as bad practise and does not keep your shop updateable.

实际上,这里提到的所有解决方案都需要编辑Magento核心。这被称为不良做法,并不会让您的商店更新。

What you need to do for a clean solution:

您需要为清洁解决方案做些什么:

  1. Create a module (in my exampe: Avoe_Paypal) to include the changes
  2. 创建一个模块(在我的例子中:Avoe_Paypal)以包含更改

  3. Rewrite Paypal Config
  4. 重写Paypal配置

  5. Redirect on paypal express review step which is http://yourdomain.com/paypal/express/review/
  6. 重定向paypal快速审核步骤http://yourdomain.com/paypal/express/review/

1) Create your module

1)创建您的模块

Avoe/Paypal/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Avoe_Paypal>
            <version>0.1.0</version>
        </Avoe_Paypal>
    </modules>

    <global>
        <models>
            <Avoe_Paypal>
                <class>Avoe_Paypal_Model</class>
            </Avoe_Paypal>
            <paypal>
                <rewrite>
                    <config>Avoe_Paypal_Model_Config</config>
                </rewrite>
            </paypal>
        </models>
        <events>
            <controller_action_predispatch_paypal_express_review>
                <observers>
                    <avoe_paypal_predispatch>
                        <type>singleton</type>
                        <class>Avoe_Paypal_Model_Observer</class>
                        <method>paypalExpressReturnPredispatch</method>
                    </avoe_paypal_predispatch>
                </observers>
            </controller_action_predispatch_paypal_express_review>
        </events>
    </global>
</config>

app/etc/Avoe_Paypal.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Avoe_Paypal>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Paypal />
            </depends>
        </Avoe_Paypal>
    </modules>
</config>

2) Rewrite config, add useraction 'commit':

2)重写配置,添加useraction'commit':

<?php
class Avoe_Paypal_Model_Config extends Mage_Paypal_Model_Config {

    /**
     * Get url for dispatching customer to express checkout start
     * Added useraction 'commit' to remove PayPal Express Checkout review page
     *
     * @param string $token
     * @return string
     */
    public function getExpressCheckoutStartUrl($token)
    {
        return $this->getPaypalUrl(array(
            'cmd'   => '_express-checkout',
            'useraction' => 'commit',
            'token' => $token,
        ));
    }
}

3) Create observer to redirect:

3)创建观察者重定向:

<?php

class Avoe_Paypal_Model_Observer {

    function paypalExpressReturnPredispatch($observer) {
        Mage::app()->getResponse()->setRedirect(Mage::getUrl('*/*/placeOrder'));
    }
}

There is also a small Magento extension which was just released yesterday, to remove the review step:

昨天刚刚发布了一个小的Magento扩展,用于删除审核步骤:

https://github.com/tim-bezhashvyly/Sandfox_RemovePaypalExpressReviewStep

#4


9  

So the right deal there, that works perfectly (for me ) is a sum up from the above :

那么合适的交易,对我来说是完美的(对我来说)是上面的总结:

1. Go to: \app\code\core\Mage\Paypal\Controller\Express\Abstract.php

1.转到:\ app \ code \ core \ Mage \ Paypal \ Controller \ Express \ Abstract.php

and search in returnAction() for:

并在returnAction()中搜索:

$this->_redirect('*/*/review'); 

There you have to change:

你需要改变:

$this->_redirect('*/*/review');

to:

$this->_redirect('*/*/placeOrder');

2. Go to: \app\code\core\Mage\Paypal\Model\Config.php and change the:

2.转到:\ app \ code \ core \ Mage \ Paypal \ Model \ Config.php并更改:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'token' => $token,
    ));
}

to:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'useraction' => 'commit',
        'token' => $token,
    ));
}

With the 2 changes above, i figure out how to Skip Review Page in Magento Paypal Express Checkout.

通过以上2个更改,我弄清楚如何在Magento Paypal Express Checkout中跳过评论页面。

#5


7  

Andrew Angel's answer really doesn't avoid the comfirmation page, it just changes button value to "Pay" rather to "Confirm", or something like that.

安德鲁·安吉尔的回答确实没有避开确认页面,它只是将按钮值更改为“支付”而不是“确认”,或类似的东西。

Anyway the correct way to do that is going to \app\code\core\Mage\Paypal\Model\Config.php, to getExpressCheckoutEditUrl($token) method and change

无论如何,正确的方法是去\ app \ code \ core \ Mage \ Paypal \ Model \ Config.php,到getExpressCheckoutEditUrl($ token)方法并更改

'useraction' => 'continue',

to

'useraction' => 'commit’.

To aviod confirmation user page in Paypal Express you only need to change one line in on controller action. Go to Mage/Paypal/Controller/Express/Abstract.php and search for $this->_redirect('*/*/review'); in returnAction(). There you have to change

要在Paypal Express中避免确认用户页面,您只需要在控制器操作中更改一行。转到Mage / Paypal / Controller / Express / Abstract.php并搜索$ this - > _ redirect('* / * / review');在returnAction()中。你需要改变

$this->_redirect('\*/\*/review');

to

$this->_redirect('\*/\*/placeOrder');

That way when paypal returns to return action you avoid to show entire review page and payment was automatically confirmed. So, Paypal redirects again to success pages the same way like PayPal Standard method.

这样,当paypal返回返回操作时,您将避免显示整个评论页面并自动确认付款。因此,Paypal以与PayPal标准方法相同的方式再次重定向到成功页面。

#6


4  

@Toni The redirect url part works excellent, thanks! However changing the 'continue' to 'commit' did not change the buttons on PayPal's website. However, I was able to fix it by doing the following: Right above the getExpressCheckoutEditUrl function where Toni instructed to change the continue to commit, there is the funciton getExpressCheckoutStartUrl. If you add the useraction variable there, it will work. Original function:

@Toni重定向网址部分非常好,谢谢!但是,将“继续”更改为“提交”并未更改PayPal网站上的按钮。但是,我能够通过执行以下操作来修复它:在getExpressCheckoutEditUrl函数正上方,Toni指示将更改继续提交,有funciton getExpressCheckoutStartUrl。如果在那里添加useraction变量,它将起作用。原功能:

public function getExpressCheckoutStartUrl($token)
{
'return $this->getPaypalUrl(array(
'cmd'   => '_express-checkout',
'token' => $token,
));
}

New function:

public function getExpressCheckoutStartUrl($token)
{
'return $this->getPaypalUrl(array(
'cmd'   => '_express-checkout',
'useraction' => 'commit',
'token' => $token,
));
}

Notice the 'useraction' => 'commit', was added at the new function. This should work!

请注意,在新功能中添加了'useraction'=>'commit'。这应该工作!

#7


2  

THere was one step missing let me summarize the entire process again.

这是缺少一步让我再次总结整个过程。

1. Go to: \app\code\core\Mage\Paypal\Controller\Express\Abstract.php

1.转到:\ app \ code \ core \ Mage \ Paypal \ Controller \ Express \ Abstract.php

and search in returnAction() for:

并在returnAction()中搜索:

$this->_redirect('*/*/review'); 

There you have to change:

你需要改变:

$this->_redirect('*/*/review');

to:

$this->_redirect('*/*/placeOrder');

2. Go to: \app\code\core\Mage\Paypal\Model\Config.php and change the:

2.转到:\ app \ code \ core \ Mage \ Paypal \ Model \ Config.php并更改:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'token' => $token,
    ));
}

to:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'useraction' => 'commit',
        'token' => $token,
    ));
}

3. With the above two changes you will still be taken to the review page and have to agree to the terms and conditions, to avoid this go to:

3.通过以上两项更改,您仍将被带到审核页面并且必须同意条款和条件,以避免这种情况发生:

/app/code/core/Mage/Paypal/Controller/Express/Abstract.php Search for :

/app/code/core/Mage/Paypal/Controller/Express/Abstract.php搜索:

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.’));
// }

The only time you will every be take to the review page is if the customers paypal returns a declined error.

每次访问评论页面的唯一时间是客户paypal返回拒绝错误。

#8


1  

Magento 1.9 has built-in support for this, the Skip Order Review Step option, but it has a subtle caveat. The feature doesn't work with the 'Shortcut' buttons you can display on the product detail and cart pages.

Magento 1.9内置了对Skip Order Review Step选项的支持,但它有一个微妙的警告。该功能不适用于您可以在产品详细信息和购物车页面上显示的“快捷方式”按钮。

My suggestion, disable the shortcut buttons and enable the Skip Order Review Step option. For extra credit you can rearrange the Onepage Checkout flow so that customers won't have to enter billing information twice (once on Magento and again on PayPal).

我的建议是,禁用快捷按钮并启用“跳过订单查看步骤”选项。如需额外信用,您可以重新安排Onepage Checkout流程,以便客户无需输入两次结算信息(一次在Magento上,另一次在PayPal上)。

More details available in this blog post.

此博客文章中提供了更多详细信息。

#1


9  

don't use paypal express and use paypal standard if you don't need this feature. paypal express is a checkout method and not a payment method

如果您不需要此功能,请不要使用paypal express并使用paypal标准。 paypal express是一种结账方式,而不是付款方式

edit: this is now configurable in 1.9, still retarded but doable.

编辑:现在可配置为1.9,仍然是延迟但可行的。

#2


12  

Actually, Express Checkout can handle this no problem, and I would personally recommend sticking with it.

实际上,Express Checkout可以解决这个问题,我个人建议坚持下去。

After the SetExpressCheckout request you redirect the user over to PayPal. You can append useraction=commit to this URL in order to trigger the confirmation from PayPal pages.

在SetExpressCheckout请求之后,您将用户重定向到PayPal。您可以将useraction = commit附加到此URL,以便从PayPal页面触发确认。

This causes the "Continue" button on PayPal to switch to a "Pay" button and informs the user that this is their final confirmation...clicking Pay will submit the payment.

这会导致PayPal上的“继续”按钮切换到“付款”按钮,并通知用户这是他们的最终确认...点击付款将提交付款。

You still have to call DoExpressCheckoutPayment on your server to complete the process, but GetExpressCheckoutDetails is optional at this point. When using useraction=commit you'll get the PayerID back as a URL parameter in your ReturnURL so you don't have to call GECD if you don't want/need to.

您仍然需要在服务器上调用DoExpressCheckoutPayment来完成此过程,但此时GetExpressCheckoutDetails是可选的。当使用useraction = commit时,您将在ReturnURL中将PayerID作为URL参数返回,因此如果您不需要/不需要,则不必调用GECD。

You can take this all a setup farther and use the callback API (also known as instant update API) to feed shipping and sales tax information to the PayPal review page. This allows you to populate the drop down values on PayPal's review page with your own shipping data based on the user's shipping address selected on the PayPal review page.

您可以将此设置更进一步,并使用回调API(也称为即时更新API)将运费和销售税信息提供给PayPal审核页面。这允许您根据在PayPal评论页面上选择的用户送货地址,使用您自己的送货数据填充PayPal评论页面上的下拉值。

The introduction of those features was to do exactly what you specified...eliminate the additional review process.

这些功能的引入完全符合您的要求......消除了额外的审核流程。

All of that said, if the Magento module for Express Checkout doesn't provide options for all of this you'll need to extend it and build them in yourself. I'm pretty it does, though.

所有这些都说,如果Express Checkout的Magento模块没有为所有这些提供选项,你需要扩展它并自己构建它们。不过,我很喜欢它。

#3


11  

Actually all the solutions mentioned here required to edit the Magento core. This is known as bad practise and does not keep your shop updateable.

实际上,这里提到的所有解决方案都需要编辑Magento核心。这被称为不良做法,并不会让您的商店更新。

What you need to do for a clean solution:

您需要为清洁解决方案做些什么:

  1. Create a module (in my exampe: Avoe_Paypal) to include the changes
  2. 创建一个模块(在我的例子中:Avoe_Paypal)以包含更改

  3. Rewrite Paypal Config
  4. 重写Paypal配置

  5. Redirect on paypal express review step which is http://yourdomain.com/paypal/express/review/
  6. 重定向paypal快速审核步骤http://yourdomain.com/paypal/express/review/

1) Create your module

1)创建您的模块

Avoe/Paypal/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Avoe_Paypal>
            <version>0.1.0</version>
        </Avoe_Paypal>
    </modules>

    <global>
        <models>
            <Avoe_Paypal>
                <class>Avoe_Paypal_Model</class>
            </Avoe_Paypal>
            <paypal>
                <rewrite>
                    <config>Avoe_Paypal_Model_Config</config>
                </rewrite>
            </paypal>
        </models>
        <events>
            <controller_action_predispatch_paypal_express_review>
                <observers>
                    <avoe_paypal_predispatch>
                        <type>singleton</type>
                        <class>Avoe_Paypal_Model_Observer</class>
                        <method>paypalExpressReturnPredispatch</method>
                    </avoe_paypal_predispatch>
                </observers>
            </controller_action_predispatch_paypal_express_review>
        </events>
    </global>
</config>

app/etc/Avoe_Paypal.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Avoe_Paypal>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Paypal />
            </depends>
        </Avoe_Paypal>
    </modules>
</config>

2) Rewrite config, add useraction 'commit':

2)重写配置,添加useraction'commit':

<?php
class Avoe_Paypal_Model_Config extends Mage_Paypal_Model_Config {

    /**
     * Get url for dispatching customer to express checkout start
     * Added useraction 'commit' to remove PayPal Express Checkout review page
     *
     * @param string $token
     * @return string
     */
    public function getExpressCheckoutStartUrl($token)
    {
        return $this->getPaypalUrl(array(
            'cmd'   => '_express-checkout',
            'useraction' => 'commit',
            'token' => $token,
        ));
    }
}

3) Create observer to redirect:

3)创建观察者重定向:

<?php

class Avoe_Paypal_Model_Observer {

    function paypalExpressReturnPredispatch($observer) {
        Mage::app()->getResponse()->setRedirect(Mage::getUrl('*/*/placeOrder'));
    }
}

There is also a small Magento extension which was just released yesterday, to remove the review step:

昨天刚刚发布了一个小的Magento扩展,用于删除审核步骤:

https://github.com/tim-bezhashvyly/Sandfox_RemovePaypalExpressReviewStep

#4


9  

So the right deal there, that works perfectly (for me ) is a sum up from the above :

那么合适的交易,对我来说是完美的(对我来说)是上面的总结:

1. Go to: \app\code\core\Mage\Paypal\Controller\Express\Abstract.php

1.转到:\ app \ code \ core \ Mage \ Paypal \ Controller \ Express \ Abstract.php

and search in returnAction() for:

并在returnAction()中搜索:

$this->_redirect('*/*/review'); 

There you have to change:

你需要改变:

$this->_redirect('*/*/review');

to:

$this->_redirect('*/*/placeOrder');

2. Go to: \app\code\core\Mage\Paypal\Model\Config.php and change the:

2.转到:\ app \ code \ core \ Mage \ Paypal \ Model \ Config.php并更改:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'token' => $token,
    ));
}

to:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'useraction' => 'commit',
        'token' => $token,
    ));
}

With the 2 changes above, i figure out how to Skip Review Page in Magento Paypal Express Checkout.

通过以上2个更改,我弄清楚如何在Magento Paypal Express Checkout中跳过评论页面。

#5


7  

Andrew Angel's answer really doesn't avoid the comfirmation page, it just changes button value to "Pay" rather to "Confirm", or something like that.

安德鲁·安吉尔的回答确实没有避开确认页面,它只是将按钮值更改为“支付”而不是“确认”,或类似的东西。

Anyway the correct way to do that is going to \app\code\core\Mage\Paypal\Model\Config.php, to getExpressCheckoutEditUrl($token) method and change

无论如何,正确的方法是去\ app \ code \ core \ Mage \ Paypal \ Model \ Config.php,到getExpressCheckoutEditUrl($ token)方法并更改

'useraction' => 'continue',

to

'useraction' => 'commit’.

To aviod confirmation user page in Paypal Express you only need to change one line in on controller action. Go to Mage/Paypal/Controller/Express/Abstract.php and search for $this->_redirect('*/*/review'); in returnAction(). There you have to change

要在Paypal Express中避免确认用户页面,您只需要在控制器操作中更改一行。转到Mage / Paypal / Controller / Express / Abstract.php并搜索$ this - > _ redirect('* / * / review');在returnAction()中。你需要改变

$this->_redirect('\*/\*/review');

to

$this->_redirect('\*/\*/placeOrder');

That way when paypal returns to return action you avoid to show entire review page and payment was automatically confirmed. So, Paypal redirects again to success pages the same way like PayPal Standard method.

这样,当paypal返回返回操作时,您将避免显示整个评论页面并自动确认付款。因此,Paypal以与PayPal标准方法相同的方式再次重定向到成功页面。

#6


4  

@Toni The redirect url part works excellent, thanks! However changing the 'continue' to 'commit' did not change the buttons on PayPal's website. However, I was able to fix it by doing the following: Right above the getExpressCheckoutEditUrl function where Toni instructed to change the continue to commit, there is the funciton getExpressCheckoutStartUrl. If you add the useraction variable there, it will work. Original function:

@Toni重定向网址部分非常好,谢谢!但是,将“继续”更改为“提交”并未更改PayPal网站上的按钮。但是,我能够通过执行以下操作来修复它:在getExpressCheckoutEditUrl函数正上方,Toni指示将更改继续提交,有funciton getExpressCheckoutStartUrl。如果在那里添加useraction变量,它将起作用。原功能:

public function getExpressCheckoutStartUrl($token)
{
'return $this->getPaypalUrl(array(
'cmd'   => '_express-checkout',
'token' => $token,
));
}

New function:

public function getExpressCheckoutStartUrl($token)
{
'return $this->getPaypalUrl(array(
'cmd'   => '_express-checkout',
'useraction' => 'commit',
'token' => $token,
));
}

Notice the 'useraction' => 'commit', was added at the new function. This should work!

请注意,在新功能中添加了'useraction'=>'commit'。这应该工作!

#7


2  

THere was one step missing let me summarize the entire process again.

这是缺少一步让我再次总结整个过程。

1. Go to: \app\code\core\Mage\Paypal\Controller\Express\Abstract.php

1.转到:\ app \ code \ core \ Mage \ Paypal \ Controller \ Express \ Abstract.php

and search in returnAction() for:

并在returnAction()中搜索:

$this->_redirect('*/*/review'); 

There you have to change:

你需要改变:

$this->_redirect('*/*/review');

to:

$this->_redirect('*/*/placeOrder');

2. Go to: \app\code\core\Mage\Paypal\Model\Config.php and change the:

2.转到:\ app \ code \ core \ Mage \ Paypal \ Model \ Config.php并更改:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'token' => $token,
    ));
}

to:

public function getExpressCheckoutStartUrl($token)
{
    return $this->getPaypalUrl(array(
        'cmd'   => '_express-checkout',
        'useraction' => 'commit',
        'token' => $token,
    ));
}

3. With the above two changes you will still be taken to the review page and have to agree to the terms and conditions, to avoid this go to:

3.通过以上两项更改,您仍将被带到审核页面并且必须同意条款和条件,以避免这种情况发生:

/app/code/core/Mage/Paypal/Controller/Express/Abstract.php Search for :

/app/code/core/Mage/Paypal/Controller/Express/Abstract.php搜索:

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.’));
// }

The only time you will every be take to the review page is if the customers paypal returns a declined error.

每次访问评论页面的唯一时间是客户paypal返回拒绝错误。

#8


1  

Magento 1.9 has built-in support for this, the Skip Order Review Step option, but it has a subtle caveat. The feature doesn't work with the 'Shortcut' buttons you can display on the product detail and cart pages.

Magento 1.9内置了对Skip Order Review Step选项的支持,但它有一个微妙的警告。该功能不适用于您可以在产品详细信息和购物车页面上显示的“快捷方式”按钮。

My suggestion, disable the shortcut buttons and enable the Skip Order Review Step option. For extra credit you can rearrange the Onepage Checkout flow so that customers won't have to enter billing information twice (once on Magento and again on PayPal).

我的建议是,禁用快捷按钮并启用“跳过订单查看步骤”选项。如需额外信用,您可以重新安排Onepage Checkout流程,以便客户无需输入两次结算信息(一次在Magento上,另一次在PayPal上)。

More details available in this blog post.

此博客文章中提供了更多详细信息。