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

[Enhancement]: Block-based checkout - "Country" field should be first in the address form. #46513

Closed
1 task
Tracked by #44835
nielslange opened this issue Apr 12, 2024 · 12 comments · Fixed by #47375
Closed
1 task
Tracked by #44835
Assignees
Labels
block: checkout Issues related to the checkout block. focus: checkout Issues related to checkout page. team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues type: enhancement The issue is a request for an enhancement.

Comments

@nielslange
Copy link
Member

nielslange commented Apr 12, 2024

Describe the solution you'd like

This issue contains the following task:

Regarding the country selector, Baymard states the following:

If not using geotargeting, the "country" field should be first in the address form, as the other address fields depend on this

In #46013 (comment), @opr clarified that adjusting the order of the checkout fields is possible and in #46013 (comment), he shared the following code:

add_filter('woocommerce_get_country_locale', function($locale) {
	$locale['CA']['postcode']['priority'] = 1;
	return $locale;
} );

Warning

When implementing this change, we need to be careful not to break backwords compatibility, see also Reorder Checkout Fields.

Describe alternatives you've considered

No response

Additional context

No response

@nielslange nielslange added type: enhancement The issue is a request for an enhancement. focus: checkout Issues related to checkout page. team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues block: checkout Issues related to the checkout block. labels Apr 12, 2024
@nielslange
Copy link
Member Author

@pmcpinto Based on your comment in #46013 (comment), I assume that you want this change to be implemented, correct?

based on @opr comments, it looks like it's possible to move the country to the top. This will also be useful in the future, if we introduce an address autocomplete feature.

@nielslange nielslange added status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. needs: discussion Issue that either needs discussion or pending decision (not for support requests). labels Apr 12, 2024
@pmcpinto
Copy link
Collaborator

@pmcpinto Based on your comment in #46013 (comment), I assume that you want this change to be implemented, correct?

Yes, as this is part of @nikkivias proposals to improve the experience, as long as there is a low risk of breaking backwards compatibility. Thanks.

@nielslange nielslange removed the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Apr 16, 2024
@nielslange
Copy link
Member Author

@pmcpinto Based on your comment in #46013 (comment), I assume that you want this change to be implemented, correct?

Yes, as this is part of @nikkivias proposals to improve the experience, as long as there is a low risk of breaking backwards compatibility. Thanks.

Thanks for confirming this, @pmcpinto.

@ralucaStan
Copy link
Contributor

@woocommerce/rubik had some concerns about the impact of this change so I'd like to hear more from the team about what they see as problematic if we were to work on Country" field should be first in the address form.

The team also expressed some concerns about making this an opt-in or not, about limiting it per country etc.

@pmcpinto
Copy link
Collaborator

Thanks. It would be helpful to hear the concerns as it will shape how we implement this.

@senadir
Copy link
Member

senadir commented Apr 18, 2024

The main concern is that, do we want to move this field by default but still let it be changed by developers (as it stands right now) or do we want to force it to the top (like we do with email field)?

That's the main concern I have, the other one being that we need to communicate this in case some people have strong opinions.

@pmcpinto
Copy link
Collaborator

@senadir thanks for your feedback.

The main concern is that, do we want to move this field by default but still let it be changed by developers (as it stands right now) or do we want to force it to the top (like we do with email field)?

I think we should move it to the top, but allow 3PDs to change the order. Do you see any cons from a shopper experience POV?

@senadir
Copy link
Member

senadir commented Apr 24, 2024

If we can also support hiding/disabling the field if it's a single country shop, that would be great. I don't see much issues. either that, or we move country a bit higher (after first and last name).

@nielslange
Copy link
Member Author

@senadir What do you mean by "[...] or we move country a bit higher (after first and last name)."? I'm asking as this issue aims to place the country field above all other fields.

@senadir
Copy link
Member

senadir commented Apr 29, 2024

I was the under the assumption that's how Shopify does it (First Name, Last Name, Country, rest of address fields). I was wrong

image

@nielslange
Copy link
Member Author

Thanks for clarifying this, @senadir.

@ralucaStan ralucaStan removed the needs: discussion Issue that either needs discussion or pending decision (not for support requests). label May 2, 2024
@pmcpinto
Copy link
Collaborator

pmcpinto commented May 2, 2024

Thanks for the feedback. We can move forward with the proposed scope as long as we allow developers to change the order and don't have any backward compatibility issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: checkout Issues related to the checkout block. focus: checkout Issues related to checkout page. team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants