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

Additional Customers Fields

Locked

Views: 88,141

Results 281 to 300 of 491
This thread is locked. New replies are disabled.
19 Jun 2007, 3:43 PM
#281
mattallam avatar

mattallam

New Zenner

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

Additional Customers Fields

rbepple:

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!

Hi rbepple,

Thanks for trying to help. Tried above advice and still the same old problem.

Cant change/edit/view any of my customers
Cant add additional fields using the mod

Can add new customers from cust side

I know it will be fantastic when it works, just getting frustrated. Been a long day. :wacko:

19 Jun 2007, 4:21 PM
#282
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

sorry I meant from 0 to 1.

These values are from your physical fields structure. My last instructions were based from the ' customers number 9 ' you had an error from. Inside the customers_default_address_id field, you have an entered value - done from your create_account.php file. I have already posted instructions based on the new array as this field should not been touched in any way. If you did encountered problems with that particular field, it cannot be from this MOD.

For more details, look at your includes/extra_configures/additional_customers_fields.php file to see if the affected field is part of the core array. If so, it cannot affect it during the injections of your additional customers fields from, either, when customers creates an account or edit their content from the ' my account ' page.

@mattallam:

Email sent. I will read your reply sometime today.

19 Jun 2007, 4:59 PM
#283
rbepple avatar

rbepple

New Zenner

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

Re: Additional Customers Fields

I am having trouble getting the fields to look right. My customer register page is showing multiple fields and my customer edit page shows the box but no field. On the admin>customer edit side it also shows the box but now field. Here is my site if you want to look at what I am talking about. You can create a generic account to if you want to see the customer edit side.

https://www.commtech.freehostingnow.com/catalog

19 Jun 2007, 5:11 PM
#284
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

This has already been reported before as I have asked for details and no one did replied to it. In order to make the proper corrections (as I can assume this could be a bug), please post all the details by telling me 'what does it make so that would happend precisely and not just by reporting the problem.

So, again, what have you done so that these multiple fields appear twice ?

19 Jun 2007, 5:31 PM
#285
rbepple avatar

rbepple

New Zenner

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

Re: Additional Customers Fields

For the customer register side I edited the following file:

includes/templates/silverfish/templates/tpl_modules_create_account.php

if (isset($account->fields['field_name']) && $account->fields['field_name'] == "sales_rep") {                        
        echo add_customers_fields_for_create_account('sales_rep', 'zen_draw_pull_down_menu');
        }

includes/languages/english/extra_definitions/additional_customers_fields_create_account.php

$additional_customers_fields_form_create_account_pull_down_title['sales_rep'] = array('Sales Representative: ');
$additional_customers_fields_form_create_account_pull_down_content['sales_rep'] = array("None", "Mel Kimmel", "Boyd Thomas");
19 Jun 2007, 6:44 PM
#286
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

Would it be possible to post the whole additional while loop statement between the beginning to the end ? I will take a look at it. For now, it does look right but just need to make sure first.

Thanks.

19 Jun 2007, 10:22 PM
#287
gyphon avatar

gyphon

New Zenner

Join Date:
Apr 2007
Posts:
30
Plugin Contributions:
0

Re: Additional Customers Fields

I have just downloaded additional_customers_field.zip from your site.

  1. When I get to the instructions to use a comparing tool software for the 5 listed file, (I use WinMerge). I open includes/modules/<your_emplate>/create_account.php. Your file does not have a section marked off. What needs to go into my create_account.php?

  2. My file structure does not have includes/modules/<your_template>/pages/account_edit/header_php.php (where <your_template> = silverfish) HOWEVER, there is includes/modules/pages/account_edit/header_php.php. Is this the file to be compared?

  3. My file structure does not have includes/templates/<your_template>/templates/tpl_account_edit_default.php. Should I copy the one from template_default folder and use that for compare?

Thanks
Larry

19 Jun 2007, 11:41 PM
#288
blitz49 avatar

blitz49

New Zenner

Join Date:
Apr 2005
Posts:
99
Plugin Contributions:
0

Re: Additional Customers Fields

Hey theoracle,

I tried installing this contri on a live store and I am having two problems. Store has MySQL 5.0.41 with PHP Version 4.4.7.

First problem I know is my verison of MySQL 5.0.41, it is causing the dreaded error on the admin side when trying to edit customer info.

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 , c.customers_age, c.customers_cellphone 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.

I tried all the fixes that was mentioned and it still will not work, i guess its Mysql version, cause I installed this mod on local system with MySQL 4.0.27 and PHP Version 4.3.11 (test server), that error does not appear.

My second problem is, I am getting fields duplicating itself 7 times on the live store. I have included a picture to see what it looks like.

20 Jun 2007, 3:19 AM
#289
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

  1. When I get to the instructions to use a comparing tool software for the 5 listed file, (I use WinMerge). I open includes/modules/<your_emplate>/create_account.php. Your file does not have a section marked off. What needs to go into my create_account.php?

Correct. Thanks for the catch. Package updated from my site.

  1. My file structure does not have includes/modules/<your_template>/pages/account_edit/header_php.php (where <your_template> = silverfish) HOWEVER, there is includes/modules/pages/account_edit/header_php.php. Is this the file to be compared?

This was NOT seen for a while. Meaning, you did NOT downloaded the latest version from my site. My last update was posted on this topic since a couple of days ago. Always read my updated status messages from this topic.

  1. My file structure does not have includes/templates/<your_template>/templates/tpl_account_edit_default.php. Should I copy the one from template_default folder and use that for compare?

My template example is inside the package as such. Meaning, as long as you are integrating the beginning of the while loop statement to the end (as identified from my template files), then you should have no problem to integrate it into your template.

I tried all the fixes that was mentioned and it still will not work, i guess its Mysql version, cause I installed this mod on local system with MySQL 4.0.27 and PHP Version 4.3.11 (test server), that error does not appear.

Exacly the report I was expecting to have. Very well, until mySQL DEV team does not declare the 5th version as flexible as mySQL v4.x is right now, no more support will be given for users who has the 5th version of mySQL until further notice. You're on your own on this one.

My second problem is, I am getting fields duplicating itself 7 times on the live store. I have included a picture to see what it looks like.

Please read this post:

This has already been reported before as I have asked for details and no one did replied to it. In order to make the proper corrections (as I can assume this could be a bug), please post all the details by telling me 'what does it make so that would happend precisely and not just by reporting the problem.

So, again, what have you done so that these multiple fields appear twice ?
19th June 2007 12:59 PM

I have posted this more than once now. I can't believe nobody notices these important steps. Until this question will be answered, I cannot give support for it right now.

20 Jun 2007, 4:03 PM
#290
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: Additional Customers Fields

Hello,

Just downloaded this mod from Oracle's site this morning and am working on installing it. I noticed in the header_php.php file, there is some code that is not flagged as being part of the mod. However, should it be?

Here are the lines I'm speaking of:

$account_query = "SELECT c.customers_gender, c.customers_firstname, c.customers_lastname,
c.customers_dob, c.customers_email_address, c.customers_telephone,
c.customers_fax, c.customers_email_format, c.customers_referral, ac.field_name, ac.field_status
" . zen_db_output($additional_sql) . "
FROM (" . TABLE_CUSTOMERS . " c, " . TABLE_ADDITIONAL_CUSTOMERS . " ac)
WHERE c.customers_id = :customersID";

But maybe this is generated after the install is complete? I've read in previous posts that some flags were missed in previous versions, so I'm just double checking before I mess anything up.

Thank you.

20 Jun 2007, 4:47 PM
#291
rbepple avatar

rbepple

New Zenner

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

Re: Additional Customers Fields

Here is my /catalog/includes/languages/english/extra_definitions/additional_customers_fields_create_account.php
I am still getting multiple fields on my customer registration page. I only create sales_rep in my database.

<?php
//----------------------------------------------------------------------------------------
//--- Additional customers fields MOD v2.1 -----------------------------------------------
//----------------------------------------------------------------------------------------
// --- Coded by TheOracle on June 16 2007. -----------------------------------------------
// --- Support: http://www.zen-cart.com/forum --------------------------------------------
// --- Designed for Zen-Cart v1.3x versions ----------------------------------------------
//----------------------------------------------------------------------------------------
// If you like this MOD, please send a donation to: [email protected] . ------------------
//----------------------------------------------------------------------------------------

// Defines the additional customers fields title in order to show in HTML forms.
define('ENTRY_ADDITIONAL_CUSTOMERS_FIELDS_TITLE', 'Sales Representative');
define('HEADING_TITLE', '');

// Defines the hobbies title name for the additional customers fields.
$additional_customers_fields_form_create_account_textarea_title['customers_hobbies'] = array('Hobbies: ');

// Defines the customers sales representative for the additional customers fields.
$additional_customers_fields_form_create_account_pull_down_title['sales_rep'] = array('Sales Representative: ');
$additional_customers_fields_form_create_account_pull_down_content['sales_rep'] = array("None", "Mel Kimmel", "Boyd Thomas");

// Defines the customers cellphone number for the additional customers fields.
$additional_customers_fields_form_create_account_input_title['customers_cellphone'] = array('Cellphone: ');

// defines the customers age (radio button version):
$additional_customers_fields_form_create_account_radio_title['customers_pod'] = array('POD: ');
$additional_customers_fields_form_create_account_radio_content['customers_pod'] = array(1, 2, 3, 4, 5);
?>

let me know if you need other files.

20 Jun 2007, 5:22 PM
#292
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

1 / 2 - and from your template files -

beginning from:

// Additional customers fields

to:

// End of additional customers fields

?

20 Jun 2007, 5:32 PM
#293
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

Just downloaded this mod from Oracle's site this morning and am working on installing it. I noticed in the header_php.php file, there is some code that is not flagged as being part of the mod. However, should it be?

I don't understand why some questions are being adressed indirectly but, as I recall, I wrote this MOD and I offer support for it. If you do experience some problems with the MOD, please address it to me. As for the current problem you're experiencing, I have posted an update yesterday on this matter. Simply download the latest version from my site as you should see the identified paragraph where you must add the entries from your header_php.php file.

20 Jun 2007, 5:34 PM
#294
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: Additional Customers Fields

I decided just to follow the lines that were flagged and...um...wow. I'm one of the "Fatal Error" recipients.

After following the installation readme, I am stuck at Admin>Customers>Add Customer Fields. I receive this error:

Fatal error: Call to undefined function: get_table_fields() in /Library/Apache2/htdocs/ddi/ddiadmin/additional_customers_fields.php on line 196

PHP Version 4.3.9
MySQL 4.0.21
Zen Cart 1.3.7

Any help would be much appreciated.

Thank you!

20 Jun 2007, 5:37 PM
#295
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

Easy problem. You did not followed instructions regarding the comparaison of your includes/classes/db/mysql/query_factory.php file. Additional methods needs to be added. Please follow my installation instruction file carefully (no need to speed things up).

20 Jun 2007, 5:39 PM
#296
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: Additional Customers Fields

Oracle,

I didn't realize I had to address each post directly to you because I had assumed any post in here WAS made to you. As mentioned in my post, I downloaded the mod from your site this morning. However, I must be overlooking something obvious so I posted my question.

20 Jun 2007, 5:58 PM
#297
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

Oracle,

I didn't realize I had to address each post directly to you because I had assumed any post in here WAS made to you. As mentioned in my post, I downloaded the mod from your site this morning. However, I must be overlooking something obvious so I posted my question.

I believe the very first post on this topic mentions it as is ... :huh:

20 Jun 2007, 6:22 PM
#298
blitz49 avatar

blitz49

New Zenner

Join Date:
Apr 2005
Posts:
99
Plugin Contributions:
0

Re: Additional Customers Fields

This has already been reported before as I have asked for details and no one did replied to it. In order to make the proper corrections (as I can assume this could be a bug), please post all the details by telling me 'what does it make so that would happend precisely and not just by reporting the problem.

So, again, what have you done so that these multiple fields appear twice ?
19th June 2007 12:59 PM

I did exactly what i did on my test server, and works fine on test server, but on live shop it duplicates the field. I checked the create_account.php in \includes\modules\your_template\ multiple times to see what is wrong, but I can't figure out why it is doing that. Cause that file is untouched, so I just uploaded the file that you have created, plus I checked it with winmerge and there is little difference expect for the code that you put in. Guess for now I will mess around with it to see if I can fix both problems, or just wait till you have a fix.

Thanks for everything.

20 Jun 2007, 8:11 PM
#299
djjoshuad avatar

djjoshuad

New Zenner

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

Re: Additional Customers Fields

TheOracle:

First off, thanks a bunch for the effort involved with this project. I apologize if my issue has already been addressed, but I have searched to no avail.

I have found several bugs that I think deserve attention. First, I think you need to look into default values when creating varchar fields. Second, your code allows the user to create a field with a given name more than once. I know you forbid us doing that... but it is still possible. It is likely that a user will encounter this when an error is created on their first attempt, as in the varchar field issue I mentioned above.

example:

1.) user attempts to create field name "test_1" of type "varchar" length "200" default "blah"
2.) php code creates an entry in the customers_additional table with field_id 1, field_name "test_1" and field_status 1
3.) mysql generates error: because blah is not a valid default value for a varchar field - TABLE_CUSTOMERS is not updated
4.) user tries again, this time with no default and:
5.) php code creates an entry in the customers_additional table with field_id 2, field_name "test_1" and field_status 1
6.) php code (successfully) alters table TABLE_CUSTOMERS to include the new test_1 field

now, if the user tries to delete his mistake, the code removes the field from TABLE_CUSTOMERS first, then removes the row from customers_additional. we are left with a row in customers_additional that has no associated field in TABLE_CUSTOMERS. try and delete that one... the code tries to alter TABLE_CUSTOMERS first and fails because that field has already been removed. Now there's no way to remove the row from customers_additional without bypassing your interface.

the other bugs I've found are related to header information being re-sent after ZC has already sent them... not apparent to the front end, but it registers on the httpd logs:

[client <ip address>] PHP Warning: Cannot modify header information - headers already sent by (output started at <site_base>/zencart/admin/additional_customers_fields.php:25) in <site_base>/zencart/admin/includes/functions/general.php on line 34, referer: http://zencart.mydomain.com/admin/additional_customers_fields.php?action=create_additional_customers_fields

anyway, thanks again for the hard work. This is certainly more convenient than the old way of adding fields, and I think with some more work it could be useable by your average joe. nicely done!

20 Jun 2007, 9:15 PM
#300
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

but on live shop it duplicates the field.

Again - the activity of what causes this ?

1.) user attempts to create field name "test_1" of type "varchar" length "200" default "blah"

Try varchar 255. That's what I always do for string text (example: for customers email address).

2.) php code creates an entry in the customers_additional table with field_id 1, field_name "test_1" and field_status 1

Correct. That means - field_id + 1, field name: your field name, field_status: deactivated (set by default for testing purposes before actually putting this field live).

5.) php code creates an entry in the customers_additional table with field_id 2, field_name "test_1" and field_status 1

Can you actually see identical test_1 names under your TABLE_ADDITIONAL_CUSTOMERS + your TABLE_CUSTOMERS table in your phpmyadmin ? If so, how many ? There should only be one (unique) for a listed name and a physical name.

php code (successfully) alters table TABLE_CUSTOMERS to include the new test_1 field

Good to hear, at least, the import session is importing all your additional unlisted fields into the TABLE_ADDITIONAL_CUSTOMERS table as expected. As for your analysis, I think it's the best one I had so far. Now, all that is left is the three last posts I'm still expecting reports on the precise way (and detailed) the way that duplicated fields are happening. If you can confirm this one as well, I will look into it.

Now, which PHP, mySQL and Zen-Cart version are you using ?

the other bugs I've found are related to header information being re-sent after ZC has already sent them... not apparent to the front end, but it registers on the httpd logs:

[client <ip address>] PHP Warning: Cannot modify header information - headers already sent by (output started at <site_base>/zencart/admin/additional_customers_fields.php:25) in <site_base>/zencart/admin/includes/functions/general.php on line 34, referer: http://zencart.mydomain.com/admin/ad...stomers_fields

If you searched for it ... I find it hard to believe a little bit since it's everywhere in the first posts of this topic. This has already been issued that this is a zen_redirect problem, built by one of the DEV team, as I have posted a patch on one of the posts under this topic. Since then, no problems were reported. Just need to search a little bit further (even though it is understandable for the mount of replies involved on this topic).

[client <ip address>] PHP Warning: Cannot modify header information - headers already sent by (output started at <site_base>/zencart/admin/additional_customers_fields.php:25) in <site_base>/zencart/admin/includes/functions/general.php on line 34, referer: http://zencart.mydomain.com/admin/ad...stomers_fields

If you refresh the page when this message appears, what does it say on the top of the header page ?

I did exactly what i did on my test server, and works fine on test server, but on live shop it duplicates the field. I checked the create_account.php in \includes\modules\your_template\ multiple times to see what is wrong, but I can't figure out why it is doing that. Cause that file is untouched, so I just uploaded the file that you have created, plus I checked it with winmerge and there is little difference expect for the code that you put in. Guess for now I will mess around with it to see if I can fix both problems, or just wait till you have a fix.

The problem relies on my additional created functions actually - NOT on the modules. However, I'm still waiting for other reports regarding the duplicated fields. A patch (or upgrade version) will be released from that point.