osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Super Contact Us Enhancement Mod question

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 05-11-2007, 08:23 PM
Member
 
Join Date: Mar 2007
Posts: 36
Thanks: 6
Thanked 1 Time in 1 Post
Rep Power: 0
mjfontec is on a distinguished road
Default Super Contact Us Enhancement Mod question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 12:09 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax