-
Notifications
You must be signed in to change notification settings - Fork 635
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
[4.x]: UK counties no longer available #13101
Comments
Hi, thanks for reaching out. It sounds like you might want to have a look at: #11788. The library (commerceguys/addressing) doesn’t come with UK subdivisions (more details in that discussion), but the solution mentioned there should allow the input and saving of plain text values. You might also find this helpful: #12644. |
@i-just Thanks, that actually is really useful. I've already switched the shipping rules to be postcode based, but I'd not had a chance to look into the counties not saving so hopefully this will solve it for me 👍 |
@i-just Just jumping in on this as I posted a duplicate (Sorry!) But I don't see the solution Brandon posted actually allowing to display the Counties for UK, but only to display a field (Which i'm assuming as it's untested, just displays an input field, not a select) I'm also a little confused as to why this can't be added to the core? As I assume a lot of developers will be using Craft and Craft Commerce in the UK, or outside of the UK but still want to ship to UK addresses and to neglect having UK Counties in the core system and needing to add them manually with a module seems a bit crazy to me. As we'd essentially need to do this everytime we spin up a Commerce site using Craft 4 now. |
Yes, if you use those events, the Data for the library (commerceguys/addressing) used to come from Google (issue explaining why counties are not provided: google/libaddressinput#193). It looks like |
Craft 4.5.0 is out with a new event that makes it possible to customize address subdivisions (#13361). |
What happened?
Description
After upgrading to Craft Commerce 4, and spending far too long debugging to try to find out what Ive missed, it seems that the new Administrative Area concept doesn't include British Counties.
The issue is mostly around shipping in Commerce. The UK incorporates England, Scotland Wales and Northern Ireland, and while we're effectively considered a single country in Craft, in reality Northern Ireland is on the other side of the Irish Sea, and the Scottish Highlands are well outside of most shipping companies scope for, say, one day delivery.
So up to now we've based shipping rules on counties. But since upgrading, its no longer possible. This massively complicates things as, using DPD as an example, this is what they consider the Scottish Highlands
There's also Northern Ireland and various other offshore islands to consider
I tried manually creating an array of UK counties to use, but it turns out they're silent dropped when saving the address due to not validating against the list you have.
Is there any way around this? Perhaps a way of saving my own administrative area outside of your predefined list, with it still able to work as part of a shipping rule? Or do I have to completely rethink how shipping works for this site? Managing it by postcode is the only thing I can think of off the top of my head, but it's going to be a pain to manage
Craft CMS version
4.x
PHP version
8.1
The text was updated successfully, but these errors were encountered: