-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Please specify a shipping method" Exception #5021
Comments
I need to modify my code to this , and checkout went through
|
I have remove underscore too, but no success. The error message ("Please specify a shipping method") still showing |
@lutpiero you may need to covert string to lower also |
Same as yours, but still no luck |
I found that we can't use long name :( try that |
Hi @vphat28! Please specify what 3rd party shipping provider do you use? |
hi @dyushkin it's just my custom test shipping with offline payment |
I have also been experiencing this with our Meanbee Royal Mail extension for Magento 2. After adding a log line to \vendor\magento\module-quote\Model\QuoteValidator.php. I also can see that a method code is fetched but no rate. The logging suggests that the method code has been truncated and so when it tries to find a rate it is unable.
The code above should be "meanbee_royalmail_firstclasssignedforsmall". When I change the Carrier code to "rm" and therefore the shipping code reduces to "rm_firstclasssignedforsmall" without being truncated, the PayPal Express order with review step enabled works. |
…d less likely to hit a Magento bug. See magento/magento2#5021
Hi @vphat28 |
@magento-engcom-team I think it would be worth adding documentation for maximum carrier + rate name length. Otherwise, it becomes quite an obtuse error when creating custom shipping methods. |
@bobbyshaw, do you know which is the maximum length allowed? |
I'm not 100% but I think it's 40 characters. |
Thank you! |
Thank you @vphat28 ! I've had the same issue. Removing underscore solved it. @magento-engcom-team Have you tried it on magento 2.2.0 ? (I didn't have this issue at 2.1.9) |
The issue is persistend in 2.1.9 - my shipping extension has the underscore - after remove everything works as expected. Thanks vphat28 |
Longer shipping method code cause issue. After minimized shipping method worked for me too. @vphat28, thanks for kind info. |
I have the same problem with underscore in my shipping carrier code and rate (Magento 2.2.5). @magento-engcom-team - I found code responsible for this issue and I in my opinion it isn't good idea do
I have solution for it and I will upload pull request soon. |
idziakjakub is correct. That behavior is identical to issues we are having with a carrier code containing an underscore. |
Hi @vphat28. Thank you for your report. The fix will be available with the upcoming 2.3.1 release. |
Hi @vphat28. Thank you for your report. The fix will be available with the upcoming 2.2.8 release. |
Hi @vphat28. Thank you for your report.
The fix will be available with the upcoming 2.3.2 release. |
[TSG-Commerce] Tests for 2.3 (pr5) (2.3-develop)
Please see my solution here: https://magento.stackexchange.com/a/320495/15474 You need to use this model |
Steps to reproduce
develop
branch.Expected result
Actual result
I searched for the string and in file \vendor\magento\module-quote\Model\QuoteValidator.php line 53
the $method variable is null
My collectrates in shipping adapter is
$method = $this->_rateMethodFactory->create();
I noticed that when I remove the underscore symple and change $method->setMethod('express_method'); to $method->setMethod('expressmethod');
the checkout went through successfully.
I wonder can I use "_" symbol in function setmethod? I don't have this problem in magento 1
The text was updated successfully, but these errors were encountered: