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

Additional Customers Fields

Locked

Views: 88,141

Results 261 to 280 of 491
This thread is locked. New replies are disabled.
18 Jun 2007, 9:01 PM
#261
rbepple avatar

rbepple

New Zenner

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

Additional Customers Fields

it looks like this syntax is missing the "d" in where customers_i' at line 2. But, I don't know.

18 Jun 2007, 9:06 PM
#262
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

update customers set customers_default_address_id = '22'**,**customers_age = 'None',

Probably a mySQL v5 error. In your admin/customers.php file,

replace:

if (isset($_POST[$key]) && isset($table_fields[$key]) && eregi("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,6}$", zen_db_prepare_input($_POST[$key])) && zen_validate_email($_POST[$key])) {                              
                  $additional_sql .= "$key = '".zen_db_prepare_input($_POST[$key])."', ";
              } elseif (isset($_POST[$key]) && isset($table_fields[$key])) {
                  $additional_sql .= "$key = '".zen_db_prepare_input(strip_tags($_POST[$key]))."', ";          
              }

with:

if (isset($_POST[$key]) && isset($table_fields[$key]) && eregi("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,6}$", zen_db_prepare_input($_POST[$key])) && zen_validate_email($_POST[$key])) {                              
                  $additional_sql .= ", $key = '".zen_db_prepare_input($_POST[$key])."', ";
              } elseif (isset($_POST[$key]) && isset($table_fields[$key])) {
                  $additional_sql .= ", $key = '".zen_db_prepare_input(strip_tags($_POST[$key]))."', ";          
              }

This should fix the issue for mySQL v5.

18 Jun 2007, 9:07 PM
#263
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

it looks like this syntax is missing the "d" in where customers_i' at line 2. But, I don't know.

No, this is simply a cut report to simply show you as close as possible where the error would be.

19 Jun 2007, 1:01 AM
#264
rbepple avatar

rbepple

New Zenner

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

Re: Additional Customers Fields

OK this is where I am at. I have replaced all the codes as instructed earlier and everything is working great on the admin side. But, when I try to create a account on the customer side it gives me this error.

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 'sales_rep = 'Mel Kimmel', sales_rep = 'Mel Kimmel' where customer' at line 2
in:
[update customers set customers_default_address_id = '30'sales_rep = 'Mel Kimmel', sales_rep = 'Mel Kimmel' where customers_id = '30']

The account is still created but cannot be edited or removed, I have to manually go into the database and remove it.

To me it looks like there is a comma missing between '30' and sales_rep, but I don't know.

19 Jun 2007, 3:14 AM
#265
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

I cannot reproduce this error. It looks like your server handles these fields into different ways. It would probably require you some custom codings. If interested, you can always send me an email, as a custom contract, and I will see what I can do.

19 Jun 2007, 11:36 AM
#266
mattallam avatar

mattallam

New Zenner

Join Date:
Nov 2006
Location:
Bedfordshire, UK
Posts:
27
Plugin Contributions:
0

Re: Additional Customers Fields

Could someone please help! I have installed the above mod but i have a problem with adding additional customer fields as in it doesnt work - I add the field in customers>Add Customers Fields like you would expect and turn the field on but nothing happens on the customer side?

Also, slightly different to the recent problem above - I cant edit any of my customer accounts. It just comes up with -

1054 Unknown column 'c.customers_default_address_id' in 'on clause'
in:
[select c.customers_id, c.customers_gender, c.ustomers_firstname, c.ustomers_lastname, c.customers_dob, c.customers_email_address, a.entry_company and so on and so on.....

I have reset the additional customer fields. Im sort now at a loose end and dont know what else i can do without some help?!:frusty:

If anyone could get back to me i would be very appreciative.

Kind Regards

Matthew Allam
https://www.giftwrapuk.co.uk

19 Jun 2007, 11:45 AM
#267
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

Could someone please help!

Again, this someone is me !

Please post the following details:

  • mySQL Version
  • PHP Version
  • Zen-Cart Version

from my post above (http://www.zen-cart.com/forum/showpost.php?p=391513&postcount=262), did you applied the patch (if using mySQL v5.x) ?
Did you downloaded my latest release from my site (and NOT from the downloads section due to non-instant changes) ?

I see two other users on this topic (at least 10 different ones a day) as they only seem to watch and may experience similar problems. Rather than posting one-by-one, please post all at the same time in order to get rid of this problem more quickly.

19 Jun 2007, 11:56 AM
#268
mattallam avatar

mattallam

New Zenner

Join Date:
Nov 2006
Location:
Bedfordshire, UK
Posts:
27
Plugin Contributions:
0

Re: Additional Customers Fields

Thankyou for your help!!

MySQL 5.0
4.4.6 (Zend 1.3.0)
Zen Cart 1.3.7

And, yes i did stupidly download what i thought was your latest release from the downloads section.

Kind Regards

Matthew Allam

19 Jun 2007, 12:00 PM
#269
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

MySQL 5.0

Another case of mySQL v5.x.

4.4.6 (Zend 1.3.0)

This MOD wasn't tested under the newest PHP version. Would like to though.

and so on and so on.....

And what might be the rest of this 'and so on and so on' ?

19 Jun 2007, 12:06 PM
#270
mattallam avatar

mattallam

New Zenner

Join Date:
Nov 2006
Location:
Bedfordshire, UK
Posts:
27
Plugin Contributions:
0

Re: Additional Customers Fields

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 = '64']
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.

19 Jun 2007, 12:09 PM
#271
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

c.customers_id = '64'

Customers ID 64. Go in your phpmyadmin and see if you have any readings inside the customers_default_address_id field.

19 Jun 2007, 12:29 PM
#272
mattallam avatar

mattallam

New Zenner

Join Date:
Nov 2006
Location:
Bedfordshire, UK
Posts:
27
Plugin Contributions:
0

Re: Additional Customers Fields

Sorry for taking so long, forgot password

It has a 0 in default and thats it.

19 Jun 2007, 12:56 PM
#273
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

From your phpmyadmin, replace the 0 value with the latest value (+ 1) from all the other values that you see (again, make sure it's the latest + 1).

19 Jun 2007, 12:57 PM
#274
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

[edit] - sorry for the double post. Another useless lag from this forum.

19 Jun 2007, 1:10 PM
#275
mattallam avatar

mattallam

New Zenner

Join Date:
Nov 2006
Location:
Bedfordshire, UK
Posts:
27
Plugin Contributions:
0

Re: Additional Customers Fields

Hi TheOracle,

Sorry i have changed that and nothing happens. Without sounding rude or lazy, would you mind having a look at this problem for me. If you could e-mail/pm me a quote for the work to be carried out. I only say this as i must sort this out sooner rather than later and to be totally honest im not 100% confident playing around with certain files php etc...

I dont want to waste your time any further pretending i know what im doing?!

Kind Regards

Matthew Allam
www.giftwrapuk.co.uk

19 Jun 2007, 1:17 PM
#276
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

Since your version of mySQL is the 5th, you may email me (you can find my email address from my installation text file) by requesting custom codings. Further specific instructions will be amended from there.

You will receive a reply today. Since you seem to be in a hurry, don't wait up to reply. :wink2:

19 Jun 2007, 1:44 PM
#277
mattallam avatar

mattallam

New Zenner

Join Date:
Nov 2006
Location:
Bedfordshire, UK
Posts:
27
Plugin Contributions:
0

Re: Additional Customers Fields

I have sent you an e-mail, have you received it???

Regards

Matt

19 Jun 2007, 2:56 PM
#278
rbepple avatar

rbepple

New Zenner

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

Re: Additional Customers Fields

mattallam,
I had the same exact problem a couple days ago and I was able to fix it by simply undoing the actions instructed by post #250 in this thread. So, if you have done that action simply undo it and it will work!

19 Jun 2007, 3:02 PM
#279
rbepple avatar

rbepple

New Zenner

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

Re: Additional Customers Fields

TheOracle,
Thank you so much for your time and efforts to help me debug and get your module running on my site, I am forever grateful. I was able to fix the error that I posted (#243) by undoing the instructions of (#250), probably a coincedence. Also, the last error I was getting I fix by undoing (#242) and all work fine now. Other than, for some reason my fields appear multiple times on the customer side and it is not consistent, some shows once or twice or three times, never the same.

Secondly, I was reading admin/includes/languages/english/extra_definitions/additional_customers_fields.php and I need to now how to change the default value from 1 to 0, because I am using pull down menus.

19 Jun 2007, 3:03 PM
#280
rbepple avatar

rbepple

New Zenner

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

Re: Additional Customers Fields

sorry I meant from 0 to 1.