Forums / All Other Contributions/Addons / Additional Customers Fields

Additional Customers Fields

Locked
Results 1 to 20 of 491
This thread is locked. New replies are disabled.
19 May 2007, 18:06
#1
theoracle avatar

theoracle

Suspended

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

Additional Customers Fields

Salutations to you all (or almost),

During the last month, I have been coding an important MOD that has been requested since a couple of years now. Until today, there weren't really any detailed solution on how to accomplish this. This topic will be the official topic for support on this matter.

Today, I have recruted some related topics which users has begged in order to have this:
http://www.zen-cart.com/forum/showthread.php?t=63484&highlight=additional+customers+fields
http://www.zen-cart.com/forum/showthread.php?t=59556&highlight=additional+customers+fields
http://www.zen-cart.com/forum/showthread.php?t=63816&highlight=additional+customers+fields
http://www.zen-cart.com/forum/showthread.php?t=42015&highlight=additional+customers+fields
http://www.zen-cart.com/forum/showthread.php?t=57587&highlight=additional+customers+fields
http://www.zen-cart.com/forum/showthread.php?t=53760&highlight=additional+customers+fields
http://www.zen-cart.com/forum/showthread.php?t=40788&highlight=additional+customers+fields
http://www.zen-cart.com/forum/showthread.php?t=10319&highlight=additional+customers+fields

Now, since the following topic reports that the downloads section does not function properly:

http://www.zen-cart.com/forum/showthread.php?t=65604

I will post my downloads URL on the bottom of this message. Please take note that if this URL gets modified, or if one of the DEV team considers that this decision should be taken as punished, then I shall not take the blame (and I hope I'm being clear on that - due to reports from other users regarding the present condition of the downloads section).

As I'm already aware of what is going to happend once people will start to download this very attended feature, this subject will probably never stop as it will keep enlarging for another hundred years. However, due to the size of these informations, I'm asking in advanced to be patient for each features you're expecting me to build as it 'could' require some time to complete it (depending on the size of requests).

Here's some detailed features that I'm sure you'll be glad to read:

// Features


- No more technical knowledge for adding additional customers fields into the TABLE_CUSTOMERS table.
- Universal languages compatible.
- Auto-Importation, by a single click, of any existing fields you might have from your TABLE_CUSTOMERS table (every ever first-time execution
or when the listing table is empty).

- Admin/customers.php file now supports PHP array grouped tables name
(see: admin/includes/languages/english/extra_definitions/additional_customers_fields.php file for more info on this).

- Auto-checked option fields selection - implemented.
- Javascript listing appearance when selecting SQL fields type, size and more (note: the fields and types are based from your includes/zc_install/sql/mysql_zencart.sql file).
- Auto-verification files and functions implemented and checks each times you execute the 'Add Customers Fields' page (under the admin's header bar).
- Reset listing table link (only listing table - not your core table).
- Create additional customers fields - wizard basis.
- MessageStack messages implemented for each negative actions.
- Set activation of each fields by a single click from the 'Add Customers Fields' 's main page.
- Test for each files under admin/customers.php page before officially publishing your created fields to your customer's form - implemented.
Note: If you already added customers fields manually into the admin/customers.php file, you have two options:

1 - Remove these fields and use these names under the admin's extra definitions folder.
2 - Keep your manual fields there but as long as you do NOT add these definitions under the admin's extra definitions folder.

However, I'd personally recommend option 1 since, once you have removed these manual fields, you can add them into the arrays 'the way you want them
to be'.

- Delete each additional customers fields without affecting your custom templates - implemented.
- Auto-update of each additional customers fields with core fields without affecting your current readings under the TABLE_CUSTOMERS table - implemented.
- Create account page process - additional customers fields updated into the TABLE_CUSTOMERS table without affecting any previous readings - implemented.


A full detailed installation instruction is inside the package and waiting for you. :wink2:

Note: Please excuse my layout. Since there are only minimal MODs listed, I do not feel the rush to make a beauty of it until I create some more (or if people likes them).

Donations would be greatly appreciated on this. My paypal email address is indicated into the installation file. :smartalec:

With that all said, this is a new beginning of Zen-Cart evolution. Probably several hundreds of different E-Commerce script expects to have features like these as I'm glad to have finally achieve my goalm by creating this MOD.

URL: 'http://www.storm.ca/~oracle'

Enjoy and, if you have any questions - based on the current features or any suggestions for features you'd like to add, I will try to apply most of them.

Regards.

TheOracle.



MODERATOR NOTE: This mod is apparently no longer available nor supported by its author. The reasons given on the author's website are only half the story. This discussion thread remains available for reference for those who have already downloaded and attempted to use the contribution.
The author did submit this contribution to the Zen Cart downloads area, available here:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=587
20 May 2007, 19:40
#2
georand99 avatar

georand99

New Zenner

Join Date:
May 2007
Posts:
4
Plugin Contributions:
0

Re: Additional Customers Fields

Hi,
I have just downloaded and installed the Additional Customers Fields mod.

I could create additional fields ( i have created for test customers_cellphone , customers_age ), but there is my problem:
- when I go to customers, and edit one of them i get this:
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_cellphone, c.customers_age from ost_customers c, ost_customers_additional ac left join ost_address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '2']
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.


PS: the function and javascript directory should be copied under admin, or under admin/includes ?

any help, thanks
20 May 2007, 21:07
#3
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields


1054 Unknown column 'c.customers_default_address_id' in 'on clause'


1 - Restore backup of your admin/customers.php file.
2 - Go to your phpmyadmin and assure that field is still existing under your TABLE_CUSTOMERS table.
3 - Make sure to use a comparing tool software and paste all identified contents into the file (// Additional customers fields through: // End of additional customers fields. Note: There are multiple lines like these).


PS: the function and javascript directory should be copied under admin, or under admin/includes ?


All folders in the package are showed as is. The javascript file goes under your:

- admin/includes/javascript/mods/additional_customers_fields/english folder.

The extra function file goes into your:

- admin/includes/functions/extra_functions folder.
21 May 2007, 07:19
#4
georand99 avatar

georand99

New Zenner

Join Date:
May 2007
Posts:
4
Plugin Contributions:
0

Re: Additional Customers Fields

First of all, thanks for your quick answer.

I will comment the action that you told me to do it:

1 - Restore backup of your admin/customers.php file ( I have done that, this file is the original one from zc137, it wasn't modified, so the first time I have overwrited with the one from your mod)

2 - Go to your phpmyadmin and assure that field is still existing under your TABLE_CUSTOMERS table. (- the field exist)

3 - Make sure to use a comparing tool software and paste all identified contents into the file (// Additional customers fields through: // End of additional customers fields. Note: There are multiple lines like these). (I have done that, this file is the original one from zc137, it wasn't modified, so the first time I have overwrited with the one from your mod, now I am using a comparing tool and I have the same result -> your file)


Quote:
PS: the function and javascript directory should be copied under admin, or under admin/includes ?
All folders in the package are showed as is. The javascript file goes under your:

- admin/includes/javascript/mods/additional_customers_fields/english folder.

The extra function file goes into your:

- admin/includes/functions/extra_functions folder.


I have asked this because in your zip file theese directories (FUNCTION and JAVASCRIPT) are at the same level with INCLUDES.

So, in conclusion I have the same problem:dontgetit

Thanks again, maybe you have some other ideas.
21 May 2007, 12:14
#5
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields


- the field exist


This is an SQL error, not an error from the MOD. Which means, either the field does not exist or you do not have content on it.

However, there's a known issue I discovered yesterday. You must, at least, create one additional customers fields manually from phpmyadmin under your TABLE_CUSTOMERS. Then, import it and activate it from the admin - > customers - > add customers fields page (only the first time).


I have asked this because in your zip file theese directories (FUNCTION and JAVASCRIPT) are at the same level with INCLUDES.


Yes, this is how they must be. :smile:
23 May 2007, 03:52
#6
ali_peracha avatar

ali_peracha

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: Additional Customers Fields

Hi,
I just installed the ACF module and when i run the SQL patch i get the following 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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=4' at line 1
in:
[CREATE TABLE IF NOT EXISTS customers_additional ( field_id int(11) NOT NULL auto_increment, field_name varchar(255) NOT NULL default '', field_status char(2) NOT NULL default '', PRIMARY KEY (field_id) )ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4;]
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.


Can you help me out with this??

Thanks,
AP
23 May 2007, 11:28
#7
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

What are the exact steps you did when creating a field from the 'Create additional customers fields' link ? (All steps from that page would be amended)
23 May 2007, 16:14
#8
ali_peracha avatar

ali_peracha

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: Additional Customers Fields

I followed the steps on your installation instructions. The only thing i didnt do is use the comparing software as i did not change any of the files that you listed.

After uploading all the files i tried the SQL patch in your txt file but i get the error in my previous post.

Do i need to change the files to orginal zc1.7 files and use the comparing tool?
23 May 2007, 16:54
#9
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

Very well. In your phpmyadmin, make sure the customers_additional table is cleared out entirely.

Then, make sure to know which field types you're currently using. If it's otherwise than MyISAM, change the bolded type name below before applying the entire paragraph below from your SQL Patches page:


CREATE TABLE customers_additional (
field_id int(11) NOT NULL auto_increment,
field_name varchar(255) NOT NULL default '',
field_status char(2) NOT NULL default '',
PRIMARY KEY (field_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;


Would these modifications work ?
23 May 2007, 19:45
#10
ali_peracha avatar

ali_peracha

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: Additional Customers Fields

Is there any way to find out which engine im using?

I did try to run the sql without the

ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

it runs fine but i cant add any fields.

Is there any way i can see which engine im using?
23 May 2007, 19:54
#11
ali_peracha avatar

ali_peracha

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: Additional Customers Fields

Ok it is MYISAM. i just found it.... anything else i need to change in the sql statement?

#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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 6
23 May 2007, 20:30
#12
ali_peracha avatar

ali_peracha

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: Additional Customers Fields

ali.peracha:

Ok it is MYISAM. i just found it.... anything else i need to change in the sql statement?

#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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 6


If i install the sql without the
ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

then i get this error on top of my admin page when i go to cusotmer add fields page

It would seem this feature cannot verify for any existent files, since the verification module could not be found. Perhaps you forgot to upload the function file that goes to extra_functions directory ?
23 May 2007, 22:02
#13
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields


Is there any way i can see which engine im using?


Absolutely. Under your PHPMyAdmin, you can see each types of each of your physical SQL fields inside each SQL tables. For instance, choose your regular customers table. Take a look at the type row, you should notice their types for each of them. :wink2:
23 May 2007, 22:05
#14
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields


Perhaps you forgot to upload the function file that goes to extra_functions directory ?


Wonderful debug message I implemented isn't it ? :smartalec:

You did not uploaded your admin/includes/functions/extra_functions/additional_customers_fields.php file. Perhaps you forgot to do it while you were selecting the files right before the upload process ? :wink2:
23 May 2007, 22:07
#15
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

ali.peracha:

If i install the sql without the
ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;


Never been a huge fan of Install SQL Patches. Use my last SQL query block I posted earlier today under your PHPMyAdmin - > SQL Query page.

Recall: Make sure your physical table does not exist first before attempting to create the table.
24 May 2007, 00:06
#16
ali_peracha avatar

ali_peracha

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: Additional Customers Fields

TheOracle:

Wonderful debug message I implemented isn't it ? :smartalec:

You did not uploaded your admin/includes/functions/extra_functions/additional_customers_fields.php file. Perhaps you forgot to do it while you were selecting the files right before the upload process ? :wink2:


well that's what i thought too, but i tried it again and again.... (how stupid would i feel if i actually forgot to upload that file:) :lookaroun

i did install the new SQL block that you have in the last post, but i get the same thing. This time i'll delete all the files, delete the table and try it again... hopefully its gonna work...

i really want this to work coz i need company name, add, tele, wholesale tax info and other suff when a wholesale buyer registers.... so im kinnda desperate:wacko:

i'll keep you posted, but if you do recall anything else that might be causing this prob do let me know.

thanks for your time man!

AP
24 May 2007, 00:33
#17
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields

What is your PHP and mySQL version ? To find out, go to your admin - > tools - > server info.
24 May 2007, 00:39
#18
ali_peracha avatar

ali_peracha

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: Additional Customers Fields

TheOracle:

What is your PHP and mySQL version ? To find out, go to your admin - > tools - > server info.


PHP Version 4.3.11
MySQL 4.0.27


well, the installation went well after i removed the myisam from the sql.

but now when i go to the customer page, i get this error and i don't see any new text fields i made in the additional_customer_field.php...

Warning: reset(): Passed variable is not an array or object in /home/content/g/e/o/georgidesign/html/store/admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in /home/content/g/e/o/georgidesign/html/store/admin/includes/classes/object_info.php on line 3
24 May 2007, 00:43
#19
theoracle avatar

theoracle

Suspended

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

Re: Additional Customers Fields


after i removed the myisam from the sql.


Then, the only possible conclusion is that your DB Type is not MyISAM (possibly InnoDB or simply ISAM).


Warning: reset(): Passed variable is not an array or object in /home/content/g/e/o/georgidesign/html/store/admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in /home/content/g/e/o/georgidesign/html/store/admin/includes/classes/object_info.php on line 3


When exacly does this error occurs ?
24 May 2007, 07:31
#20
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Posts:
1,782
Plugin Contributions:
4

Re: Additional Customers Fields

Excuse that I interfere
CREATE TABLE customers_additional (
  field_id int(11) NOT NULL auto_increment,
  field_name varchar(255) NOT NULL default '',
  field_status char(2) NOT NULL default '',
  PRIMARY KEY (field_id)
) ENGINE=MyISAM;