Zen Cart Logo
Forums / All Other Contributions/Addons / Additional Customers Fields

Additional Customers Fields

Locked

Views: 88,142

Results 241 to 260 of 491
This thread is locked. New replies are disabled.
15 Jun 2007, 3:24 PM
#241
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Additional Customers Fields

Also, I have noticed even though the user gets this error on there side the command still goes through and they create an account. If the customer backs up a page it shows them logged in and if they click on "view or change account information" everything is blank, yet on my side I see the new customer and if I click on there account I get this error:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/customers.php on line 1213

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/customers.php on line 1213

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/customers.php on line 1215

Warning: reset() [function.reset]: Passed variable is not an array or object in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/includes/classes/object_info.php on line 30

15 Jun 2007, 4:00 PM
#242
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

This problem seem to variate depending on mySQL versions.

In your includes/modules/<your_template>/create_account.php file,

I cannot reproduce this problem when using mySQL v4.x.

Very well. For now,

replace:

$sql = "update " . TABLE_CUSTOMERS . "
               set customers_default_address_id = '" . (int)$address_id . "', " . $additional_sql . "
               where customers_id = '" . (int)$_SESSION['customer_id'] . "'";

with:

$sql = "update " . TABLE_CUSTOMERS . "
               set customers_default_address_id = '" . (int)$address_id . "'" . $additional_sql . "
               where customers_id = '" . (int)$_SESSION['customer_id'] . "'";

This should fix the problem. I will try to find a universal fix for both mySQL versions eventually.

Also, I have noticed even though the user gets this error on there side the command still goes through and they create an account. If the customer backs up a page it shows them logged in and if they click on "view or change account information" everything is blank, yet on my side I see the new customer and if I click on there account I get this error:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/customers.php on line 1213

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/customers.php on line 1213

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/customers.php on line 1215

Warning: reset() [function.reset]: Passed variable is not an array or object in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/admin/includes/classes/object_info.php on line 30

Which version of PHP are you using again ? I surely can't reproduce this problem . . .

15 Jun 2007, 7:08 PM
#243
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Additional Customers Fields

I am using PHP 2.8. I changed includes/modules/<your_template>/create_account.php file as instructed earlier and that fixed that problem. But, now I get this error on the customer side:

Fatal error: Call to undefined function get_support_ticket_tables() in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/includes/modules/classic/create_account.php on line 322

and this error on the admin side:

1054 Unknown column 'c.customers_default_address_id' in 'on clause'
in:
[select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id, c.customers_email_format, c.customers_group_pricing, c.customers_authorization, c.customers_referral, ac.field_name, ac.field_status from customers c, customers_additional ac left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '6']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I have restored my TABLE_CUSTOMERS to a previous version and I still get this message.

15 Jun 2007, 7:22 PM
#244
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Additional Customers Fields

I was just wondering do I need to have phpBB installed, because I said no when installing Zen Cart?

15 Jun 2007, 7:46 PM
#245
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

I am using PHP 2.8.

:blink::blink::blink::blink:

Just hope you have the wrong line from your server info under the admin section there ... otherwise ... welcome to the past !

Fatal error: Call to undefined function get_support_ticket_tables() in /www/freehostingnow.com/c/o/m/commtech/htdocs/catalog/includes/modules/classic/create_account.php on line 322

Yikes !! - my fault. :shocking:

In the same file,

remove that block:

if (!get_support_ticket_tables($_SESSION['customer_id'], 'check_if_support_ticket_tables_exists')) {
    get_support_ticket_tables($_SESSION['customer_id'], 'create_support_ticket_tables');
    } // End of if statement.

This has absolutely nothing to do in there. Thanks for the catch. Package instantly updated.

I have restored my TABLE_CUSTOMERS to a previous version and I still get this message.

And ... do you see the customers_default_address_id field inside your backup table ? ... :huh:

15 Jun 2007, 7:48 PM
#246
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

Additional note to the above: Make sure to download the update from my site until the downloads refreshes my latest upload (in case you'd need it - in this case you don't since you already have the patch above).

15 Jun 2007, 8:01 PM
#247
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Additional Customers Fields

WOW!!!!! Thanks, It is finally wokring on the customer side! But, I still get the same error on the admin side saying:

1054 Unknown column 'c.customers_default_address_id' in 'on clause'
in:
[select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id, c.customers_email_format, c.customers_group_pricing, c.customers_authorization, c.customers_referral, ac.field_name, ac.field_status from customers c, customers_additional ac left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '6']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I have checked my database TABLE_CUSTOMERS and customers_default_address_id does exist. I don't know why all of the fields have a letter in fromt of them on the error (its in the code too).

The 2.8 is the version of my phpAdmin, I am not sure what version of php I am using.

15 Jun 2007, 8:10 PM
#248
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

The 2.8 is the version of my phpAdmin, I am not sure what version of php I am using.

Go to your admin - > tools - > server info and copy & paste your:

  • PHP Version
  • mySQL Version
  • Zen-Cart Version

if you're unsure of the specs you currently have. PHPMyAdmin should not be an issue for handling this MOD (unless it is a pretty old version but it ain't the case on this one). :wink2:

15 Jun 2007, 8:24 PM
#249
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Additional Customers Fields

PHP Version = 5.1.6
Zen-Cart Version = 1.3.7
MySQL Version = 5.0.27

Also, with the admin error I posted above, I only get that message when I try to edit, delete or email a customer from the admin>customers

15 Jun 2007, 8:29 PM
#250
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

Also, with the admin error I posted above, I only get that message when I try to edit, delete or email a customer from the admin>customers

Both, PHP and mySQL, versions are the 5th and, again, has only been tested under the 4th. However, in your admin/customers.php file,

find:

$sql_update = "UPDATE " . TABLE_CUSTOMERS . " SET " . zen_db_output($additional_sql) . " WHERE customers_id = " . (int)$customers_id;
        $db->Execute($sql_update);
        // End of Additional Customers Fields.

Comment it out:

/*$sql_update = "UPDATE " . TABLE_CUSTOMERS . " SET " . zen_db_output($additional_sql) . " WHERE customers_id = " . (int)$customers_id;
        $db->Execute($sql_update);*/
        // End of Additional Customers Fields.

Then, go back to your admin -> customers page. Redo your operation you were telling me above. If you save the changes, will the error still appear ?

15 Jun 2007, 8:42 PM
#251
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Additional Customers Fields

I did as you instructed above and I still get the same message!

15 Jun 2007, 8:59 PM
#252
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

In that case, it is NOT related with my MOD since this SQL update statement is the only one involved for validating each variables that are NOT part of the core fields array as it does the modifications to your TABLE_CUSTOMERS table. By commenting it out, it should not be possible to have further writings to the table - period.

16 Jun 2007, 7:26 AM
#253
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Additional Customers Fields

Although it's better to use PHP v5.2.1 or higher, I believe that using any version of mySQL v5.x is the root of the problem. It has been to known to screw up many databases. Not sure why, but perhaps the newer mySQL is not backwards compatible with some things?

16 Jun 2007, 12:09 PM
#254
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

Although it's better to use PHP v5.2.1 or higher, I believe that using any version of mySQL v5.x is the root of the problem. It has been to known to screw up many databases. Not sure why, but perhaps the newer mySQL is not backwards compatible with some things?

If things haven't changed so far, PHP v5.x has not yet been recognized as a flexible version neither mySQL v5.x. However, I agree with you regarding the root of the problem since some bugs were reported on mySQL manufacturer's web site regarding those error reports.

16 Jun 2007, 6:46 PM
#255
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

Update:

A new version has been released on my site. For those who needs to upgrade, simply follow upgrade and changelog documentation (very small update I might add).

17 Jun 2007, 3:12 PM
#256
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

Update:

Package updated from my site:

  • Switched 'your_template' folder name under each modulated folders rather than leaving them default. This will give a better example towards users who would like to learn how to use the overrides with this cart.
18 Jun 2007, 3:54 AM
#257
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Additional Customers Fields

Does anybody know how to fix this error below because when ever I try to delete or edit a customers account from the admin side I get this error and unless I can fix it I am going to have to delete the MOD! Here's the error:

1054 Unknown column 'c.customers_default_address_id' in 'on clause'
in:
[select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id, c.customers_email_format, c.customers_group_pricing, c.customers_authorization, c.customers_referral, ac.field_name, ac.field_status from customers c, customers_additional ac left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '9']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

18 Jun 2007, 11:22 AM
#259
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Additional Customers Fields

c.customers_id and c.customers_id = '9']

When I think of it, since, again, this has nothing to do with the MOD, go to your phpmyadmin and see the customers_id number 9 and see if there are any readings from your customers_default_address_id. I'd rather think that this field is simply empty - which is why you're seeing this error.

18 Jun 2007, 9:00 PM
#260
rbepple avatar

rbepple

New Zenner

Join Date:
Jun 2007
Posts:
71
Plugin Contributions:
0

Re: Additional Customers Fields

Just another error for me! I am getting this error when I try to create an account on the customer side. I create a additional field named "customers_age" and labeled it "Sales Representative: " and a pull down menu with contents of "'None', 'Mel Kimmel', 'Boyd Thomas'". If I disable the additional field the customer form works. I enable it then I get this error on the customer side:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'customers_age = 'None', customers_age = 'None' where customers_i' at line 2
in:
[update customers set customers_default_address_id = '22'customers_age = 'None', customers_age = 'None' where customers_id = '22']