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.
Views: 88,141
New Zenner
it looks like this syntax is missing the "d" in where customers_i' at line 2. But, I don't know.
Suspended
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.
Suspended
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.
New Zenner
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.
Suspended
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.
New Zenner
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
Suspended
Could someone please help!
Again, this someone is me !
Please post the following details:
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.
New Zenner
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
Suspended
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' ?
New Zenner
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.
Suspended
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.
New Zenner
Sorry for taking so long, forgot password
It has a 0 in default and thats it.
Suspended
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).
Suspended
[edit] - sorry for the double post. Another useless lag from this forum.
New Zenner
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
Suspended
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:
New Zenner
I have sent you an e-mail, have you received it???
Regards
Matt
New Zenner
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!
New Zenner
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.
New Zenner
sorry I meant from 0 to 1.
Fields marked required must be completed.
Tell staff why this post should be reviewed.