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.
|
Ubercart |
|
|
|
||
|
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.
Re: CIF files.
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.
Re: Re: CIF files.
Ahh, thanks for pointing that out. They should all be fixed now.
Lyle wrote:Awesome, I'll get
Awesome, I'll get them added in. Please find attached cif file.
City as a combobox like zone field
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.
Re: City as a combobox like zone field
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,
So for display
Thanks Ryan,
Re: Thanks Ryan,
So for display
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.
Populating cities
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. <?php
Re: Populating cities
Thanks 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. <?php
Re: Re: Populating cities
bakyildiz, 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,
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.
Bug in original CIF files
Bug in original CIF files
drupalhizmetleri
Thanks 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. <?phpHi, old topic I know... Here is what I do: I put the code above into a new module. I use drupal 5 with ubercart 1. I make a test with the code below to try to understand the problem: <?php function uc_city_form_alter($form_id, &$form) { $form['panes']['billing']['billing_city'] = array( test2 is showing, not test1... I hope someone can help me |
|