This is a discussion on Super Contact Us Enhancement Mod question within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hi All, I've got this mod installed: osCommerce: Super Contact us enhancement 1.0 However, I've run into a bit of ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi All, I've got this mod installed: osCommerce: Super Contact us enhancement 1.0 However, I've run into a bit of a snag. I can't get the script to e-mail me with the new variables (email subject and order id). It also is not error checking properly, and I don't get a confirmation page message. Can someone help? It's very close. Here is my working example: Contact Us : Holy Family Hermitage—Camaldoloese Hermits of Monte Corona Here is what I have currently in my contact page: $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); // BOF: Remove blank emails // if (tep_validate_email($email_address)) { // tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); // tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); // } else { // $error = true; // $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); if (! tep_validate_email($email_address)) { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } if ($enquiry == '') { $error = true; $messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR); } if ($error == false) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); The instructions for the mod say this: OPEN catalog/contact_us.php At round about line 20 or 21 find $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); THEN REPLACE IT WITH THIS // BOF Super Contact us enhancement 1.4 $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; 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=success')); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=send')); } // EOF Super Contact us enhancement 1.4 |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Super Contact us enhancement 1.0 | michael_s | New osCommerce Contributions | 0 | 05-26-2007 04:36 PM |
| Super Contact us enhancement 1.0 | michael_s | New osCommerce Contributions | 0 | 05-25-2007 06:31 PM |
| Super Contact us enhancement 1.0 | michael_s | New osCommerce Contributions | 0 | 03-14-2007 05:10 AM |
| Super Contact us enhancement 1.0 | michael_s | New osCommerce Contributions | 0 | 02-01-2007 07:50 AM |
| Super Contact us enhancement 1.0 | michael_s | New osCommerce Contributions | 0 | 01-27-2007 01:52 AM |