Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento transaction error "Please specify a shipping method"
    text
    copied!<p>We use a custom checkout extension by Templates Master called "Firecheckout". Not sure if that's relevant, but figured I should mention it. Occasionally I see a transaction failed email with the reason being "Please specify a shipping method". I've spent a long time trying to track down how this can happen and I'm lost. I have tried everything I can think of to duplicate the issue. Depending on the combination of things I do (adding/removing items from the cart, adding/removing a coupon code that changes shipping options, switching between mobile and desktop sites, etc) I have been able to make it so that the checkout page doesn't have an option selected for shipping method. However, if I try to submit the order I get an immediate red message in the shipping method section that says "Please specify shipping method" (Note the difference between what it says in the email and what it says in the error displayed on the page...missing "a"). This does not result in an error email.</p> <p>Searching through the code I find that the error email is triggered in the <strong>TM_FireCheckout_Model_Service_Quote</strong> (extends <strong>Mage_Sales_Model_Service_Quote</strong>) class in the <strong>_validate</strong> method</p> <pre><code>$method= $address-&gt;getShippingMethod(); $rate = $address-&gt;getShippingRateByCode($method); if (!$this-&gt;getQuote()-&gt;isVirtual() &amp;&amp; (!$method || !$rate)) { Mage::throwException($helper-&gt;__('Please specify a shipping method.')); } </code></pre> <p>In this case, I guess either <strong>$method</strong> or <strong>$rate</strong> is null or false, but why/how could that be? Is there anything I could do to ensure this never happens? The only difference between the FireCheckout's <strong>_validate</strong> method and the parent class's <strong>_validate</strong> method is in which fields are considered required. It does not alter the address object in any way, so the subsequent calls to <strong>getShippingMethod</strong> and <strong>getShippingRateByCode</strong> should be the same as a default install.</p> <p>I can provide additional details if necessary. I'm basically trying to understand what may trigger that error and how I can reproduce it so I can ultimately patch the hole that is causing it in the first place.</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload