Edit shipping / billing addresses on checkout

  • Posts: 3
  • Thank you received: 0
10 years 6 months ago #179453

-- 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.

Please Log in or Create an account to join the conversation.

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
10 years 6 months ago #179463

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.

Please Log in or Create an account to join the conversation.

  • Posts: 193
  • Thank you received: 76
10 years 6 months ago #179557

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.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
10 years 6 months ago #179816

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.

Please Log in or Create an account to join the conversation.

  • Posts: 193
  • Thank you received: 76
10 years 6 months ago #179839

Find "address_state" in Custom fields and unpublish it.
Then create or update 2 custom fields as on screenshots.

Attachments:
Last edit: 10 years 6 months ago by korzo.
The following user(s) said Thank You: hiranyajaya

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
10 years 6 months ago #180259

Thank you very much for the informative reply !
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.095 seconds
Powered by Kunena Forum
loading