This is a discussion on User registration problem with State Abbreviation!!! within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; User registration problem with State Abbreviation!!! How do you get OSCommerce to either allow the abbreviation or show the dropdown ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| User registration problem with State Abbreviation!!! How do you get OSCommerce to either allow the abbreviation or show the dropdown list by default. Whenever I setup an account, if I use the abbreviation and submit it, it will throw out an error and then give you a drop-down list as an option. This is kinda weird. I found a contrib for this, but the file to replace doesn't exist in OSCommerce (it may have been designed for an older version). Contrib link: http://www.oscommerce.com/community/contributions,990 Please tell me of any suggestions!!! |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| Actually I found a code level workaround. This allows you to enter either the abbreviation or the full state name and it is not case sensitive... Code: //This is the old query, the new one is posted below, this adjustment allows state abbreviations...
//$zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')");
//This is the new code that is more leaniant
$zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name = '" . tep_db_input($state) . "' OR zone_code = '" . tep_db_input($state) . "')");
|
|
#3
| |||
| |||
| Ok, I have now packaged this into a contribution. This contribution can be found at: http://www.oscommerce.com/community/contributions,2316 It explains everything in detail.
__________________ I have no name, I am only PhatGOD! |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with Authorize.net mod after adding new user ID and | cpeters | osCMax v1.7 General Mods Discussion | 2 | 04-27-2005 09:48 AM |
| installation problem, hangs after database server,user name | splatacat | osCMax v1.7 Installation | 2 | 12-23-2004 06:34 AM |
| Uploaded product Images and user.group account problem | red_fraggle | osCMax v1.7 Installation | 0 | 11-06-2004 01:02 PM |
| user tracking with admin 1.35 problem | robroymedia | osCMax v1.7 General Mods Discussion | 2 | 10-11-2004 01:03 AM |
| affiliate registration problem | battleaxe | osCMax v1.7 Discussion | 10 | 06-21-2004 10:02 PM |