Country and State recording in My SQL

  • Posts: 234
  • Thank you received: 4
5 years 5 months ago #307745

-- url of the page with the problem -- : draganfly.co.uk
-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.0

Hello Fab Hikashop

My customers are having their country and states saved in the mysql database with extra info, for example :

country_United_Arab_Emirates_221

How can I stop this?

Cheers
Iain

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307750

Hi,

What is saved in the addres_country column of the hikashop_address table is indeed something like that, which is the namekey of the zone. If you look in the hikashop_zone table, you can see the namekey there.
Then, the namekey is automatically converted to the name of the country when the system is displaying the address.
Changing that to save something else than the zone_namekey would be quite complex as the system hasn't been made to use something else (like the zone ID or the zone name).
Even payment plugins or shipping plugins expect the address_country to contain a zone namekey. If you change that to something else, then payment/shipping plugins might not work properly.
So I would recommend against it.

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

  • Posts: 234
  • Thank you received: 4
5 years 5 months ago #307794

HI

Thanks for that, the issue I have is that when I export the orders it puts "country_FRANCE_441" for the customers address and it looks awful. It doesn't link it to the hikashop_zones table.

Mmmmm Thoughts.

Cheers

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307796

Hi,

That's not what I have on my end. When I click on the "export" button of the orders listing in the backend, the billing_address_country, billing_address_state, shipping_address_country and shipping_address_state columns all contain the zone name and not the namekey as it is converted automatically. The only case when it doesn't happen is when the zone has been deleted in which case you get the namekey.

But maybe we're talking about something else ? Or maybe you have a bug in the orders listing export on your website ?

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

  • Posts: 234
  • Thank you received: 4
5 years 5 months ago #307841

HI

I am using CSV export as otherwise I have to click on each of the orders I wish to export and might export some twice. It didn't use to happen, I have some customers that have just "Norway" in the database.

Cheers

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307843

Hi,

I'm not sure what you mean with your sentence "I am using CSV export as otherwise I have to click on each of the orders I wish to export and might export some twice". Do you mean that you use the "export" button of the orders listing ? Or do you use something else ?
If you have just "norway" in the database for the address_country column, it could mean that this is the namekey for the zone of the norway country in the hikashop_zone table.

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

  • Posts: 234
  • Thank you received: 4
5 years 5 months ago #307905

Hello

I do not use the hikashop orders section to download the orders I use an extension called CSV export. This will download the ones that I have not already downloaded so I can import them into my system. In the country box, I have some older customers where it still says just "norway" whereas new customers it says "Country_norway_123"

Cheers
Iain

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307906

Hi,

Then you need to check with the support of that extension so that they can properly convert the country / state namekey into the name when the export is running.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum