Hi guys,
iv created my own template and trying to gather more info from the contact page.
at the moment it is showing
name
message.
how do i make more options so that they can enter in there address, age etc...
thanxs in advance
Hi guys,
iv created my own template and trying to gather more info from the contact page.
at the moment it is showing
name
message.
how do i make more options so that they can enter in there address, age etc...
thanxs in advance
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!
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!
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
Bookmarks