We use a custom extension for validation using a template wizard called "Firecheckout". Not sure if this is important, but thought I should mention this. Sometimes I see a transaction error message because "Please specify a shipping method." For a long time I tried to figure out how this can happen, and I'm lost. I tried everything I could think to duplicate the problem. Depending on the combination of things that I do (adding / removing items from the basket, adding / removing a coupon code that changes delivery options, switching between mobile and desktop sites, etc.), I could make the check page U options there is an option selected for the delivery method. However, if I try to send the order, I get an immediate red message in the delivery method section, which says: “Specify the delivery method” (note the difference between what he says by email and what he says in error displayed on the page ... missing "a"). This does not result in an error message.
Search by code I found that the error message is triggered in the TM_FireCheckout_Model_Service_Quote class (extends Mage_Sales_Model_Service_Quote ) in the _validate method. p>
$method= $address->getShippingMethod(); $rate = $address->getShippingRateByCode($method); if (!$this->getQuote()->isVirtual() && (!$method || !$rate)) { Mage::throwException($helper->__('Please specify a shipping method.')); }
In this case, I assume that either $ method or $ rate is null or false, but why / how could this be? Can I do something to prevent this from happening? The only difference between the FireCheckout _validate method and the parent class _validate method is which fields are considered mandatory. It does not change the address object in any way, so subsequent calls to getShippingMethod and getShippingRateByCode should match the default setting.
I can provide additional information if necessary. I'm basically trying to figure out what might cause this error and how can I reproduce it so that I can ultimately fix the hole that causes it in the first place.
Thanks!
Brianvps
source share