I just added several .cif files I've created and thought I'd post links to them all here.
All the address formats are generic as I do not know the proper formatting for each of these countries. If someone else knows, feel free to share.
|
UbercartOne cart to rule them all... |
|
| Donate to Ubercart | ||
CIF files.
Submitted by greenSkin on Wed, 12/19/2007 - 20:17
I just added several .cif files I've created and thought I'd post links to them all here. All the address formats are generic as I do not know the proper formatting for each of these countries. If someone else knows, feel free to share.
It looks like most of them have an SQL error in the INSERT into {uc_zones}. There shouldn't be a comma after the final set of values, methinks. Also, countries that don't use zones shouldn't even have any in the zones table or their address format. Ahh, thanks for pointing that out. They should all be fixed now. Awesome, I'll get them added in. Also, countries that don't use zones shouldn't even have any in the zones table or their address format.
Some countries do not have zones. But have list of cities. I need to list them with a combobox like the zone field in checkout page. According to this field, we will calculate the shipping. And for that this field must have fix values for coding. Currently the city field on checkout page is just free textbox. Is there any approach to import and list cities as combobox or should i start from scratch. You'll have to write a custom module to handle the city listing. My recommendation is to use hook_form_alter() in a custom module to change the textfield into a select box with the options being whatever cities you want to list. Thanks Ryan, Yeah, I'd create a city table and then match those up by country ID (that's what it sounded like you needed, but match it by zone ID if you need that instead). I'm not sure if it's worth bothering with mimicking the whole .cif system or not... you could honestly just have a form with a textarea that an admin can enter city names in and have them added to the DB when the form gets submitted. Awesome, I'll get them added in. Please find attached cif file.
bakyildiz, Ryan, This is how far I got...Could someone help me to completion. Here is what I am trying to do. Trying to change the "textfield" in uc_cart_checkout_form into a "select" field and populate it with a few cities. For testing I added a check box I was able to change the title for the "city" now I want it to be of type select and be populated with City1,City2, etc... but was unable to make it happen. Below is the code. <?phpThanks uberuser, you give me good start point. Here is next step. This is just for one country approach. That will replace the city textfield with select. Just fill your city list to _uc_city_list() method. Also the select can be populated from database. <?phpbakyildiz, thank you for completing it. Could you tell me how to use the db option. I mean how do I create a table and insert the cities (really handicapped here). I am assuming that we would be able to pull up the cities based on the country and zone even if it leads to choosing the city after the country and zone. Hi, CREATE TABLE {uc_cities} (While the cities are not changing often, there is no need to have management interface. May be we can find more simple way to solve this issue.
|
|
Joined: 11/06/2007