Forums / Upgrading from 1.3.x to 1.3.9 / Issues with State Field in Create Account

Issues with State Field in Create Account

Locked

Started by heavenlynights on 22 Sep 2006, 3:12 AM · Views: 5,711

Results 1 to 20 of 20
This thread is locked. New replies are disabled.
22 Sep 2006, 3:12 AM
#1
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Issues with State Field in Create Account

G'Day everyone

I am testing my 1.3.5 upgrade from 1.3.2. I am having issues with the field State in Customer info section of the create account page.

PROBLEM.

When i select state from the drop down box, and fill in all other information, then press submit, i receive this error message in a pop up box

"errors have occured please make the following corrections"

but it doesn't give me any indication of what needs to be corrected.

I have also noticed that when choosing difference countries, it doesn't give me any options in the drop down box for state accept for the US.

Now I uploaded my zones customised php file to my overrides folder, maybe this has something to do with that.

I have two other modified files from version 1.3.2 installed on the 1.3.5 cart. These are includes>modules>create_account.php and include>templates>template_default>templates>tpl_modules_create_account.tpl.

Both of these modified files have been placed in my overides folder.

I did compare these modified file with the new 1.3.5 files and thought that I had made the required changes to the modified file to comply with 1.3.5, but obviously I have missed something, but I don't know what.

I am a bit at a loss and don't know much about code.

If anyonw would be kind enough to help, I can either send you the zipped files via email or post them on this thread.

Cheers and TIA

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

22 Sep 2006, 6:26 PM
#2
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Issues with State Field in Create Account

got an url we can look at?

PCI Certified Web Hosting - ControlScan, Security Metrics (Platinum Partner), McAfee, TrustKeeper
Business Class Web Hosting - Linux and cPanel Powered

22 Sep 2006, 11:34 PM
#3
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

Thanks knuckle

Heres my link

Test site

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

22 Sep 2006, 11:43 PM
#4
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

Ohh btw knucles

I decided to overide both these files with the v1.3.5 files and delete the customised files, I think there were 3 in total to see if that made a difference. but it didn't. In fact I have now lost the dropdown box for state.

So the files that are being used now are the original 1.3.5 files.

Hope that makes sense!

heavenlynights:

I have also noticed that when choosing difference countries, it doesn't give me any options in the drop down box for state accept for the US.

I have two other modified files from version 1.3.2 installed on the 1.3.5 cart. These are includes>modules>create_account.php and include>templates>template_default>templates>tpl_modules_create_account.tpl.

Both of these modified files have been placed in my overides folder.

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

22 Sep 2006, 11:44 PM
#5
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Issues with State Field in Create Account

I do not see a dropdown box only standard.

Is it turned on?

PCI Certified Web Hosting - ControlScan, Security Metrics (Platinum Partner), McAfee, TrustKeeper
Business Class Web Hosting - Linux and cPanel Powered

22 Sep 2006, 11:48 PM
#6
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

Where do I turn it on?

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

22 Sep 2006, 11:49 PM
#7
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

Nevermind found it. and no it was not. I will change and see what happens

heavenlynights:

Where do I turn it on?

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

22 Sep 2006, 11:49 PM
#8
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Issues with State Field in Create Account

ok, lol, question is this, do you mean the state field or the country field?

PCI Certified Web Hosting - ControlScan, Security Metrics (Platinum Partner), McAfee, TrustKeeper
Business Class Web Hosting - Linux and cPanel Powered

22 Sep 2006, 11:55 PM
#9
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

Ok I meant STATE. I turned it on and tried to create an account and same thing. Errors.

I now noticed that the dropdown box does not give me any options to choose state unless I am in the US. for instance if I choose Australia, I don't get options for state, yet i have states for australia set up in my zones

Does that make sense?

Hows about you try and create an account and see what happens!

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

23 Sep 2006, 12:07 AM
#10
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Issues with State Field in Create Account

The account was created just fine.
However you have to choose your country then the state first, but again that could because you have it default on australia.

But it is possible that you do not have this "I have read and agreed to your privacy statement. " checked when creating account and that could cause the error, have you created account and checked that box?

if not try that and see if that does the job.

Rob

PCI Certified Web Hosting - ControlScan, Security Metrics (Platinum Partner), McAfee, TrustKeeper
Business Class Web Hosting - Linux and cPanel Powered

23 Sep 2006, 12:08 AM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Issues with State Field in Create Account

We will have a fix out soon for some of these quirks ...

Be sure if you are using the dropdown for the states that you have these defined ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2006, 12:14 AM
#12
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

It's not the privacy issue, as I always check that box.

I thought that I might change the default country to US but now have another problem

Can login to admin but everytime I try and open up something, I keep getting bumped back to the login page :wacko:

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

23 Sep 2006, 12:20 AM
#13
knuckle_101 avatar

knuckle_101

Totally Zenned

Join Date:
Dec 2005
Location:
Cincinnati Ohio
Posts:
1,034
Plugin Contributions:
3

Re: Issues with State Field in Create Account

firewall maybe, denying the cookie issue?

Does the site work on the standard state field?

Ajeh posted the fixes will be released soon. So if the standard field works for now I would jsut use that.

There has been reported issues in the recent past due to the state problem, so its not a rare thing.

or try this delete the following from the copy of tpl_modules_create_account.php

<label class="inputLabel" for="state"><?php echo $state_field_label; ?></label>
<?php
echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"' . $status_state_disabled);
if (zen_not_null(ENTRY_STATE_TEXT)) echo ' <span class="alert">' . ENTRY_STATE_TEXT . '</span>'; 
if ($flag_show_pulldown_states == false) {
echo zen_draw_hidden_field('zone_id', $zone_name);
}
?>

It should start around line 92 or so. Remember to made backup of the file before deleting anything just in case.

be sure to backup the file before doing so

PCI Certified Web Hosting - ControlScan, Security Metrics (Platinum Partner), McAfee, TrustKeeper
Business Class Web Hosting - Linux and cPanel Powered

23 Sep 2006, 12:21 AM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Issues with State Field in Create Account

Can you post your /admin/includes/configure.php without the username or password?

If you close all browser sessions and clear your cache and cookies does this fix it?

Are you able to get to the Configuration ... Sessions? If so what are they?

If you turn off the Enable secure in the /admin/includes/configure.php does this temporarily fix this issue so you can get to the Session settings?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Sep 2006, 12:46 AM
#15
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

I cleared all cache file, temp files and history and am now able to use my admin. I turned of the drop down box for state and it still does not want work. Message I get is

errors have occured while processing your form please make the following corrections *

Ajeh:

Can you post your /admin/includes/configure.php without the username or password?

As below

<?php
//
/**
 *
 * @package Configuration Settings
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */


// Define the webserver and path parameters
  // Main webserver: eg, http://localhost - should not be empty for productive servers
  // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
  // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
  // HTTP_CATALOG_SERVER is your Main webserver: eg, http://www.yourdomain.com
  // HTTPS_CATALOG_SERVER is your Secure webserver: eg, https://www.yourdomain.com
  /* 
   * URLs for your site will be built via:  
   *     HTTP_SERVER plus DIR_WS_ADMIN or
   *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or 
   *     HTTP_SERVER plus DIR_WS_CATALOG or 
   *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
   * ...depending on your system configuration settings
   */
  define('HTTP_SERVER', 'http://www.heavenlynightslingerie.com.au');
  define('HTTPS_SERVER', 'https://secure.correctdns.com/~heavenly');
  define('HTTP_CATALOG_SERVER', 'http://www.heavenlynightslingerie.com.au');
  define('HTTPS_CATALOG_SERVER', 'https://secure.correctdns.com/~heavenly');

  // Use secure webserver for catalog module and/or admin areas?
  define('ENABLE_SSL_CATALOG', 'true');
  define('ENABLE_SSL_ADMIN', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_ADMIN', '/v1.3.5/admin/');
  define('DIR_WS_CATALOG', '/v1.3.5/');
  define('DIR_WS_HTTPS_ADMIN', '/v1.3.5/admin/');
  define('DIR_WS_HTTPS_CATALOG', '/v1.3.5/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
  define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_ADMIN', '/home/heavenly/public_html/v1.3.5/admin/');
  define('DIR_FS_CATALOG', '/home/heavenly/public_html/v1.3.5/');

  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', '');
  define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
  define('DB_SERVER_USERNAME', 'XXXX');
  define('DB_SERVER_PASSWORD', 'XXXX');
  define('DB_DATABASE', 'XXXXX');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'file'); 
  define('DIR_FS_SQL_CACHE', '/home/heavenly/public_html/v1.3.5/cache');

Are you able to get to the Configuration ... Sessions? If so what are they?

Yes as below

Session Directory /home/heavenly/public_html/catalogue/cache
Cookie Domain True
Force Cookie Use False
Check SSL Session ID False
Check User Agent False
Check IP Address False
Prevent Spider Sessions True
Recreate Session False
IP to Host Conversion Status true

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

23 Sep 2006, 2:01 PM
#16
heavenlynights avatar

heavenlynights

Zen Follower

Join Date:
Jan 2006
Location:
Australia
Posts:
303
Plugin Contributions:
0

Re: Issues with State Field in Create Account

hey again!!

Given that I had no luck with fixing this issue, i decided to start all over again. This time I copied my entire 1.3.2 live cart over to another folder on the root of my site.

i then installed my database from my live site over to a new database and made the adjustments to configure files and so on. That all went fine :smile:

I then upload the new 1.3.5 files to the new folder containing the copied live site and over wrote the old files. That went fine!

I then ran the zc_install file on the newly created folder containing my live cart, which I will now refer to as my test site!!

I chose update database as I was only updating the live database which was copied to a new empty database. So far so good.

So now I am in the process of testing everything,

first test - create account. fail (sought of)

Problem:

I receive this message when I hit the submit button to create an account -

1062 Duplicate entry '53' for key 1
in:
[insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('53', '0', now())]

But even though this error page shows up, the account is still created.

I have tried to create 3 separate accounts and they all end up with the same results

It is obviously a database problem, but I am not sure where to look or what in the database needs attention!!

Is there anyone that can help! please!

URL to Test Site

Cheers Heavenlynights
http://www.heavenlynightslingerie.com.au
Warning: Adult Content - Zen 1.3.8a

27 Sep 2006, 7:55 PM
#17
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: Issues with State Field in Create Account

OK guys I had the problem and I don't any more here is my solution
I replaced the block of code in tpl_modules_create_account.php lines 90-99 w/

    } elseif ($flag_show_pulldown_states == false) {
?>

<label class="inputLabel" for="state"><?php echo $state_field_label; ?></label>
<?php
    echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"' . $status_state_disabled);
    if (zen_not_null(ENTRY_STATE_TEXT)) echo ' <span class="alert">' . ENTRY_STATE_TEXT . '</span>'; 
    if ($flag_show_pulldown_states == false) {
      echo zen_draw_hidden_field('zone_id', $zone_name);
    }
    }

please note that this will add an extra line so the replacement is going from lines 90-100
its working for me
JOsh

JOsh Beauregard
Sanguis Development

27 Sep 2006, 11:29 PM
#18
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: Issues with State Field in Create Account

Be sure that when you are testing this that you first try to submit the form without filling in the STATE field. Then fill it in and try to submit again.

This is when the problem comes and shows you both the Text box AND dropdown for state. I thought I had it fixed at one point by commenting out the drop down code too until i tried it, then it hid the drop down but still asked me to fill it in which of course didnt work.

6 Oct 2006, 4:28 PM
#20
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: Issues with State Field in Create Account

ghome:

Be sure that when you are testing this that you first try to submit the form without filling in the STATE field. Then fill it in and try to submit again.

This is when the problem comes and shows you both the Text box AND drop down for state. I thought I had it fixed at one point by commenting out the drop down code too until i tried it, then it hid the drop down but still asked me to fill it in which of course didnt work.
yeah had to take that in to consideration, but forgot to, when I tested it it worked, w/o my even consideration. I think that if I had realised it it would not have been such a simple patch, form me.
GLAD IT WORKED FOR YA, maybe I have a half returned the favor for the tabbed lite mod.

JOsh Beauregard
Sanguis Development