osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

User registration problem with State Abbreviation!!!

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-23-2004, 06:09 AM
osCMax Testing Team
 
Join Date: Jul 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pthurmond
Default User registration problem with State Abbreviation!!!

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!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 07-30-2004, 12:16 PM
osCMax Testing Team
 
Join Date: Jul 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pthurmond
Default

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) . "')");
The last line of code is what I used to fix it in create_account.php, which is located in the root of the catalog. The code itself is on or about line 135. I use OSCommerce v1.8 MS2-MAX. I got the basics of the code from that contribution I talked about in my first post, but had to adjust it some because the code was 2 years old and not correct with the current version. However the code I posted in this post is correct and works fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 08-05-2004, 12:15 PM
osCMax Testing Team
 
Join Date: Jul 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pthurmond
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 08:10 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax