4 replies [Last post]
snepa's picture
Offline
Joined: 01/15/2009
Juice: 38
Was this information Helpful?

I'm using Drupal 6.10 and UC 2.0-beta5. I am testing the checkout area and discovered that the "State" pull-down menus for billing and shipping addresses list the U.S. states/territories and Canadian provinces in duplicate.

#1 Is this a problem?
#2 Where should I look to fix it?
#3 Could it interfere with the shipping conditions or UC's ability to accurately quote a shipping rate.

I have created a number of shipping methods (7) - all flat rate. When I created the shipping conditions initially I know the states were only listed once.

Now, a few weeks later, they show up in duplicate at checkout and when setting the shipping conditions.

I can't remember when I updated to beta5 and if that was the change or not.

uc_zones table in the mysql database seems to be intact.

Thanks,

snepa

snepa's picture
Offline
Joined: 01/15/2009
Juice: 38
Re: States double listed in pull-down menu for addresses at chec

I also recently installed the very-much-in-development uc_edi module for Drupal 6. Could that have contributed?

snepa

itscheez's picture
Offline
Joined: 07/17/2010
Juice: 8
Re: States double listed in pull-down menu for addresses at chec

i'm running uc 2.2, latest drupal 6.17 release, all modules up to date and am getting the duplicate states issue as well for the checkout process. this doesn't seem to produce an error but it does expose the ecommerce system as "flawed" to customers. is no one else getting this issue?

itscheez's picture
Offline
Joined: 07/17/2010
Juice: 8
Re: Re: States double listed in pull-down menu for addresses at

the simple fix was to change uc_store.module, line 1275 from

$result = db_query("SELECT * FROM {uc_zones} WHERE zone_country_id = %d ORDER BY %s", $country_id, ($display == 'code') ? 'zone_code' : 'zone_name');

to

$result = db_query("SELECT * FROM {uc_zones} WHERE zone_id < 79 && zone_country_id = %d ORDER BY %s", $country_id, ($display == 'code') ? 'zone_code' : 'zone_name');

i didn't want to delete duplicate records since zone_id for duplicate records have probably been inserted into related tables... i don't know what caused the duplicate zone_name insertions - will this be patched in upcoming releases?

hedac's picture
Offline
Joined: 12/14/2007
Juice: 144
Re: States double listed in pull-down menu for addresses at chec

I also have duplicate records on uc_zones now.. but I don't know what could have caused this...
I don't know if I should remove the duplicate records on the database.
what are the related tables to uc_zones that could affect if I remove duplicated entries?