- Posts: 3
- Thank you received: 0
Edit shipping / billing addresses on checkout
- hiranyajaya
-
Topic Author
- Offline
Less
More
12 years 2 weeks ago #179453
by hiranyajaya
Edit shipping / billing addresses on checkout was created by hiranyajaya
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- Browser(s) name and version -- : Chrome
Hi, I have a few questions about shipping/billing addresses on the checkout page.
1. How to restrict the "country", only in the shipping address? (ex: shipping address country should always be "Australia". Else display error message. Billing address can have any country)
2. How to add a custom field only to the shipping address? (ex: I need to have "nearest city" field only for shipping address.)
3. How to populate a drop down list custom field, based on the selected "state" in address. (ex: the list in "nearest city" changes based on the selected "state")
Many thanks in advance.
-- Joomla version -- : 3.3.3
-- Browser(s) name and version -- : Chrome
Hi, I have a few questions about shipping/billing addresses on the checkout page.
1. How to restrict the "country", only in the shipping address? (ex: shipping address country should always be "Australia". Else display error message. Billing address can have any country)
2. How to add a custom field only to the shipping address? (ex: I need to have "nearest city" field only for shipping address.)
3. How to populate a drop down list custom field, based on the selected "state" in address. (ex: the list in "nearest city" changes based on the selected "state")
Many thanks in advance.
Please Log in or Create an account to join the conversation.
12 years 2 weeks ago #179463
by nicolas
Replied by nicolas on topic Edit shipping / billing addresses on checkout
Hi,
1. There is no option to do that. Even more so that the addresses of the user can be used for either shipping or billing.
What you can do though is to restrict your shipping methods to the country zone "Australia". That way, if the user selected a shipping address outside of Australia, he will get an error message on the selection of the shipping methods and won't be able to proceed unless he changes his shipping address to an address within Australia.
2. As point one, there is no option to do that as addresses are shared between billing and shipping. The best I can propose is to add a custom address field via the menu System>Custom field, do not require it, and add some CSS code to hide it for the billing address form.
3. That's not possible. It would require a complex customization of the code.
Note however that nothing is impossible here. It's just impossible with the options provided by default. But you can always contact a third party developer like our partners www.hikashop.com/home/our-partners.html and have that customized for you by them.
1. There is no option to do that. Even more so that the addresses of the user can be used for either shipping or billing.
What you can do though is to restrict your shipping methods to the country zone "Australia". That way, if the user selected a shipping address outside of Australia, he will get an error message on the selection of the shipping methods and won't be able to proceed unless he changes his shipping address to an address within Australia.
2. As point one, there is no option to do that as addresses are shared between billing and shipping. The best I can propose is to add a custom address field via the menu System>Custom field, do not require it, and add some CSS code to hide it for the billing address form.
3. That's not possible. It would require a complex customization of the code.
Note however that nothing is impossible here. It's just impossible with the options provided by default. But you can always contact a third party developer like our partners www.hikashop.com/home/our-partners.html and have that customized for you by them.
Please Log in or Create an account to join the conversation.
12 years 2 weeks ago #179557
by korzo
Replied by korzo on topic Edit shipping / billing addresses on checkout
3. Although Nicolas is correct, you can achieve this by cascading custom fields.
I made sequence of fields State->City->Shop as following:
- I disabled build in state field
- created dropdown custom field for state with "Display limited to" Country
- for every state I created dropdown custom fields for city with "Display limited to" respective state
- for every city I created dropdown custom fields shop with "Display limited to" respective city
But this solution comes with several downsides.
It's a lot of work(but you can cheat and generate fields programatically) and it comes with performance hit as address table becomes huge.
I made sequence of fields State->City->Shop as following:
- I disabled build in state field
- created dropdown custom field for state with "Display limited to" Country
- for every state I created dropdown custom fields for city with "Display limited to" respective state
- for every city I created dropdown custom fields shop with "Display limited to" respective city
But this solution comes with several downsides.
It's a lot of work(but you can cheat and generate fields programatically) and it comes with performance hit as address table becomes huge.
Please Log in or Create an account to join the conversation.
- hiranyajaya
-
Topic Author
- Offline
Less
More
- Posts: 3
- Thank you received: 0
12 years 1 week ago #179816
by hiranyajaya
Replied by hiranyajaya on topic Edit shipping / billing addresses on checkout
Thank you Nicolas and korzo for your quick reply.
I managed to solve part 1 as Nicolas suggested.
However, in solving part 3, The states and cities dropdown lists still show up for all the countries even when I have used
"Display limited to" option. How do I disable the build in States as you suggested ?
Thanks in advance.
I managed to solve part 1 as Nicolas suggested.
However, in solving part 3, The states and cities dropdown lists still show up for all the countries even when I have used
"Display limited to" option. How do I disable the build in States as you suggested ?
Thanks in advance.
Please Log in or Create an account to join the conversation.
12 years 1 week ago - 12 years 1 week ago #179839
by korzo
Replied by korzo on topic Edit shipping / billing addresses on checkout
Find "address_state" in Custom fields and unpublish it.
Then create or update 2 custom fields as on screenshots.
Then create or update 2 custom fields as on screenshots.
Last edit: 12 years 1 week ago by korzo.
The following user(s) said Thank You: hiranyajaya
Please Log in or Create an account to join the conversation.
- hiranyajaya
-
Topic Author
- Offline
Less
More
- Posts: 3
- Thank you received: 0
12 years 1 week ago #180259
by hiranyajaya
Replied by hiranyajaya on topic Edit shipping / billing addresses on checkout
Thank you very much for the informative reply !
I will try that and let you know the progress
I will try that and let you know the progress
Please Log in or Create an account to join the conversation.
Time to create page: 0.055 seconds