matrix2223 Posted December 21, 2009 Share Posted December 21, 2009 If we are all using the same contact us page, would someone who has this working completely in their shop add it to the package it makes no sense on having to find this replace this and so on... Do get me wrong I love the help and knowledge thats here but its hair pulling when you have to spend hours trying to get things fixed and added from multiple fixes instead of have a complete full package that works out of the box in a fresh store. Im still having the same issues and compaired it to the original to see if I could find the problem. Thanks Eric Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted December 21, 2009 Share Posted December 21, 2009 First my apologies, after further review of my site I cant send any email or anything else with an email. Im not sure as to why though, If anyone has any ideas I would appricate it greatly. Thank you Quote Link to comment Share on other sites More sharing options...
johnnybebad Posted December 23, 2009 Share Posted December 23, 2009 First my apologies, after further review of my site I cant send any email or anything else with an email. Im not sure as to why though, If anyone has any ideas I would appricate it greatly. Thank you I have had problems with this module also, and I am still to ressolve the drop down email subject and the email to the correct department. had a lot of problems with the order box(order_id), however just copied something similar and changed the names and it work so guess I may have interference from another module with that one. Thanks Quote Getting better with mods but no programmer am I. Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2010 Share Posted January 14, 2010 I have (from an add on from memory) // Contact_Us_Field_Validation - Simple Fix // if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send') && $messageStack->size('contact') < 1) { Thanks for the reply. I added what you suggested to contact_us.php and the error message works correctly when fields are incomplete, but in the case of the fields being completed correctly the email isn't sent and I don't receive it (even though the success message displays saying it was sent). Quote Link to comment Share on other sites More sharing options...
modem2.0 Posted February 6, 2010 Share Posted February 6, 2010 I have just copied v2.0 from matrix2223 but when I send email I just get the error Invalid Email and no email is sent. Any help? Quote Link to comment Share on other sites More sharing options...
modem2.0 Posted February 6, 2010 Share Posted February 6, 2010 I have just copied v2.0 from matrix2223 but when I send email I just get the error Invalid Email and no email is sent. Any help? I found the bug: After: $order_number = tep_db_prepare_input($HTTP_POST_VARS['order_number']); add: $phone_number = tep_db_prepare_input($HTTP_POST_VARS['phone_number']); Then find: <?php echo ENTRY_PHONE_NUMBER; ?><br> <?php echo tep_draw_input_field('email'); ?><br /> and replace by: <?php echo ENTRY_PHONE_NUMBER; ?><br> <?php echo tep_draw_input_field('phone_number'); ?><br /> But another problem I find, and was also present in my older contact_us file, is that the received emails don't have the line breaks that I put on the form. Does anyone know why? I don't know if it is due to my server or not. I tried with a ArGoSoft Mail Server .NET freeware on my test PC but I get the error "501 Syntax Error: Unbalanced angle brackets" and no mail is sent, although in my shop I receive the mails but no line breaks... Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted February 8, 2010 Share Posted February 8, 2010 Sorry for the delay I had just seen your post and I am working on the fix right now I will post back with new file update in a few. Thanks for pointing this out. Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted February 8, 2010 Share Posted February 8, 2010 Are you refering to line breaks in the emails sent? Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted February 8, 2010 Share Posted February 8, 2010 Just uploaded new file fixes located http://addons.oscommerce.com/info/4029 Any other errors please post here in forums and I still havent the time to fix multiple email as the original author intended. Thanks Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted February 8, 2010 Share Posted February 8, 2010 (edited) But another problem I find, and was also present in my older contact_us file, is that the received emails don't have the line breaks that I put on the form. Does anyone know why?I don't know if it is due to my server or not. I tried with a ArGoSoft Mail Server .NET freeware on my test PC but I get the error "501 Syntax Error: Unbalanced angle brackets" and no mail is sent, although in my shop I receive the mails but no line breaks... For line breaks in sent email use \n\n if you use \r\n this leaves no space providing your not using MIME if so use<br> Edited February 8, 2010 by matrix2223 Quote Link to comment Share on other sites More sharing options...
narutocrazy Posted February 20, 2010 Share Posted February 20, 2010 Hi, I have a "little" problem. I managed to edit contact_us.php using the installations instructions provided in the download package. But I am now a little clueless as to how I am supposed to change the store name, address, country, phone etc. At the end of the instructions it says to paste a certain part just above the closing tag ?> which I did (the very last one on the page I assume..?) but that doesn't do anything. Also, where it's supposed to say Order ID (if applicable), it just says ENTRY_ORDER_ID. That last bit that I'm supposed to paste in, is defining the text that is supposed to show up, but I am unsure of the location of where to paste it in (I tried two different locations in the file) but no luck so far. Hope anyone can help me. Thanks, naruto Quote Link to comment Share on other sites More sharing options...
narutocrazy Posted February 20, 2010 Share Posted February 20, 2010 Umm Ok...problem solved :P Just one other question, how do I make the formula page bigger? the width is already set to 100% and border to 0 but yet it only uses up half the room that it got to show up on the site. Quote Link to comment Share on other sites More sharing options...
designbysue Posted February 24, 2010 Share Posted February 24, 2010 Installed 2.1 and have it almost working - but the reasons are not being included in the email - Solution?? Thanks Sue Quote Link to comment Share on other sites More sharing options...
designbysue Posted February 24, 2010 Share Posted February 24, 2010 Just noticed - the phone number is not being sent either Sue Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted February 25, 2010 Share Posted February 25, 2010 Just one other question, how do I make the formula page bigger? If your talking about the tep form draw area for the message itself it is already as big as will go. The only other way to make it bigger is to change other table sizes or move it to the bottom of the page for the whole width of page. But then to me that wouldnt look quite right. Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted February 25, 2010 Share Posted February 25, 2010 (edited) Just noticed - the phone number is not being sent either Sorry for the delay in the posts back. You are indeed correct myself and another forum member is currently working on a new modern version of this add on. Below I will enclose the version I personally use and that I had designed for a client. It has a customers ability to have a copy sent to their email via check box and a user input text for subject line. Also it has the code in it for a recaptura module osCommerce_reCAPTCHA_modification_V_1.0.1. (one section at the top and near the bottom of file), which you may remove or edit with your own code. As far as the new version it will be available for release in the next few weeks(have to pay the bills first lol). This will include admin control of the reasons, and email departments as was supposed to be originally. It will also have the phone number with the proper wording in sent emails to store owner and other stuffs. Email example(corrected version to come) Contact from: Johhn Doe Reason: Reason A Order number: 123456789 Phone Number: 1231231234 Hi, ......... But for now until we can complete this or if someone else would like to participate in the under going please use the fallowing. This is the root contact us.php <?php /* $Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; // Contact_Us_Field_Validation - Simple Fix // if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send') && $messageStack->size('contact') < 1) { $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); $captchaurl = "captchaerror.php" ; require_once('captcha/recaptchalib.php'); $privatekey = "6Le_9woAAAAAABby6FJZxjxnmzxStAsMA48cQNzb"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly header( "Location: $captchaurl" ); exit ; } // start send_copy_to_customer_ $subject = tep_db_prepare_input($HTTP_POST_VARS['subject']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EXTRA_SUBJECT_STOREOWNER . ' ' . $subject, $enquiry, $name, $email_address); if (tep_send_copy_customer == true) { tep_mail($name, $email_address, EXTRA_SUBJECT_CUSTOMER . ' ' . $subject, $enquiry, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } /********** if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); **********/ // end send_copy_to_customer tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php'; ?> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="Javascript"> <!-- function MM_reloadPage(init) { //Updated by PVII. Reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="main"> <tr class="main"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <!-- BOF Super Contact us enhancement 1.41 //--> <?php } else { if (tep_session_is_registered('customer_id')) { $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $account = tep_db_fetch_array($account_query); $name = $account['customers_firstname'] . ' ' . $account['customers_lastname']; $email = $account['customers_email_address']; } ?> <tr><td> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="main"> <tr class="main"><td><table><tr> <td class="main" valign="top" width=40%><b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br> <?php echo (OPENING_HOURS); ?><br><br></td> <td class="main" valign="top" width="60%"><?php echo ENTRY_NAME; ?><br> <?php echo tep_draw_input_field('name'); ?><br /> <?php echo ENTRY_EMAIL; ?><br> <?php echo tep_draw_input_field('email'); ?><br /> <?php echo tep_draw_checkbox_field('send_copy_customer', '1', 'true') . ' ' . (tep_not_null(TEXT_COPY_CUSTOMER) ? '<span class="main">' . TEXT_COPY_CUSTOMER . '</span>': ''); ?><br /> <?php echo ENTRY_SUBJECT; ?><br> <?php echo tep_draw_input_field('subject'); ?><br /> <?php echo ENTRY_ENQUIRY; ?><br> <?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?> <br /> <?php echo SPAM_CODE; ?><br> <?php require_once('captcha/recaptchalib.php'); $publickey = "6Le_9woAAAAAAFC6-E0Dvn2hrWG-wQ3m2bBASkOn"; //your public key echo recaptcha_get_html($publickey);?><br /> </td></tr></table></td> </tr> </table> <br /> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="main"> <tr class="main"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td></tr> <?php } ?> <!-- EOF Super Contact us enhancement 1.41 //--> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> This is my english/contact_us.php <?php /* $Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ define('HEADING_TITLE', 'Contact Us'); define('NAVBAR_TITLE', 'Contact Us'); define('TEXT_SUCCESS', 'Thank You! for contacting us. Your email message has been successfully sent. If requested, We will be contacting you shortly.'); define('EMAIL_SUBJECT', 'Message from ' . STORE_NAME); define('ENTRY_NAME', 'Full Name:(Example:"John Smith")'); define('ENTRY_EMAIL', 'E-Mail Address:(Example: [email protected]")'); define('ENTRY_ENQUIRY', 'Enter Your Message Here:'); // BOF Super Contact us enhancement 1.41 define('ENTRY_PHONE_ID', 'For call backs<br>Please enter your Phone Number<br>Ex.123-456-1234:'); define('ENTRY_ORDER_ID', 'Order ID (if applicable):'); define('OPENING_HOURS', '<b>Office Hours: EST time zone</b><br> <TABLE class=main> <TR><TD class=main>Monday to Thursday</TD><TD class=main>: 8h30 to 17h00</TD></TR> <TR><TD class=main>Friday</TD><TD class=main>: 8h30 to 16h00</TR> <TR><TD class=main>Week-end</TD><TD class=main>: 8h30 to 16h00</TR><BR> <TR><TD class=main><b>Email US</b></TD></TR> </TABLE> <BR><BR> For your convenience, please use the form on the right to contact us with any comments or concerns. Please ensure that you have checked our FAQ section first as you may find the answers to your queries there. Please allow up between 15 minutes to 24 hours for a reply. '); define('ENTRY_REASON', 'Email Subject: '); define('EXTRA_SUBJECT_CUSTOMER', 'Copy of:'); define('EXTRA_SUBJECT_STOREOWNER', 'Inquiry:'); define('TEXT_COPY_CUSTOMER', 'Send me a copy'); define('ENTRY_SUBJECT', 'Subject/ordernumber:'); define('SEND_TO_TEXT', 'Send Contact Form Email To:'); //define('SEND_TO_TYPE', 'radio'); //this will create a radio buttons for your contact list //define('SEND_TO_TYPE', ''); //Change to this for a dropdown menu. define('REASONS1', ' General Inquiry'); define('REASONS2', ' Custom Computer'); define('REASONS3', ' Software Issue'); define('REASONS4', ' Hardware Issue'); define('REASONS5', ' Network Installation'); define('REASONS6', ' Server Build/Issue'); define('REASONS7', ' Website Design'); define('REASONS8', ' Registration problem'); define('REASONS9', ' Login problem'); $contact_reason_array = array(REASONS1, REASONS2, REASONS3, REASONS4, REASONS5, REASONS6, REASONS7, REASONS8, REASONS9); // custom add to automate drop-down box population. To create additional reasons, add Define statement above and add defined constant to array. // BOF Super Contact us enhancement 1.41 define('SPAM_CODE', 'Anti Spam field<br>please type in the words as you see them,<br>this is for anti spam protection.'); ?> If you need any further assistance please feel free to contact me. Thank you Edited February 25, 2010 by matrix2223 Quote Link to comment Share on other sites More sharing options...
designbysue Posted February 25, 2010 Share Posted February 25, 2010 After poking vs 1.4 with a stick for a while and reading the posts in the forum I finally got this to work. I am posting my catalog>contact_us.php below. Please remember to enable Verify email addresses through DNS in your admin of the catalog. This code has the right column removed but you can add it by replacing the code <!-- removedrightcolumn //-->. <?php /* $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); // BOF Super Contact us enhancement $order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']); if ($order_id <> NULL){ $enquiry = 'From : ' . $name . "\n" . 'email : ' . $email_address . "\n" . 'Order ID: ' . $order_id . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']); }else{ $enquiry = 'From : ' . $name . "\n" . 'email : ' . $email_address . "\n" . 'Order ID: No order number input' . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']); } $emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT . $name; if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $emailsubject, $enquiry, $name, $email_address); if (CONTACT_US_LIST !=''){ $send_to_array=explode("," ,CONTACT_US_LIST); preg_match('/\<[^>]+\>/', $send_to_array[$send_to], $send_email_array); $send_to_email= eregi_replace (">", "", $send_email_array[0]); $send_to_email= eregi_replace ("<", "", $send_to_email); tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address); }else{ //tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=send')); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=send')); } // EOF Super Contact us enhancement 1.41 tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <!-- BOF Super Contact us enhancement 1.41 //--> <?php } else { if (tep_session_is_registered('customer_id')) { $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $account = tep_db_fetch_array($account_query); $name = $account['customers_firstname'] . ' ' . $account['customers_lastname']; $email = $account['customers_email_address']; } ?> <tr><td> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"><td><table><tr> <td class="main" valign="top" width=30%><b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br> <?php echo (OPENING_HOURS); ?><br><br></td> <td class="main" valign="top" width="70%"><?php echo ENTRY_NAME; ?><br> <?php echo tep_draw_input_field('name'); ?><br /> <?php echo ENTRY_EMAIL; ?><br> <?php echo tep_draw_input_field('email'); ?><br /> <?php echo ENTRY_ORDER_ID; ?><br> <?php echo tep_draw_input_field('order_id'); ?><br /> <?php if (CONTACT_US_LIST !=''){ echo SEND_TO_TEXT . '<br>'; if(SEND_TO_TYPE=='radio'){ foreach(explode("," ,CONTACT_US_LIST) as $k => $v) { if($k==0){ $checked=true; }else{ $checked=false; } echo tep_draw_radio_field('send_to', "$k", $checked). " " .preg_replace('/\<[^*]*/', '', $v); } }else{ foreach(explode("," ,CONTACT_US_LIST) as $k => $v) { $send_to_array[] = array('id' => $k, 'text' => preg_replace('/\<[^*]*/', '', $v)); } echo tep_draw_pull_down_menu('send_to', $send_to_array); } echo('<br>'); } ?> <?php echo ENTRY_REASON; ?><br> <select name="reason"> <?php echo '<option value="' . REASONS1 . '">' . REASONS1 . '</option>'; ?> <?php echo '<option value="' . REASONS2 . '">' . REASONS2 . '</option>'; ?> <?php echo '<option value="' . REASONS3 . '">' . REASONS3 . '</option>'; ?> <?php echo '<option value="' . REASONS4 . '">' . REASONS4 . '</option>'; ?> <?php echo '<option value="' . REASONS5 . '">' . REASONS5 . '</option>'; ?> <?php echo '<option value="' . REASONS6 . '">' . REASONS6 . '</option>'; ?> </select><br /> <?php echo ENTRY_ENQUIRY; ?><BR> <?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?> <br /> </td></tr></table></td> </tr> </table> <br /> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_send.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td></tr> <?php } ?> <!-- EOF Super Contact us enhancement 1.41 //--> </table></form></td> <!-- body_text_eof //--> <!-- removedrightcolumn //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> My language contact_us.php is as follows: <?php /* $Id: contact_us.php,v 1.7 2002/11/19 01:48:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('HEADING_TITLE', 'Contact Us'); define('NAVBAR_TITLE', 'Contact Us'); define('TEXT_SUCCESS', 'Your question has been successfully sent to the Paintball Warehouse Tac House.'); define('EMAIL_SUBJECT', 'Question from ' . STORE_NAME); define('ENTRY_NAME', 'Full Name:'); define('ENTRY_EMAIL', 'E-Mail Address:'); define('ENTRY_ENQUIRY', 'Question:'); // BOF Super Contact us enhancement 1.41 define('ENTRY_ORDER_ID', 'Order ID (if applicable):'); define('OPENING_HOURS', '<b>Hours:</b><br> <TABLE class=main> <TR><TD class=main>Monday to Friday</TD><TD class=main>: 9 - 5 EST</TD></TR> <TR><TD class=main>Saturday</TD><TD class=main>: 9 - 1 EST</TR> </TABLE> <BR><BR> For your convenience, please use the form on the right to contact us with any comments or concerns. Please allow up to 24 hours for a reply. '); define('ENTRY_REASON', 'Email Subject: '); define('SEND_TO_TEXT', 'Send Contact Form Email To:'); define('SEND_TO_TYPE', 'radio'); //this will create a radio buttons for your contact list //define('SEND_TO_TYPE', ''); //Change to this for a dropdown menu. define('REASONS1', ' General Question'); define('REASONS2', ' Advertising'); define('REASONS3', ' Product Information'); define('REASONS4', ' Ordering and Shipping'); define('REASONS5', ' Returns'); define('REASONS6', ' Website Problems'); // BOF Super Contact us enhancement 1.41 ?> Again this is vs 1.4 not vs 2 so uses the sql upload. I hope this helps others trying to find their way through this one. Maybe a developer could (after testing) upload this cleaned up version. Sue Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted February 26, 2010 Share Posted February 26, 2010 Thank you Sue, I have tested your code on my server and everything works great. I'll add the customer requests a copy of email code to it and upload. Thank you kindly Eric Quote Link to comment Share on other sites More sharing options...
mikenew Posted March 2, 2010 Share Posted March 2, 2010 I'm creating a new site and had installed Anti Robot Registration Validation 1.0 + images and wanted to also instal the Super Contact, but obviously the "catalog/contact_us.php" is different and they both change the same parts. I'm a total noob here, is there any support for 3.1 or can anyone help me with a mashup of both contact us files to make a super contact us w/ the anti robot. Any help on this would be greatly appreciated! Thanks, Mike Quote Link to comment Share on other sites More sharing options...
matrix2223 Posted March 2, 2010 Share Posted March 2, 2010 Mike, Look at the code for each change from stock form and add in the differences for the new code. Backup your files, try it out, if it doesn't work, post your complete error message, and the section only that the error is referring to, not the whole file. When your script shows an error in a browser. It will tell you at what line and what file the script stopped at. Eric Quote Link to comment Share on other sites More sharing options...
knifeman Posted April 21, 2010 Share Posted April 21, 2010 (edited) Thank you Sue, I have tested your code on my server and everything works great. I'll add the customer requests a copy of email code to it and upload. Thank you kindly Eric Eric, I just installed version 2.1. I prefer that one as there is no sql to run. Anyway, as noted before in the thread, the phone number and subject reason are not being included in the e-mail. Since Sue has the older version working, is support for the non SQL version stopped? Tim Edited April 21, 2010 by knifeman Quote Link to comment Share on other sites More sharing options...
DJMark Posted April 22, 2010 Share Posted April 22, 2010 (edited) great thanks Edited April 22, 2010 by DJMark Quote Link to comment Share on other sites More sharing options...
Javihrac Posted April 27, 2010 Share Posted April 27, 2010 (edited) Hi, I have the "Your E-Mail Address does not appear to be valid - please make any necessary corrections." problem. I read here that somepeople have the same error, but I can't find the solution... :'( thanks¡ Javier Edited April 27, 2010 by Javihrac Quote Link to comment Share on other sites More sharing options...
albertabc Posted May 27, 2010 Share Posted May 27, 2010 Hi. I installed Contact Us Super Enhancement V2.1 and got the issue as below. Your help is appreciated.Thanks 1. How to adjust height between the header and main body? I played around with it but couldn't move the body more close to the header. 2. How to adjust width of this? No matter what width I set, I couldn't make wider. 3. I received without Customer's telephone and Email Subject is not one of the Enquiry Reasons. The email subject will be Enquiry from "My Store Name" all the time. How can I fix this? 4. No matter what email address I put in, as long as it's in [email protected], it would go through. Is there a way to check if the input email is valid before sending through from my website? My contact_us.php code as below. <?php /* $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // BOF Anti Robot Registration v3.0 if (ACCOUNT_VALIDATION == 'true' && CONTACT_US_VALIDATION == 'true') { require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_VALIDATION); include_once('includes/functions/' . FILENAME_ACCOUNT_VALIDATION); } // EOF Anti Robot Registration v3.0 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { // BOF Anti Robotic Registration v3.0 if (ACCOUNT_VALIDATION == 'true' && CONTACT_US_VALIDATION == 'true') { include(DIR_WS_MODULES . FILENAME_CHECK_VALIDATION); if ($entry_antirobotreg_error == true) $messageStack->add('contact', $text_antirobotreg_error); } // EOF Anti Robotic Registration v3.0 $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); $order_number = tep_db_prepare_input($HTTP_POST_VARS['order_number']); // BOF Super Contact us enhancement 2.0 $order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']); $phone_number = tep_db_prepare_input($HTTP_POST_VARS['phone_number']); if ($phone_number <> NULL){ $enquiry = 'Phone Number(include area code): ' . $phone_number . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']); }else{ $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); } // eof $order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']); if ($order_id <> NULL){ $enquiry = 'Order ID#: ' . $order_id . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']); }else{ $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); } $emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT; // BOF Anti Robot Registration v3.0 if (!tep_validate_email($email_address)) { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } elseif (!$entry_antirobotreg_error == true) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } } header('cache-control: no-store, no-cache, must-revalidate'); header("Pragma: no-cache"); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); // EOF Anti Robotic Registration v3.0 ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <?php // Header Tag Controller if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE; ?></title> <?php } // EOF Header Tag Controller ?> <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="Javascript"> <!-- function MM_reloadPage(init) { //Updated by PVII. Reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="1060" cellspacing="1" cellpadding="1" align="center"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top" class="left"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td align="right"><br><a href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></a></td> </tr> </table></td> </tr> <!-- BOF Super Contact us enhancement 1.4 //--> <?php } else { if (tep_session_is_registered('customer_id')) { $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $account = tep_db_fetch_array($account_query); $name = $account['customers_firstname'] . ' ' . $account['customers_lastname']; $email = $account['customers_email_address']; } ?> <tr><td> <table border="1 " width="100%" cellspacing="0" cellpadding="2" class="infoBox"> <tr class="infoBoxHeading"><td><table width="100%"><tr> <td class="main" valign="top" width=35%><b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br> <?php echo (TEXT_INFORMATION); ?><br> <?php echo (OPENING_HOURS); ?><br><br></td> <td class="main" valign="top" width="65%"><?php echo ENTRY_NAME; ?><br> <?php echo tep_draw_input_field('name'); ?><br /> <?php echo ENTRY_EMAIL; ?><br> <?php echo tep_draw_input_field('email'); ?><br /> <?php echo ENTRY_PHONE_NUMBER; ?><br> <?php echo tep_draw_input_field('phone_number'); ?><br /> <?php echo ENTRY_ORDER_ID; ?><br> <?php echo tep_draw_input_field('order_id'); ?><br /> <?php echo ENTRY_REASON; ?><br> <select name="reason"> <?php echo '<option value="' . REASONS1 . '">' . REASONS1 . '</option>'; ?> <?php echo '<option value="' . REASONS2 . '">' . REASONS2 . '</option>'; ?> <?php echo '<option value="' . REASONS3 . '">' . REASONS3 . '</option>'; ?> <?php echo '<option value="' . REASONS4 . '">' . REASONS4 . '</option>'; ?> <?php echo '<option value="' . REASONS5 . '">' . REASONS5 . '</option>'; ?> <?php echo '<option value="' . REASONS6 . '">' . REASONS6 . '</option>'; ?> </select><br /> <?php echo ENTRY_ENQUIRY; ?><BR> <?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?> <br /> </td></tr> <!-- // BOF Anti Robot Registration v3.0--> <?php if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'contact_us') && CONTACT_US_VALIDATION == 'true') include(DIR_WS_MODULES . FILENAME_DISPLAY_VALIDATION); ?> <!-- // EOF Anti Robot Registration v3.0--> </table></td> </tr> </table> <br /> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxHeading"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td></tr> <?php } ?> <!-- EOF Super Contact us enhancement 1.4 //--> </table></td> <!-- body_text_eof //--> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Thank you! Albert Quote Link to comment Share on other sites More sharing options...
imran7 Posted June 29, 2010 Share Posted June 29, 2010 I just downloaded this contribution and i got say a HUGE thanks! this is exactly what i needed....thanks again! i made some changes and now only have 1 minor thing i need to change. Here is the url to my contact us page: http://amedeoexclusive.com/contact_us.php all i want to change is that little "continue" button at the bottom right of the page, just under the enquiry box. Its black so its so hard to see, does anyone know how i can change the color of that to a creamish font or a white font or baiscally just about any other color so customers can actually see it, right now its so hard to see. Thanks so much in advance and again thanks for the contribution! Imran Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.