-
Notifications
You must be signed in to change notification settings - Fork 154
Cannot return null for non-nullable field AvailableShippingMethod.method_code when no shipping methods are available #526
Cannot return null for non-nullable field AvailableShippingMethod.method_code when no shipping methods are available #526
Conversation
…hod_code when no shipping methods are available
} | ||
} | ||
if (count($methods) === 0) { | ||
throw new GraphQlNoSuchEntityException(__(' This shipping method is not available. To use this shipping method, please contact us.')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to load the text of the message from config there
Have no idea how it can be done. So it's a question, not suggestion.
@@ -65,13 +66,19 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value | |||
$shippingRates = $address->getGroupedAllShippingRates(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check this behavior on frontend.
How to frontend work with getGroupedAllShippingRates
method and provide the same error message
Cannot reproduce the issue. |
Hi, @galaoleksandr |
@TomashKhamlai Why do you consider that we need to show an error message? Let's go step by step:
Result should be
So, I see that there are not any @paliarush Could you look at it? |
@XxXgeoXxX
without required fields because it is not |
@naydav, the message appears on Storefront and it also appears in developer mode. |
…ingMethod.method_code when no shipping methods are available
Hi @XxXgeoXxX, thank you for your contribution! |
…ingMethod.method_code when no shipping methods are available #526
Description (*)
Description #524
Manual testing scenarios (*)
Steps to reproduce (*)
Navigate to Stores> Settings>Configuration>Sales>Shipping Methods and turn off Flat Rate
Enable Free Shipping but go to Ship to Applicable Countries and uncheck Use Default
In Ship to Specific Countries set country to United Kingdom only.
In Show Method if Not Applicable set Yes
Get Customer Token
Create empty Cart
Add simple product to cart
Execute query cart:
Contribution checklist (*)