Woocommerce Shipping Fields Conditional - woocommerce

Im Tyring do the following;
At Checkout page;
When a User Selects the State ( out of 3) below the City Dropdown must include the list of cities that are in the related state.
Eg:
State : Dubai
Cities to show : ABC
If State is Sharjah
Citiyes to show : XYZ
I tried using a Custom Feild editor and managed to get the functions.php updated with the list of one State but I can't figure out how to add the conditions, other stats, and Cities.
looking forward on a guide
Thanks

Related

Metabox Geolocation Extension: How to dynamically update Restriction based on users country selection

Meta Box Extension: Geolocation
I need to make the country restriction dynamically updated through user selection of a select dropdown containing the country iso2 values. I've tried to find any documentation that is similar to what I'm aiming for, but by far no luck.
There is no support forum as well for the plugin + extension that seems to have the answer or example that I'm looking for.
Basically what I wanna do is:
User selects a country (ie: United States) -> The expected result is the address field will limit the addresses to those in US only.

Woocommerce Check-out Customer Condition

On the checkout page in woocommerce, I have provided a distinction between provinces and districts, but when the customer chooses the district, I want to assign an ID that I have previously specified to the database. I want it to print the county directly in the form of a string. Where do I write the if?
Example -> billing_adress (Okayama) to i want database write Customer country (OK8299)
Briefly; I want to register in customer country with a different ID. Not with the country name. How can i do?
Please help me thank you
Database Screenshot suit_wc_customer_lookup
As you can see, "seyhan" is writing. I want instead of "TR.00100TR". I want to complete this data by putting in excel and if else. I would be very happy if you help. For example, if Seyhan is city TR.00100TR, if Ceyhan is city TR.00102TR.
Thanks

Conditional Logic for getting a list of sub categories in ACF

I am creating a business listings and Advanced Custom Field (ACF) helps me to create the backend form.
The question is, how do I get the sub category of a main category only if I set the condition.
For example,
I have 100s of City names as City Taxonomy
I have 100s of Area names as sub category of the City Taxonomy
I have created a form that includes these 2 fields.
City:_________ (Drop down selection of City Taxonomy)
Area Name:_______ (I want this sub category drop down to show up based on City selection above)
Is this possible? Or does it require coding to make it work?
I have searched enough and I could not find even a premium plugins to support this.
I can simply set these 2 fields to pull data from City Taxonomy but the data entry becomes very tough with hyphen appearing before sub-city Taxonomies and possible duplicate value under different city.
Thanks in advance.

link two fields select type symfony2

i work with Symfony2 and I want to see how I can use Form Events to link two fields select type.
The first field contains the cities and the second contains the country.
here is my entities:
user
- id
- name
- IdCity
city
- id
- CityName
- IdCountry
country
- id
- countryName
And thank you.
Solution #1
( working without javascript , enhanced with javascript, no reload required, small city amounts )
Create one select field of entity field-type displaying all cities and use group_by to group by country.
hide your single grouped select field with javascript ( type="hidden" )
split the select fields with JavaScript into a country field for the groups and add a second one for cities
change the city field if the country fires onchange event
change the hidden field if the city field fires onchange event
This way you are saving the code necessary to create a second form, inject your current country, filter with a second queryBuilder ... If you do have a lot of cities ( even with a cached result you are outputing too many )... go for solution #2.
Solution #2
( huge amount of cities, therefore loading cities filtered by country selection required )
create a form with an entity field type for the countries
pass the currently selected country into your form - default to null ( i.e. from your action or inject the request and read it from there)
create a subform of entity field type for the cities
if the selected country read from request is null - don't add the subform to the builder
if present -> add the subform and use the queryBuilder city field-type to filter the cities by country
enhance by AJAX-loading the subform on country-select
Hope you get the idea :)

Ubercart shipping per country

I don't want to use the UPS shipping, I have a list of prices per country that my client wanted adding. Now I have been told to do this via conditional actions but I haven't got the vaguest idea how I would set this up, none of the options seem to allow me to set up specific values per country. Please help me out!
By "prices per country" do you mean a flat rate per country?
If so, create a flat rate price for each country (admin/store/settings/quotes/methods/flatrate). Example: International - Canada Flat rate
This will also add triggers for each flat rate you create in the conditional actions: (admin/store/ca). Example: Trigger: Getting shipping quote via International - Canada
Edit the trigger and click the "conditions" tab. Under "Available conditionns" select "check an order's shipping country". Click the "add condition" button. Then select the country (example: canada) and save the page.
(this is for drupal 6 & ubercart 2)

Resources