magento2
magento2 copied to clipboard
Shipping method don't reload by default country when first reload page
Preconditions (*)
1.Magento 2.4.2 with sample data (replicate on Magento 2.4.3) 2.PHP 7.4 3. Local enviroment.
Steps to reproduce (*)
1.Set United Kingdom to default country General->general->Country Options -> default country 2.Set shipping method free shipping for special countries United Kingdom 3.Add any product to cart. 4.Go to checkout page (Guest checkout,just open the checkout page, haven't filled in any fields)
Expected result (*)
- Shipping address country display United Kingdom 2.Shipping method apprear free shipping method
Actual result (*)
- Shipping address country display United Kingdom 2.Shipping method not apprear free shipping method
https://www.loom.com/share/3eb9cabfd8fe45d58f119d241d780c77 window.checkoutConfig.defaultCountryId was set by field https://i.imgur.com/JLs78qm.png https://i.imgur.com/T4Wim5p.png not General->general->Country Options -> default country
Hi @trungto3t. Thank you for your report. To help us process this issue please make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance - upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance
Hi @trungto3t. Thank you for your request. I'm working on Magento instance for you.
Hi @trungto3t! :wave:
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.
Hi @trungto3t, here is your Magento Instance: https://f243b9c0f9ae3b48969f9df1aac23955-2-4-develop.instances.magento-community.engineering Admin access: https://f243b9c0f9ae3b48969f9df1aac23955-2-4-develop.instances.magento-community.engineering/admin_7bbb Login: 13ce1b4e Password: 5f03e6b2c98f
@magento i replicate issue on 2.4-develop instance https://www.loom.com/share/b8001e439def4505bcd1f4d375080c0e
Hi @ajijshekh123. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is validwill be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is validappears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Descriptionlabel to the issue by yourself. -
[ ] 3. Add
Component: XXXXXlabel(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.4-developbranchDetails
- Add the comment@magento give me 2.4-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmedonce verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @trungto3t, The issue is reproduced to the below steps:
- Set up the default country "United Kingdom" on Admin > Stores > General > Country Options > United Kingdom


- On the Front end, Add Bag product to the cart
- Click on the Mini cart icon, Navigate the Checkout page
- For the first time "Free Shipping" method is not showing on Shipping methods block

- Once the user changes the other country and again select the "United Kingdom" default country > "FREE SHIPPING" METHOD IS SHOWING ON SHIPPING METHOD BLOCK (CHECKOUT PAGE)


Thanks
:x: Something went wrong. Cannot create Jira issue.
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1673 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @sdzhepa. Thank you for verifying the issue.
Issue Available: @sdzhepa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*
Once all required labels are present, please add Issue: Confirmed label again.
Hi, any update on this? 2.4 instance, same behavior.
@magento give me 2.4-develop instance
Hi @DavaGordon. Thank you for your request. I'm working on Magento instance for you.
Hi @DavaGordon, here is your Magento Instance: https://4c16aa837a9c698b3d498332bd36d65a.instances.magento-community.engineering Admin access: https://4c16aa837a9c698b3d498332bd36d65a.instances.magento-community.engineering/admin_d3c1 Login: d7afbe0a Password: 8ae9f0ce8e7e
Reproduced on 2.4.dev
Issue present if Ship to Applicable Countries set to Specific Country.
Same issue here. Basic summary, the first call of estimate-shipping-methods contains the wrong country_id (which is likely the global default?) For me that is 'NL' so the initial payload is:
{
"address": {
"street": [],
"country_id": "NL",
"postcode": null
}
}
Yet, I'm on a store view that has the default country set to GB. The country field is showing 'GB', not 'NL'.
After only changing the postcode, it realises it's mistake and fetches the estimate-shipping-methods correctly, giving me the following payload
{
"street": [],
"city": "",
"region": "",
"country_id": "GB",
"postcode": "123 ab",
"firstname": "",
"lastname": "",
"vat_id": "",
"company": "",
"telephone": ""
}
So, I assume the order of the execution is wrong here; It likely fetches the shipping methods as soon as possible, then updates the form according to the defaults, then attaches the field listeners (or the field listeners are bypassed/not triggered at all by the way the fields are updated).
I got the same behaviour . Is there any update on this issue ?
Hi @trungto3t,
Thanks for your reporting and collaboration.
We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.kindly refer the screenshots.
Shipping address country display United Kingdom Shipping method not appear free shipping method
Hence Confirming the issue.
Thanks.
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-1673