Skip to content
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

Shipping method don't reload by default country when first reload page #34135

Open
trungto3t opened this issue Sep 21, 2021 · 19 comments
Open

Shipping method don't reload by default country when first reload page #34135

trungto3t opened this issue Sep 21, 2021 · 19 comments
Assignees
Labels
Area: Shipping Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: dev in progress Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@trungto3t
Copy link

trungto3t commented Sep 21, 2021

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 (*)

  1. Shipping address country display United Kingdom
    2.Shipping method apprear free shipping method

Actual result (*)

  1. 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

@m2-assistant
Copy link

m2-assistant bot commented Sep 21, 2021

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


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 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.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@trungto3t
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @trungto3t. Thank you for your request. I'm working on Magento instance for you.

@m2-assistant
Copy link

m2-assistant bot commented Sep 21, 2021

Hi @trungto3t! 👋
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.

@trungto3t
Copy link
Author

trungto3t commented Sep 21, 2021

@magento i replicate issue on 2.4-develop instance https://www.loom.com/share/b8001e439def4505bcd1f4d375080c0e

@ajijshekh123 ajijshekh123 self-assigned this Sep 21, 2021
@m2-assistant
Copy link

m2-assistant bot commented Sep 21, 2021

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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced 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: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@ajijshekh123
Copy link

Hi @trungto3t,
The issue is reproduced to the below steps:

  1. Set up the default country "United Kingdom" on Admin > Stores > General > Country Options > United Kingdom

image

image

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

image

  1. 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)

image

image

Thanks

@ajijshekh123 ajijshekh123 added Area: Frontend Area: Shipping Component: Checkout Component: Shipping Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Sep 21, 2021
@m2-community-project m2-community-project bot added this to Dev In Progress in High Priority Backlog Sep 21, 2021
@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Sep 21, 2021
@ajijshekh123 ajijshekh123 added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Sep 21, 2021
@github-jira-sync-bot
Copy link

❌ Something went wrong. Cannot create Jira issue.

@ajijshekh123 ajijshekh123 added the Reported on 2.4.x Indicates original Magento version for the Issue report. label Sep 21, 2021
@sdzhepa sdzhepa added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Area: Frontend Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Nov 8, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-1673 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Nov 8, 2021

✅ 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.

@sdzhepa sdzhepa removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Nov 8, 2021
@sdzhepa sdzhepa added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Nov 8, 2021
@github-jira-sync-bot github-jira-sync-bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Nov 8, 2021
@github-jira-sync-bot
Copy link

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.

@engcom-Hotel engcom-Hotel added Area: Shipping Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Component: Checkout Component: Shipping Reported on 2.4.x Indicates original Magento version for the Issue report. Area: Shipping labels Jan 21, 2022
@lenaorobei lenaorobei added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 21, 2022
@patrasq
Copy link

patrasq commented Sep 22, 2022

Hi, any update on this? 2.4 instance, same behavior.

@DavaGordon
Copy link

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @DavaGordon. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@DavaGordon
Copy link

Reproduced on 2.4.dev

Issue present if Ship to Applicable Countries set to Specific Country.

@vandijkstef
Copy link

vandijkstef commented Jan 4, 2023

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).

@atty31
Copy link

atty31 commented Apr 25, 2023

I got the same behaviour . Is there any update on this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Shipping Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: ready for confirmation Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: dev in progress Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
High Priority Backlog
  
Dev In Progress
Development

No branches or pull requests

10 participants