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

Please add Districts #26

Open
knaven0128 opened this issue Jul 19, 2018 · 9 comments
Open

Please add Districts #26

knaven0128 opened this issue Jul 19, 2018 · 9 comments

Comments

@knaven0128
Copy link

Can you edit and add districts after the dropdown of city?

@Mantish
Copy link
Member

Mantish commented Aug 18, 2018

Hi,
This is not straightforward, but it's possible.
I personally cannot implement this now, so I'll just tag the issue for now

@vbernuy
Copy link

vbernuy commented Aug 20, 2018

Hi, Mantish. Thank you very much for your plugin, it's amazing . I would like to know if it is possible to use the optgroup function for cities. So we could use the optgroup label as City and the optgroup options as Districts.

Attached reference image.

And many thanks again.
optgroup for cities

@Mantish
Copy link
Member

Mantish commented Sep 1, 2018

Hi, I'm not really familiar with that feature.
Is there documentation about it?

@rwkyyy
Copy link
Contributor

rwkyyy commented Apr 24, 2020

@Mantish A city (larg one) can be divided in districts, for example:
Bucharest (Romania) has 6 districts (named sectors).
It will need a new input field (checkout), option page with feature disable by default and a list of districts separately? This might need a rework of the structures of the cities per country since a district is part of a city.

For example:

'B'=array(
        'Bucuresti' => array(
                'Sector 1',
                'Sector 2',
                'Sector 3',
                // onward
        ),
);

#33 further example comparision

@Mantish
Copy link
Member

Mantish commented Apr 24, 2020

yeah, it needs quite a few changes in many places. Is that something you would be able to work on @rwkyyy ?

@rwkyyy
Copy link
Contributor

rwkyyy commented Apr 24, 2020

@Mantish tell me what you need and I'll see what I can do.

@Mantish
Copy link
Member

Mantish commented Apr 28, 2020

Well, basically we need to implement this whole feature:

  • Define $cities object structure to support districts
  • Add new field for cart, checkout and admin pages
  • Populate districts field according to the selected city
  • Options page to enable this feature? or maybe auto-enabled if present in the $cities object

@rwkyyy
Copy link
Contributor

rwkyyy commented May 4, 2020

OK, will try to make room for some of these next week, my schedule is pretty loaded this week.

@rwkyyy
Copy link
Contributor

rwkyyy commented May 25, 2020

@Mantish I've did some digging these past few weeks (luckly one of our clients wanted this already) and apparently -- for better integration with shipping operators, it's best to use the field CITY as a district selection (or at least for Romania) because Bucharest (capital) has 6 districts and nothing else -- when the shop owner generates an AWB with the integration of the shipping operator, it will take automatically the cities as a district without a problem.

I haven't been able to test this with multiple shipping operators, in Romania, just one, but I'll try to find the time this week to test with at least the 3 major ones and confirm it.

p.s. the shipping operator plugin does get & post of the default WC fields for shipping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants