osCmax v2.5 User Manual
Results 1 to 2 of 2

Create Account Feature, missing State field

This is a discussion on Create Account Feature, missing State field within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, How can I add the state field to my Create Account located at: http://www.roseysmall.com/catalog/create_account.php I don't know where to ...

      
  1. #1
    Lurker
    Join Date
    Jan 2004
    Posts
    1
    Rep Power
    0


    Default Create Account Feature, missing State field

    Hi,

    How can I add the state field to my Create Account located at: http://www.roseysmall.com/catalog/create_account.php I don't know where to find this and I'm afraid to mess it up if I touch it (like a few other things I've broken).

    Thank you, yet again, for your help.

    Rose

  2. #2
    New Member
    Join Date
    Jan 2004
    Posts
    5
    Rep Power
    0


    Default Re: Create Account Feature, missing State field

    Quote Originally Posted by rose1212
    Hi,

    How can I add the state field to my Create Account located at: http://www.roseysmall.com/catalog/create_account.php I don't know where to find this and I'm afraid to mess it up if I touch it (like a few other things I've broken).

    Thank you, yet again, for your help.

    Rose
    I just did this a couple of weeks ago and while I do not remember exactly what I changed I am pretty sure it was this part of the code:


    if (ACCOUNT_STATE == 'true') {
    $zone_id = 0;
    $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'");
    $check = tep_db_fetch_array($check_query);
    $entry_state_has_zones = ($check['total'] > 0);
    if ($entry_state_has_zones == true) {
    $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) . "%')");
    if (tep_db_num_rows($zone_query) == 1) {
    $zone = tep_db_fetch_array($zone_query);
    $zone_id = $zone['zone_id'];
    } else {
    $error = true;

    to this:

    if (ACCOUNT_STATE == 'true') {
    $zone_id = 0;
    $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '223" . (int)$country . "'");
    $check = tep_db_fetch_array($check_query);
    $entry_state_has_zones = ($check['total'] > 0);
    if ($entry_state_has_zones == true) {
    $zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '223" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')");
    if (tep_db_num_rows($zone_query) == 1) {
    $zone = tep_db_fetch_array($zone_query);
    $zone_id = $zone['zone_id'];
    } else {
    $error = true;



    You can also find a good thread on the topic at:

    http://forums.oscommerce.com/index.php?showtopic=53879

    Hope this helps

    Richard

Similar Threads

  1. Missing Create and account button..
    By hdgajjar in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 04-10-2006, 04:57 PM
  2. State List Missing on Signup form
    By zTech in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 09-27-2004, 06:53 PM
  3. State list missing on Create Account Page
    By zTech in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 09-13-2004, 08:15 AM
  4. account page - state drop down
    By kodersoftware in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 05-28-2004, 09:31 AM
  5. Create Account,Checkout,My Account, Language Pictures probs!
    By Mikey in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 03-08-2004, 10:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •