- Posts: 4
- Thank you received: 0
Understanding Zone hierachy & possible logic error
- IanCalhaem
-
Topic Author
- Offline
For instance, setting up a manual shipping method will display all zone types allowing the user to select say the Country type and not just a ship type.
I initially thought I would need to set up a Shipping Zone for each country where goods were being dispatched (Multi warehouse environment) but this does not appear to be required.
I originally changed the Country type to Shipping, but then renamed it back to Country.
However:..
When I investigated the Hikashop table structure I find that both the country and Ship type are still recorded (in the XXX_hikashop_zone and xxx_hikashop_zone_link tables).
I had initially thought that the zone_link table was to provide the link between the country and the associated states.
In my example Cook Islands is linked to the 15 island states that make up the Cook Islands.
But after changing the type to Shipping and then back again, I am left with a complex table structure..
(see attached file)
In the Zone Table the entry for Cook Islands has been changed (Zone name, English name etc) and there is a new entry Ship_cookislands which now contains the missing information.
In the Zone link table "country_Cookislands" has the child "ship_Cookislands", "ship_Cookilands" has a child link to "country_Cookislands" and also links to itself.
I discovered the strange linking structure when from Hikashop I displayed the Country Zone "Cook Islands" and saw that it was not displaying the correct subzones. What is is displaying is the information stared in the php Tables.
The Zone table shows the Country Zone as unpublished but the Ship zone as published. Because the ship zone links to the Country zone as a child, then Hikashop, correctly follows the convoluted logic to display the Country Zone as being published and not the Shipping Zone.
Since I had saved a copy of my sql database I was able to easily recover the situation but many users will struggle to correct these issues.
On a separate bu related issue:
Setting up the zones is a complex and time consuming task. I was wanting to set up local zones (2 countries) a Pacific Zone, a North American Zone, and then the rest of the World. It would make it much easier if it was possible to EXCLUDE countries whilst setting up a new zone. eg first set up the local zones, and the smaller zones such as Pacific, but then set up the Rest of the World as All minus Pacific minus North America. etc.,
Currently the only easy way of checking the sub zones are set up correctly is to extract the tables from the php database into an excel spreadsheet.
Please Log in or Create an account to join the conversation.
Adding all the countries at once to a zone requires only a few clicks. You click on the "add" button of the "sub zones" listing of your shipping/tax zone, select the "country" type in the top right dropdown of the popup, increase the pagination to see all of the countries and then click on the top checkbox to select them all before validating.
Then, you can just remove the ones you don't want.
So we didn't see the need for an exclude list since it's quite easy to add all of the countries at once. On top of that, adding such exclude list would be quite complex as the database structure isn't made to work like that.
In the zone table, you get all the zones with their type. If you change a country to another type, it won't display anymore in the country dropdown of the address, and it's the same for the states. So you shouldn't change their type.
State/Country type zones can be used as shipping/tax zones so you don't need to create a tax/shipping zone for just one country as you can directly use the country zone.
Please Log in or Create an account to join the conversation.
- IanCalhaem
-
Topic Author
- Offline
- Posts: 4
- Thank you received: 0
I will be able to create new tables using SQL and work in phpmyadmin, but I wondered if there would be an advantage to have a process where users could import preconfigured zones created by other users. Most Zones have a common origin - in my case it is the zones defined by the world wide postal system. eg Austalia and New Zealand both have zones local, Pacific, North America and the rest of the world. The Australia has a New Zealand zone, and New Zealand has an Autralia zone.The Cook Islands have local and 3 zones, A, B, C where A is Pacific (including Australia and New Zealand, B is North America and C is the rest of the world.
When I have configured and tested my zones I would be happy to share these for others to use.
thanks
Please Log in or Create an account to join the conversation.
It's the method we used for the EU tax rules plugin: www.hikashop.com/support/support/documen.../287#doc_tax_package
But that requires to have some development skills, so it could be interesting indeed to have a way of sharing the custom zones more easily. But it's a lot of work to have something in place to automate that sharing system between everyone for something that can be created manually in a few minutes via the interface. I think that this time could be better used improving other areas of HikaShop first.
Please Log in or Create an account to join the conversation.
something similar:
In Europe it is mostly strange to ask for states (sub-zones) when entering an address, so I would like to remove the states from the registration form.
1. I do not find the related file. Could you please point me to the right path?
2. I´m afraid that removing the code snippet for the state will cause an error as some other verification logic will require the state.
Is it possible to remove the state?
Thanks.
Please Log in or Create an account to join the conversation.
1. It's not a file. Go in the menu Display>Custom fields and unpublish the state field.
2. It won't because there is no code to change.
Please Log in or Create an account to join the conversation.
I completely overlooked that these fields are also one of the custom fields...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Country is the address_country custom field that you didn't change
Region is the address_state custom field that you didn't change
And for the city, I suppose that you changed the address_city field from a text field to a dropdown.
Is that so ?
How about if someone select another region or country ? They won't be able to enter their city name with the way you did, no ?
In that case, I wouldn't do that.
Or maybe you only ship in China ?
We would need to know more about what you want to do with your website to be able to tell you if it's good or not.
Please Log in or Create an account to join the conversation.
The picture I attached was a screen capture from another website I found online. And I think maybe you can help me set up like that. In the "region" option, I would like to check the zone and the zip code, as what you said to turn it to be a dropdown instead of a text field. Also, when I try to choose some of the cities in Taiwan, it turns out that I cannot find the correct regions.
Hence I was wondering if you can deal with the aforementioned problems. Thank you.
Please Log in or Create an account to join the conversation.
I'm sorry but I don't understand what you mean.
What do you mean by " I cannot find the correct regions" ?
Where do you " try to choose some of the cities in Taiwan" ?
When you say "I would like to check the zone and the zip code", where do you want to do that and what kind of check do you want to do ?
What do you mean by "In the "region" option" ? There is no such field by default. Are you talking about the "state" field ?
Please Log in or Create an account to join the conversation.
However, after I click the state I want, I can not see the change.
(All the states do not share the same cities.)
I was wondering if you could tell me how to deal with the issue, thanks.
Please Log in or Create an account to join the conversation.
So your question is "How to configure cities as sub zones for states and have them refresh when the state changes ?".
There is no such system in HikaShop.
HikaShop only handles dynamic refresh between state zones and country zones.
So if you want to have cities dynamically refresh, you would have to configure them as state zones, then configure states as country zones, rename the address_country field as state and the address_state field as city, and deactivate the address_city field.
That supposes that you would only ship to one country.
If you need to ship to several countries, I would recommend to leave the fields and zones as they are by default, and leave the address_city field as a text input field so that the customers can write themselves the name of their city.
Please Log in or Create an account to join the conversation.