How to add/update user addresses from external source

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
7 years 11 months ago #258182

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.0.13
-- Browser(s) name and version -- : chrome

I'm maintaining both shipping and billing addresses within Community Builder, as well as several other custom fields that are in CB but also are in HS.

What is the best way to manage the interaction of addresses?

Is there any sort of API that I can use to push addresses over to HS via PHP code?
Or should I just insert it manually into the _address table?

Also, is there any way that I can attach some PHP code within HS so that if someone updates their address I can manually push that data back over to CB?

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
7 years 11 months ago #258183

And is there any way to indicate (either via API or by values in the data table) which address should be used as the default shipping address and which should be the default billing address?

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
7 years 11 months ago #258188

Hi,

1. When pushing addresses to HikaShop, you can directly add them in hikashop_address. It's the simplest.

2. To push the data the other way when the customer modify the address in HikaShop or create a new one or delete one, you can develop a small plugin of the group "hikashop" and implement the "after" triggers of the address API in it:
www.hikashop.com/support/documentation/6...ntation.html#address

3. If you look at the hikashop_address table, you can see the address_default column which enables you to select the main address of the customer which will be used as default address for the billing and the shipping. There is no system for now to have different default addresses for shipping and billing.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
7 years 11 months ago #258239

That is WONDERFUL.
Guess I'll be coding a plugin over the holidays.

Thanks!

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

  • Posts: 1
  • Thank you received: 0
7 years 6 months ago #268504

Hi cpaschen,
I have the same need as you. Did you success to do it ?
If yes, can you indicate me exactly what you did ?
Thank's a lot
Best regards

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

Time to create page: 0.077 seconds
Powered by Kunena Forum