- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
'Please specify a shipping method' error even by selecting the shipping method
We are developing an extension for freight and it works well in the cart.
At the checkout the shipping options appear and can be selected normally, but when I try to close the purchase order an alert with the message 'Please specify a shipping method' appears, even though I have already selected the shipping method.
When I query the Freight Platform API it returns a code that I have to pass in the shipping method, for example, 'mycustomshipping_transporter_code'. When I send without the code, for example 'mycustomshipping_transporter', it works.
My code is like this:
$shipping_method = $this->_offer_token . '_' . $carrier->oferta; /** @var Mage_Shipping_Model_Rate_Result_Method $rate */ $method = Mage::getModel('shipping/rate_result_method'); $method->setCarrier($this->_code); $method->setMethod($shipping_method);
Anyone have any idea what might be happening?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: 'Please specify a shipping method' error even by selecting the shipping method
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: 'Please specify a shipping method' error even by selecting the shipping method
Thanks, but I resolved this problem. I didn't know that the collectRates method was called every time the step was changed in the checkout, so when was changing the step, the API was responding with a different code and the Magento was losting the shipping method
The module is on github: https://github.com/davidalves1/freterapido_magento
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: 'Please specify a shipping method' error even by selecting the shipping method
Thanks for sharing the final solution.