Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2011
    Posts
    3
    Plugin Contributions
    0

    Default Additional Customers Fields

    Hello everyone, I'm new here
    I have a problem with the module Additional Customers Fields.
    I state that I am using the version of zencart 1.39h
    My requirement is to change the browsing customer registration form found in the following form I followed the instructions for copying installzione the various files in required folders except those that were not overwritten. Until this point everything is ok, then I launched from the menu: admin -> tools -> Install SQL Patches connect string as follows:

    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;

    Then I went to customers -> Add Field Customers - but when I click it 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 'TYPE=MyISAM' at line 11
    in:
    [ CREATE TABLE IF NOT EXISTS customers_additional ( field_id INT(11) unsigned NOT NULL AUTO_INCREMENT, field_name VARCHAR(64) NOT NULL DEFAULT '', field_date DATE NOT NULL DEFAULT '0001-01-01', field_required INT(1) NOT NULL DEFAULT '0', use_url INT(1) NOT NULL DEFAULT '0', field_url_name VARCHAR(255) NOT NULL DEFAULT '', field_url VARCHAR(255) NOT NULL DEFAULT '', field_status INT(1) NOT NULL DEFAULT '0', PRIMARY KEY(field_id) ) TYPE=MyISAM; ]
    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.

    Someone can give some advice, thanks for your cooperation Maurizio.

    I state that I have tried to create customers_additional by hand but to no avail.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Additional Customers Fields

    Have a look at that table construction and keep the default primary key as it is

    I assume that this is a new install with no customers so you can add to this but I would reconsider your 255 length
    Code:
    DROP TABLE IF EXISTS customers;
    CREATE TABLE customers (
      customers_id int(11) NOT NULL auto_increment,
      customers_gender char(1) NOT NULL default '',
      customers_firstname varchar(32) NOT NULL default '',
      customers_lastname varchar(32) NOT NULL default '',
      customers_dob datetime NOT NULL default '0001-01-01 00:00:00',
      customers_email_address varchar(96) NOT NULL default '',
      customers_nick varchar(96) NOT NULL default '',
      customers_default_address_id int(11) NOT NULL default '0',
      customers_telephone varchar(32) NOT NULL default '',
      customers_fax varchar(32) default NULL,
      customers_password varchar(40) NOT NULL default '',
      customers_newsletter char(1) default NULL,
      customers_group_pricing int(11) NOT NULL default '0',
      customers_email_format varchar(4) NOT NULL default 'TEXT',
      customers_authorization int(1) NOT NULL default '0',
      customers_additional varchar(255) NOT NULL default '',
      customers_referral varchar(32) NOT NULL default '',
      customers_paypal_payerid VARCHAR(20) NOT NULL default '',
      customers_paypal_ec TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL,
      PRIMARY KEY  (customers_id),
      KEY idx_email_address_zen (customers_email_address),
      KEY idx_referral_zen (customers_referral(10)),
      KEY idx_grp_pricing_zen (customers_group_pricing),
      KEY idx_nick_zen (customers_nick),
      KEY idx_newsletter_zen (customers_newsletter)
    ) ENGINE=MyISAM;
    You will have to edit the form also and any other place where you want this info to display
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Aug 2011
    Posts
    3
    Plugin Contributions
    0

    Default Re: Additional Customers Fields

    Hello Kobra, thank you for your interest.

    I tried to run the string that you kindly sent to me but to no avail I have always the same error.
    I checked the string: customers_additional varchar(255) NOT NULL default '', is present and what can I do?

    I need to create a registration form with 4 fields:
    Name - Surname - Mobile - Email

    Does anyone know give me some advice?

    Thanks to all of Maurizio

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Additional Customers Fields

    I tried to run the string that you kindly sent to me but to no avail I have always the same error.
    I just tried this using phpmyadmin and the sql command and did not get any errors
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Aug 2011
    Posts
    3
    Plugin Contributions
    0

    Default Re: Additional Customers Fields

    So definitely something wrong when I install I do not go.

    I am using Zen Cart Ver 1.39h. additional_customers_fields_3-01 and the module I'm installing on a trial version remotely.

    I followed the instructions as per install.txt file

    Could you tell me where I wrong?
    I also tried the form simple_create_orders that was recommended to me but in reality this form is useful for creating new customers and orders from admin panel and not to change the customer registration form.

    Thank you very much good day Maurizio.

    ****************INSTALL.TXT*************************
    //----------------------------------------------------------------------------------------
    //--- Additional customers fields MOD v3.01 ----------------------------------------------
    //----------------------------------------------------------------------------------------
    // --- Coded by TheOracle on May 22 2008. ------------------------------------------------
    // --- Support: http://www.zen-cart.com/forum --------------------------------------------
    // --- Designed for Zen-Cart v1.3x versions ----------------------------------------------
    //----------------------------------------------------------------------------------------
    // If you like this MOD, please send a donation to: scoutch###################### . ------------------
    //----------------------------------------------------------------------------------------

    // Side note: THIS ENTIRE DOCUMENTATION IS A 'MUST READ' !

    // Introduction

    The additional customers fields MOD allows you to create, delete, activate/de-activate your created fields -
    on wizard basis with simply one or two clicks.

    So far, Zen-Cart will be the most recognized (if not uniquely) for this type of easy functionality. As it may have noticed already,
    several thousands of users were waiting for this moment to come. The cure has finally been discovered !

    // *** May 22 2008 ***

    Read more on the changelog.txt file regarding the new features that has been recently added within this contribution (since v3.0 release).

    // *** End of update May 22 2008 ***

    // Features

    - No more technical knowledge for adding additional customers fields into the TABLE_CUSTOMERS table.
    - Universal languages compatible.

    - Admin/customers.php file now supports PHP array grouped table names
    (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, constructor and functions implemented as it 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,
    - Possibility to set URL fields (Remote or Local links).

    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 (considering you already made manual additions to admin/customers.php file in the past).

    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' (length fields included now - updated on May 22 2008 - starting on v3.0 release).

    - 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.

    // Installation

    Simply upload all the files, from this ZIP package, - except for the following ones:

    - admin/customers.php file.
    - includes/modules/<your_template>/create_account.php file.
    - includes/modules/pages/account_edit/header_php.php file.
    - includes/templates/<your_template>/templates/tpl_account_edit_default.php file.
    - includes/templates/<your_template>/templates/tpl_modules_create_account.php file.
    - includes/classes/order.php file.
    - includes/auto_loaders/config.core.php file.

    Use a comparing tool software for the listed files above.

    Note: All paragraphs that needs to be added to your files, from the listed files above, are identified, with this title MOD name, from the beginning to the end.

    Go to your admin - > tools - > Install SQL Patches - then add the following content to your database (make a backup first in case if fails):

    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;

    // How it works . . .

    Once all the files has been uploaded successfully + compared from the listed files above with yours:

    - Execute this MOD from your admin's header bar menu (customers -> Add Customers Fields). Make sure the diagnostic reports no error(s).
    - Go to your admin - > Customers's core page. Then, open your FTP / cPanel access,
    go to your admin/includes/languages/english/extra_definitions/additional_customers_fields.php file to follow the rest of the instructions.

    - Once followed, refresh your Customers's core page and see if your title(s) and element(s) are filled out in correctly into the arrays.
    - Test your fields.
    - Edit your customized template with the created field(s) by following the example from this package - on how to do so.
    - Go back to your customer's core page, fill out some readings.
    - Check again, on the same page, to see if your readings were being entered correctly.
    - Go back to your customers - > Add customers fields page link and activate the field(s) - and VOILA !

    // *** May 22 2008 ***

    Read the 'manual.ppt' file for more detailed instructions.

    // *** End of update May 22 2008 ***

    Update for v2.0 release: Please read the changelog documentation for more details on how the latest release works.

    // Basic questions:

    - What if I decide to reset my listing tables, will my additional fields, from my TABLE_CUSTOMERS table be affected as well ?
    No and no. If you decide to re-add them into your list, mySQL could probably mention that you have duplicated fields.

    - Do I need to modify the listing table manually over PHPMYADMIN ?
    Absolutely not. All (or most) modifications can be done from the admin's end.

    - How would I know if these procedures are safe ?
    For each fields creation you will make, you'll be notified as well as recommended to do some operations before these actions are being officially sent to the server.

    // Support
    If you'd like to report a bug, please do so on the forum. I will assist as soon as possible. Thank you all for your generous understanding
    and patience you have put on this in order, for me, to code this beast entirely.

    // Donation
    If you like this MOD, please send a donation to: scoutch###################### (paypal). It would be greatly appreciated (especially for all the time you waited for this moment to happend).

    Regards and best to you all,

    TheOracle.
    User of Zen-Cart E-Commerce Script.
    http://www.zen-cart.com/forum .

 

 

Similar Threads

  1. Additional Customers Fields
    By TheOracle in forum All Other Contributions/Addons
    Replies: 490
    Last Post: 9 Dec 2010, 06:17 PM
  2. Additional Customers Fields Addon SQL problem
    By Dasha in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Sep 2008, 05:41 PM
  3. Additional customers fields v2-55 Question
    By balonglong78 in forum General Questions
    Replies: 0
    Last Post: 26 May 2008, 04:04 AM
  4. Need help installing "additional customers fields" module
    By CKlemow in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Sep 2007, 03:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR