Magento PayPal Express Quick Checkout shipping loss Solution

Source: Internet
Author: User

Magento Set Express PayPal, click on the Product detail page or shopping cart page

Direct jump to the PayPal checkout page when there is no related shipping costs, and the normal checkout process freight calculation is no problem.

In the default mode of transport flat rate, you can override the method (module rewrite yourself to handle LOL):

app/code/core/mage/paypal/model/express/checkout.php @function Returnfrompaypal

In

The code is as follows Copy Code

if ($this->_api->getshippingratecode ()) {

if ($code = $this->_matchshippingmethodcode ($shippingAddress, $this->_api->getshippingratecode ())) {

Possible bug of double collecting rates:-/

$shippingAddress->setshippingmethod ($code)->setcollectshippingrates (true);

}

}

Then add:

The code is as follows Copy Code

if (empty ($code)) {

$code = ' flatrate_flatrate ';

$shippingAddress->setshippingmethod ($code)->setcollectshippingrates (true);

}

$code values can be changed to their preferred default mode of transport.

Tip, if a friend can have a better solution can leave a message to me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.