KonaKart Community Forum

General Category => Miscellaneous => Topic started by: David on October 05, 2007, 08:29:14 am

Title: Confusion with names
Post by: David on October 05, 2007, 08:29:14 am
Hi, I am adding new clients throw the web service API.

To add a new zone I must find it with methods like getZone and objects like AdminZoneSearch or AdminZoneSearchResult. But when I want to add it to KonaKart I must use a method named setState  ???

I think it's a bit confusing, maybe it sould be better if you change the name of the method to setZone (I needed 30 minutes to see it :D)

Regards

David
Title: Re: Confusion with names
Post by: Brian on October 05, 2007, 09:49:36 am
Hi David,

They're different names for different things.

QuoteTo add a new zone I must find it with methods like getZone and objects like AdminZoneSearch or AdminZoneSearchResult.


To add a new Zone you would use insertZone on the Admin API.


QuoteBut when I want to add it to KonaKart I must use a method named setState


Yes, that's for setting the State.   If that State is recognised for the specified country, KonaKart will set the Zone that matches that State.  If it isn't recognised,  and the specified country has zones, you will get an exception.  It's important that users get the right zone set for tax calculations that may be defined against the zone.  It's also useful for ensuring that all State fields are consistent (eg. you get Alabama and not ALABAMA).
If you set the State to ("WhateverYouLike") and the country specified does not have zones defined, the state field will be set but not the zone.

Brian
Title: Re: Confusion with names
Post by: paolo on October 05, 2007, 10:24:02 am
Hi David,

If what you are doing is migrating customers from the ERP application and you know that they are Spanish users; what I would do is to populate the KonaKart zones with the Spanish zones through a DB script that you can probably get as an osCommerce contribution. Once you've done that, you should try importing the customers.

KonaKart will automatically attempt to match the state of the customer with the zone in the DB and if it finds a match it will store the zoneId in the address table for that customer rather than the name of the state. If you get an exception you will have to investigate because it means that the state you are attempting to import, is not one that you have in your DB.

-Paolo
Title: Re: Confusion with names
Post by: bubba64 on February 02, 2009, 05:16:15 am
The easiest solution I found is to edit the country name in the Locations/Taxes in the KonaKartAdmin and add a ' ' space in front of the country name and it will move that country to the top. Easy, easy.