How to Display Zones DropDown in Checkout
-
- Phoca Newbie
- Posts: 7
- Joined: 20 Dec 2020, 06:39
How to Display Zones DropDown in Checkout
Has anyone had success in generating the zones dropdown in the checkout form?
I have tried everything I can think of. I have even looked it up in the documentation, and it just says it's possible, not how to do it.
I have tried everything I can think of. I have even looked it up in the documentation, and it just says it's possible, not how to do it.
- Benno
- Phoca Hero
- Posts: 9443
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: How to Display Zones DropDown in Checkout
Hi,
did you try it (only for testing) with a Phoca Cart Template, e.g. Phoca Fashion?
Kind regards,
Benno
did you try it (only for testing) with a Phoca Cart Template, e.g. Phoca Fashion?
Kind regards,
Benno
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: How to Display Zones DropDown in Checkout
Hi,
zone is not set by customer - it is set by combination of country and region. So customer cannot set zone. Customer can set country and region and the zone is based on this setting.
Zones can be set in payment and shipping rules.
For example you will set the following zones:
Zone West (country: France, German)
Zone South (country: Spain, Italy)
Zone North (country: Sweden, Finland, Norway)
Then you will set that e.g. Shipping method A will be displayed only for Zone North.
So when users sets the country to Sweden or Finland or Norway then the Shipping method A will be displayed for him/her. So user does not directly set the zone. Zone is set by selecting country and/or region.
BTW: I have fixed the documentation, the information was wrong there.
Jan
zone is not set by customer - it is set by combination of country and region. So customer cannot set zone. Customer can set country and region and the zone is based on this setting.
Zones can be set in payment and shipping rules.
For example you will set the following zones:
Zone West (country: France, German)
Zone South (country: Spain, Italy)
Zone North (country: Sweden, Finland, Norway)
Then you will set that e.g. Shipping method A will be displayed only for Zone North.
So when users sets the country to Sweden or Finland or Norway then the Shipping method A will be displayed for him/her. So user does not directly set the zone. Zone is set by selecting country and/or region.
BTW: I have fixed the documentation, the information was wrong there.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 7
- Joined: 20 Dec 2020, 06:39
Re: How to Display Zones DropDown in Checkout
That is unfortunate, we need country, state, and county.
I'll have to figure out something else.
I'll have to figure out something else.
- David-Spring
- Phoca Member
- Posts: 33
- Joined: 15 Dec 2020, 11:21
Re: How to Display Zones DropDown in Checkout
I believe you can create and add an extra field called County and make it a required field. Would that work for you?
-
- Phoca Newbie
- Posts: 7
- Joined: 20 Dec 2020, 06:39
Re: How to Display Zones DropDown in Checkout
That would work on the billing/shipping section, but there is no way I can find to create a dropdown menu with the acceptable counties.
The case use:
We are using phoca for a condom distribution project, giving away condoms, but have to notate which county the orders come from. A dropdown would make it easier to filter the orders and get them thru the right reporting channels.
The case use:
We are using phoca for a condom distribution project, giving away condoms, but have to notate which county the orders come from. A dropdown would make it easier to filter the orders and get them thru the right reporting channels.
- David-Spring
- Phoca Member
- Posts: 33
- Joined: 15 Dec 2020, 11:21
Re: How to Display Zones DropDown in Checkout
You are right. For some reason, the Drop down select is not one of the options in the Form Field types. I am not certain if this would work, but you may want to find the checkout section of the Phoca Cart component and then add a Template Override to your template adding the needed code there. Of course, Jan may say this is a terrible idea. But I would give it a try as a first option.
As a second option, you can use another Form Building component such as Breezin Forms free that does have the drop down select field option where you can enter the values. This would require folks to fill out two different forms. But at least you would have all the information you need.
As a second option, you can use another Form Building component such as Breezin Forms free that does have the drop down select field option where you can enter the values. This would require folks to fill out two different forms. But at least you would have all the information you need.
-
- Phoca Newbie
- Posts: 7
- Joined: 20 Dec 2020, 06:39
Re: How to Display Zones DropDown in Checkout
Yeah, I thought about that as well, but wanted to reach out first.
Honestly a dropdown menu for the custom fields would be a wonderful additional feature on the base code.
I may be able to use JQuery to override a custom text field into a dropdown with option and have it add it somewhere in the order database, but honestly adding code into custom fields would be the better in custom fields for long term usability.
Honestly a dropdown menu for the custom fields would be a wonderful additional feature on the base code.
I may be able to use JQuery to override a custom text field into a dropdown with option and have it add it somewhere in the order database, but honestly adding code into custom fields would be the better in custom fields for long term usability.
- David-Spring
- Phoca Member
- Posts: 33
- Joined: 15 Dec 2020, 11:21
Re: How to Display Zones DropDown in Checkout
I agree. It would be best to have this option added to the Form Field types.
It is especially odd that it is not already there - since the Select field is included with Product - Attributes as one of the options. Maybe just see how this was done and then copy that over to the Form Field types as a Template Override.
I also like your idea of over-riding a custom text field into a drop down.
But this may have drawbacks. I think the best option might be to require Registration to complete the order and then using something like Breezin Forms as the Registration form. It makes purchases a two step process instead of a one step process. But at least you will be certain to get the county information.
I am facing a similar issue in that for some of my websites I need to know what school district the person lives in.
Good luck and let us know if you find an answer.
It is especially odd that it is not already there - since the Select field is included with Product - Attributes as one of the options. Maybe just see how this was done and then copy that over to the Form Field types as a Template Override.
I also like your idea of over-riding a custom text field into a drop down.
But this may have drawbacks. I think the best option might be to require Registration to complete the order and then using something like Breezin Forms as the Registration form. It makes purchases a two step process instead of a one step process. But at least you will be certain to get the county information.
I am facing a similar issue in that for some of my websites I need to know what school district the person lives in.
Good luck and let us know if you find an answer.
-
- Phoca Newbie
- Posts: 7
- Joined: 20 Dec 2020, 06:39
Re: How to Display Zones DropDown in Checkout
If I figure out a workable solution down the line, I'll update this.
I'm just gonna have to sort it by the mailing address in the mean time and run it through another program to find the county for now (time crunch: gotta be live by February and still lots of content and stuff to get in.)
After it's live I'll play with it on a dev server, might even futs with the core code a bit to get the dropdown custom field as an option, and contribute it to the core team. ;)
I'm just gonna have to sort it by the mailing address in the mean time and run it through another program to find the county for now (time crunch: gotta be live by February and still lots of content and stuff to get in.)
After it's live I'll play with it on a dev server, might even futs with the core code a bit to get the dropdown custom field as an option, and contribute it to the core team. ;)