• Welcome to KonaKart Community Forum. Please login or sign up.
 

Add new States/Provinces and Cities

Started by BruceLee, October 05, 2007, 11:20:04 pm

Previous topic - Next topic

BruceLee

Hi Team,

It's good that KK supports list of Countries and states/provinces for some countries on the registration page. However,
1) How can I add provinces for a country that doesn't have state/province list now? I see the Country table in database, but cannot find state/province table.
How does the Country and State selection work in RegisterCustomerBody.jsp?
What do you think to use CountryTag lib rather that a Country table in database?
2) It's nice that, on registration page, when user selects a Country, the State/Province edit box auto changes to dropbox for that country.
How can we do that if we don't use Struts (We use WebWork2)? Is AJAX or some other techniques involved?

Thanks in advance!
-Bruce

trevor

Hi Bruce,

QuoteHow can I add provinces for a country that doesn't have state/province list now? I see the Country table in database, but cannot find state/province table.


These are called "zones".   One of the advantages of being database-compatible with osCommerce is that we can take advantage of many of the osCommerce "contributions".  On their site you will find contributions of zones for just about every country.  (These contributions are basically SQL statements that insert the zones for a particular country or region).
You can also use our Admin App to add or edit them manually.

QuoteHow does the Country and State selection work in RegisterCustomerBody.jsp?


Does this help explain it:   http://www.konakart.com/forum/index.php/topic,7.msg14.html#msg14

QuoteHow can we do that if we don't use Struts (We use WebWork2)? Is AJAX or some other techniques involved?


I don't know WebWork well enough but there must be a way.  There's no AJAX on the registration page but it could be enhanced to use AJAX to make the client more dynamic.
The client implementations are really your choice;  you have complete freedom to do whatever is appropriate for your own application.

Trevor

paolo

2) It's nice that, on registration page, when user selects a Country, the State/Province edit box auto changes to dropbox for that country.
How can we do that if we don't use Struts (We use WebWork2)? Is AJAX or some other techniques involved?

This functionality has nothing to do with struts. The way that it works is that we detect an exception from the engine when we try to register (eng.registerCustomer()) and then we refresh the page with a drop list of states instead of a simple entry field.