Here is my code...
This is in the tpl_product_info_display.php
Code:
<!--bof Email For Price -->
<div id="askQuestion" class="biggerText">
<?php echo zen_draw_form('email_price_quote', zen_href_link(FILENAME_EMAIL_PRICE_QUOTE, 'action=send&products_id=' . $_GET['products_id'])); ?>
<fieldset id="contactUsForm">
<legend>Enter Your Email For a Price Quote</legend>
<label class="inputLabel" for="email-address">Email Address:</label>
<input type="text" name="email" size="40" id="email-address" />
<br class="clearBoth" />
<br /><br />Your email address will not be stored.
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
</fieldset>
</form></div>
<br />
<br class="clearBoth" />
<!--eof Email For Price -->
Here is my tpl_email_price_quote_default.php
Code:
<div class="centerColumn" id="askAQuestion">
<div class="mainContent success">Check your email for our Price Quote!</div>
<div class="buttonRow"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
</div>
Here is my header_php.php
Code:
$valid_product = false;
if (isset($_GET['products_id'])) {
$superstore_price = zen_get_products_display_price((int)$_GET['products_id']);
$product_info_query = "select pd.products_name, p.products_price, p.products_model
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_status = '1'
and p.products_id = '" . (int)$_GET['products_id'] . "'
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
$product_info = $db->Execute($product_info_query);
if ($product_info->RecordCount() > 0) {
$valid_product = true;
}
}
if ($valid_product == false) {
zen_redirect(zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']));
}
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$error = false;
if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
$email_address = zen_db_prepare_input($_POST['email']);
$zc_validate_email = zen_validate_email($email_address);
$send_to_name = "Supercharger Superstore Customer";
$email_subject = "Price Quotation on" . $product_info->fields['products_model'] . "From SuperchargerSuperstore.com";
$email_text = "";
$name = "Supercharger Superstore";
$email_address = "[email protected]";
// Prepare HTML-portion of message
$html_msg['EMAIL_MESSAGE_HTML'] = '<b>Thank you for enquiring with SuperchargerSuperstore.com!</b><br><br>You requested a price quotation on: ' . $product_info->fields['products_name'] . '<br>Part Number: ' . $product_info->fields['products_model'] . '<br><b>SuperchargerSuperstore price: ' . $superstore_price . '</b><br>MSRP: ' . $product_info->fields['products_price'] . '<br><br>If you would like to purchase this system, <a href="http://www.superchargersuperstore.com/index.php?main_page=index&action=buy_now&products_id=' . $_GET['products_id']) . '">please click here to add it to your shopping cart.</a><br /><br>Thank you,<br><b>The Supercharger Superstore</b><br><br>Please note: Pricing and availability are subject to change at any time without prior notice. Please consult our terms and conditions pages on our website.<br>';
// Send message
// reuse contact_us form so we get the correct reply-to and don't have
// to change includes/functions/functions_email.php (which has special
// hooks for contact_us.
zen_mail($send_to_name, $email_address, $email_subject, $text_message, $name, $email_address, $html_msg,'contact_us');
} // end action==send
// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_EMAIL_PRICE_QUOTE, 'false');
$breadcrumb->add(NAVBAR_TITLE);