Magento – Please Specify a Shipping Method error on submit order on checkout page

errormagento-1.9

I have onetep checkout extension and sagepay extension installed.

1. Add product to cart...
 2. go to checkout page...
 3. select shipping method and payment method(sage pay)...
 4. Then click to 'place order' button...

It opens popup for sage pay detail. I enter sage pay test detail and click to submit, it gives error in js popup 'Please specify a shipping method'.

On file app/code/core/Mage/Sales/Model/Service/Quote.php
there is _validate() method which returns $method and $rate blank.

$method= $address->getShippingMethod();
$rate  = $address->getShippingRateByCode($method);
if (!$this->getQuote()->isVirtual() && (!$method || !$rate)) {
    Mage::throwException(Mage::helper('sales')->__('Please specify a shipping method.'));
}

Best Answer

Please check if you have a product that's not virtual.