Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2007
    Posts
    212
    Plugin Contributions
    0

    Default collect additional info..

    Hi guys,

    iv created my own template and trying to gather more info from the contact page.

    at the moment it is showing

    name
    email
    message.

    how do i make more options so that they can enter in there address, age etc...

    thanxs in advance

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: collect additional info..

    You can add the new inputs similar to the name ... but then you need to customize the file:
    /includes/pages/contact_us/header_php.php

    To include the information when the email is sent ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Feb 2007
    Posts
    212
    Plugin Contributions
    0

    Default Re: collect additional info..

    Quote Originally Posted by Ajeh View Post
    You can add the new inputs similar to the name ... but then you need to customize the file:
    /includes/pages/contact_us/header_php.php

    To include the information when the email is sent ...
    Thanks for the quick reply...

    I would like customers to sign up before they are able to contact me.

    is that possible?

    thanxs

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: collect additional info..

    You could test if the customer is logged in and if not send them to the login page first ...

    This way, they would have to have an account or not be able to complete the form ...

    Note: many will not be thrilled that they have to login to contact the site ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Feb 2007
    Posts
    212
    Plugin Contributions
    0

    Default Re: collect additional info..

    Quote Originally Posted by Ajeh View Post
    You can add the new inputs similar to the name ... but then you need to customize the file:
    /includes/pages/contact_us/header_php.php

    To include the information when the email is sent ...
    ok iv edited this file and the contact us page (http://unikids.splay.co.uk/zencart/i...age=contact_us)

    and i can see the new title (book title) but when filled in the email only delivers the name, email and message?

    HERE ARE PARTS OF THE FILES I AM EDITING:

    this is part of my header file:

    $error = false;
    if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
    $name = zen_db_prepare_input($_POST['contactname']);
    $booktitle = zen_db_prepare_input($_POST['booktitle']);
    $email_address = zen_db_prepare_input($_POST['email']);
    $enquiry = zen_db_prepare_input(strip_tags($_POST['enquiry']));

    $zc_validate_email = zen_validate_email($email_address);

    if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
    // auto complete when logged in
    if($_SESSION['customer_id']) {
    $sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id
    FROM " . TABLE_CUSTOMERS . "
    WHERE customers_id = :customersID";

    $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
    $check_customer = $db->Execute($sql);
    $customer_email= $check_customer->fields['customers_email_address'];
    $customer_booktitle= $check_customer->fields['customers_booktitle'];
    $customer_name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
    } else {
    $customer_email='Not logged in';
    $customer_name='Not logged in';

    Do i need to add anything here???

    ---------------------------

    part of my contact us page:


    define('ENTRY_NAME', 'Full Name:');
    define('ENTRY_BOOKTITLE', 'Book Title:');
    define('ENTRY_EMAIL', 'Email Address:');

    define('ENTRY_ENQUIRY', 'Message:');



    ----------------------


    part of my tpl_contact_us_default

    <?php
    // show dropdown if set
    if (CONTACT_US_LIST !=''){
    ?>
    <label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>
    <?php echo zen_draw_pull_down_menu('send_to', $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />
    <?php
    }
    ?>

    <label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?></label>
    <?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>
    <?php echo zen_draw_input_field('email', ($error ? $_POST['email'] : $email), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="booktitle"><?php echo ENTRY_BOOKTITLE; ?></label>
    <?php echo zen_draw_input_field('booktitle', $name, ' size="40" id="booktitle"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />

    <label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
    <?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>

    </fieldset>



    REGARDS

    VIK

 

 

Similar Threads

  1. v151 Can I force PayPal to collect UK County info so I can calculate VAT on it?
    By FrankStephen in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 14 Feb 2015, 03:19 PM
  2. Replies: 1
    Last Post: 9 Jul 2009, 05:50 PM
  3. Replies: 11
    Last Post: 20 Apr 2009, 10:22 PM
  4. Replies: 2
    Last Post: 23 Jul 2006, 06:19 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