Page 5 of 50 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 491
  1. #41
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Additional Customers Fields

    Lets fix this.

    In your admin/additional_customers_fields.php file,

    move:

    PHP Code:
      //----------------------------------------------------------------------------------
      //--- No customers are allowed (can't take any chances) ---
      //----------------------------------------------------------------------------------  
      
    if (!$_SESSION['admin_id']) {
          
    $messageStack->add_session(ENTRY_ADDITIONAL_CUSTOMERS_FIELDS_UNAUTHORIZED_ACCESS'warning');                       
          
    zen_redirect(zen_href_link(FILENAME_ADDITIONAL_CUSTOMERS_FIELDS'''NONSSL'));
      } 
    // End of if statement.
      
    ?> 
    Then, find:

    PHP Code:
    <?php require(DIR_WS_INCLUDES 'header.php');
    replace with:

    PHP Code:
    <?php require(DIR_WS_INCLUDES 'header.php');
      
    //----------------------------------------------------------------------------------
      //--- No customers are allowed (can't take any chances) ---
      //----------------------------------------------------------------------------------  
      
    if (!$_SESSION['admin_id']) {
          
    $messageStack->add_session(ENTRY_ADDITIONAL_CUSTOMERS_FIELDS_UNAUTHORIZED_ACCESS'warning');                       
          
    zen_redirect(zen_href_link(FILENAME_ADDITIONAL_CUSTOMERS_FIELDS'''NONSSL'));
      } 
    // End of if statement.
      
    ?>
    Should work now.

  2. #42
    Join Date
    Apr 2007
    Location
    barnsley, south yorkshire, uk
    Posts
    24
    Plugin Contributions
    0

    Default Re: Additional Customers Fields

    i have editied the tpl_modules_create_account and tpl_modules_account_edit files to add my additional fields i get this error message

    Parse error: syntax error, unexpected $end in C:\Program Files\xampp\htdocs\zen-cart\includes\templates\template_default\templates\tpl_modules_create_account.ph p on line 327

    can anyone help, i`m stuck

  3. #43
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Additional Customers Fields

    This error message means that you're missing a ending bracket (probably from an IF condition) at the end of the condition you were applying.

  4. #44
    Join Date
    Apr 2007
    Location
    barnsley, south yorkshire, uk
    Posts
    24
    Plugin Contributions
    0

    Default Re: Additional Customers Fields

    Thanks for the advice, i think ive got it also i get a message when i have added to additional customer fields.php the message error i get is

    Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\zen-cart\admin\includes\languages\english\extra_definitions\additional_customers_fie lds.php on line 99

    i have also added to english.php to define the fields. can anyone help i`m stuck yet again

  5. #45
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Additional Customers Fields

    Please post between line 95 and 105 of your extra_definitions/additional_customers_fields.php file.

    I have also added to english.php to define the fields.
    That file must NOT be edited. Please remain with the extra_definitions folder (overrides).

    can anyone help i`m stuck yet again
    The 'anyone' shall be addressed to me by the way since I'm the author of this MOD.

  6. #46
    Join Date
    Apr 2007
    Location
    barnsley, south yorkshire, uk
    Posts
    24
    Plugin Contributions
    0

    Default Re: Additional Customers Fields

    thank you for the advice and i will address you instead of putting anyone.

  7. #47
    Join Date
    Apr 2007
    Location
    barnsley, south yorkshire, uk
    Posts
    24
    Plugin Contributions
    0

    Default Re: Additional Customers Fields

    as posted previously i have edited the additional customer fields.php the message error i get is

    Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\zen-cart\admin\includes\languages\english\extra_defini tions\additional_customers_fields.php on line 95

    can the oracle see where i am going wrong

  8. #48
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Additional Customers Fields

    Please post the whole file's content (between PHP bbcode tags) so that I could check this out more closely.

  9. #49
    Join Date
    Apr 2007
    Location
    barnsley, south yorkshire, uk
    Posts
    24
    Plugin Contributions
    0

    Default Re: Additional Customers Fields

    here is the full code

    <?php
    //-----------------------------------------------------------------------------------------------------------
    //--- Additional customers fields MOD ------------------------------------------------------
    //----------------------------------------------------------------------------------------------------------
    // --- Coded by TheOracle on May 9, 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: scoutch###################### . --
    //---------------------------------------------------------------------------------------------------------

    define('BOX_CUSTOMERS_ADDITIONAL_CUSTOMERS_FIELDS', 'Add Customers Fields');

    // Additional Customers Fields - Form Type Table Title For Whole Additional Window.
    define('ADDITIONAL_CUSTOMERS_FIELDS_FORM_TITLE', 'Additional Customers Fields');

    //================================================================================ =========================
    // Additional Customers Fields - Form Type Table Structure (Input text fields)
    // Here's out it works in HTML version for the input text:
    // - <input type="text" name="customers_hobbies" value="your content">
    // - <input type="text" name="customers_age" value="your content">
    // - <input type="text" name="customers_cellphone" value="your content">

    // Imagine; almost four years has passed and all the pain we had to push ourselves into.
    // This new way is a way for your freedom. All you need to do is to enter "one" title name for
    // each additional customers fields you have created from the MOD.

    // Remember, a constance of 'two additional customers fields' is needed.
    // You can see some example below. As you can see, for the input type, there are no content.
    // Of course not, the content is being gathered from the database since no options are required
    // in order to ask customers to fill their content. The title should suffise in this case (the same for the textarea type).

    //-------------------------------------------------------------------------
    // Here's a cheap preview:
    // Title | Content
    // ------------------------------------------------------------------------

    // From your admin/customers.php file, before this MOD was ever built, additional fields required to be
    // added manually into the file as expertise were required in order to accomplish the task without
    // any damages involved.

    // Try it here and time yourself to see how fast you can implement new fields - starting from this point.

    // Array functionality:
    // As for the other fields type -
    // The way arrays work, again, one title only. As for the content, you can add unlimited texts and values inside.
    // Ex: ("test1", "test2", "test3") and so on. Remember to add your title first.

    // In your admin/customers.php file, the results will output like this if you choose the pull down list type:

    // Title | test1
    // test2
    // test3

    // As for your radio title, it will output like this:

    // Title | <button> test1 <button> test2 <button> test3

    // If you have read this text until here, then you should understand how it works. If not, you can always request support
    // from the author for additional help.

    // 1st note: If you're worried about having your fields checked by default, don't worry - it is already implemented in the MOD.
    // 2nd note: Do NOT add the additional customers name field twice on two different form types. Otherwise, you might alter
    // your specific customer's options.
    // 3rd note: There are no checkboxes options inside this MOD yet. Reason: Checkboxes are meant for specific actions.
    // It cannot be determined on what exacly you'd like to do with these checkboxes (ex: delete, update, select, checked without validations ect ...).

    // Below are few examples on how it works. You can customize these names into the fields name you created - the way you like them to be.

    // Good luck !
    //================================================================================ =========================

    //$additional_customers_fields_form_input_title['customers_hobbies'] = array('Hobbies: ');
    //$additional_customers_fields_form_input_title['customers_age'] = array('Age: ');
    //$additional_customers_fields_form_input_title['customers_cellphone'] = array('Cellphone: ');

    // Additional Customers Fields - Form Type Table Structure (Textarea fields)
    //$additional_customers_fields_form_textarea_title['customers_hobbies'] = array('Hobbies: ');
    //$additional_customers_fields_form_textarea_title['customers_age'] = array('Age: ');
    //$additional_customers_fields_form_textarea_title['customers_cellphone'] = array('Cellphone: ');

    // Additional Customers Fields - Form Type Table Structure (Select fields - title)
    //$additional_customers_fields_form_pull_down_title['customers_hobbies'] = array('Hobbies: ');
    //$additional_customers_fields_form_pull_down_title['customers_age'] = array('Age: ');
    //$additional_customers_fields_form_pull_down_title['customers_cellphone'] = array('Cellphone: ');

    //$additional_customers_fields_form_pull_down_content['customers_hobbies'] = array("test1");
    //$additional_customers_fields_form_pull_down_content['customers_age'] = array(18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99);
    //$additional_customers_fields_form_pull_down_content['customers_cellphone'] = array("test3");





    $additional_customers_fields_form_input_title['customers_Medicine_on_prescription'] = array('Medicine on Prescription: ')
    $additional_customers_fields_form_input_title['customers_Medicine_Details'] = array('If so, please give details: ');
    $additional_customers_fields_form_input_title['customers_Months_Pregnant'] = array('If you are pregant, how many months are you?: ');
    $additional_customers_fields_form_input_title['customers_Ongoing_Medical_Conditions '] = array('Please tell us about your medical conditions: ');
    $additional_customers_fields_form_input_title['customers_Ongoing_Allergies '] = array('Please list your allergies, if any?: ');
    $additional_customers_fields_form_radio_title['customers_Medicine_used_before '] = array('Have you used this medicine before: ');
    $additional_customers_fields_form_radio_title['customers_Taking_prescribed_medicine'] = array('Are you taking any prescribed medicines?:');
    $additional_customers_fields_form_radio_title['customers_Breast_Feeding'] = array('If you have had a baby, are you breast feeding?: ');
    $additional_customers_fields_form_radio_content['customers_Medicine_used_before'] = array(Yes, No);
    $additional_customers_fields_form_radio_content['customers_Taking_prescribed_medicine'] = array(Yes, No);
    $additional_customers_fields_form_radio_content['customers_Breast_Feeding'] = array(Yes, No);
    ?>

  10. #50
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Additional Customers Fields

    Make sure NOT to use spaces within your tables.

    Example:

    //$additional_customers_fields_form_radio_content['customers_hobbies <spaces>']
    Should rather be like this - period:


    PHP Code:
    //$additional_customers_fields_form_radio_content['customers_hobbies'] 
    (Note: This applys within all your tables - no matter if it's title or content).

 

 
Page 5 of 50 FirstFirst ... 3456715 ... LastLast

Similar Threads

  1. Additional Customers Fields
    By mizio78 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 12 Aug 2011, 09:27 AM
  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

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