cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9 - Please specify a shipping method

Magento 1.9 - Please specify a shipping method

So I've already seen a couple of the other answers to this question on almighty Google, however, my problem is still persisting.

Whenever someone tries to purchase an item using PayPal Express, when they click "Pay Now" it sends them to the Magento Review Page and throws the error "Please specify shipping method". However, if the user goes back to the PayPal Express page, and tries to pay again, it will go through just fine.

Whilst digging through the Magento files to try and see the issue, I've tried the following things.

Set the Timeout Callback on the shipping options to 6s

Added

 

/**
 * Start Customization
 */
    if (!$rate) {
     Mage::logException(new Exception("Rate was empty inside quote validate method, trying to forcefully recalculate"));
     $this->getQuote()->getShippingAddress()->setCollectShippingRates(true);
     $this->getQuote()->setTotalsCollectedFlag(false);
     $this->getQuote()->collectTotals();
     $rate  = $address->getShippingRateByCode($method);
    }
/** End Customization **/

From This Question

And I've tried logging the entire process.

What I've gathered from everything is that it looks as though Magento isn't picking up the Shipping Method returned by PayPal, as the Method and Rate from the function _validate() (in/app/code/community/sale/service/quote.php) are Both empty when the pay now action is processed.

Paypal is definitely returning the shipping methods too.

If you need any extra code etc, just comment below.

Any help would be greatly appreciated. Smiley Happy

Thanks!

4 REPLIES

Re: Magento 1.9 - Please specify a shipping method

Hi AltBen,

 

I too have this problem occurring with a small percentage of PayPal Express users and a transaction fail is resulting. i have not been able to reproduce it though.

 

Did you ever manage to resolve it?

Re: Magento 1.9 - Please specify a shipping method

Hi! Have you ever solved it? I'm having the same problem either.

Re: Magento 1.9 - Please specify a shipping method

Hi,

 

I am having the same problem. Is it resolved?

Re: Magento 1.9 - Please specify a shipping method

Hello @shreya_anjali

 

app/code/core/Mage/Paypal/Model/Express/Checkout.php

find the following line in method updateShippingMethod(),

$shippingAddress->setShippingMethod ($methodCode) ->setCollectShippingRates(true);



And replace it with

$shippingAddress->setShippingMethod ($methodCode)->setCollectShippingRates (true) ->save();


If it will work then mark as the solution or give kudos