Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contact Us not working correctly


webart

Recommended Posts

G'day, my Contact Us isn't working despite my orders working and generating the correct e-mail responses, guests can also tell friends about a product succesfully. The only aspect that isn't working is the standard Contact Us section. Can someone give me a standard copy of this, I'm using 2.2

 

I didn't think that I actually touched the file but I might have. I know I did do some successful modifications on the e-mail that customers get, this may have had some inadvertant effect on the Contact Us section.

 

Also, as a second question, does enabling the 'Guests can tell a friend' section, expose one to hacking more so than when it's not enabled, by hacking in this sense I mean someone using my server as an e-mail gateway for example to send their own e-mails using my IP addresses?

 

Just for the record, here is my current Contact Us code, can anyone compare it for me to the original, please?

 

<?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 © 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']);

$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'));

} 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="0" cellpadding="0">

<tr>

<td class="col_left">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</td>

<!-- body_text //-->

<td width="100%" class="col_center"><?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>

 

<?php tep_draw_heading_top();?>

 

<?php new contentBoxHeading_ProdNew($info_box_contents);?>

 

<?php tep_draw_heading_top_1();?>

 

<table cellpadding="0" cellspacing="0" border="0" width="100%">

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

 

 

 

<?php echo tep_draw_infoBox_top();?>

 

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

 

<?php echo tep_draw_infoBox_bottom();?>

 

</td>

</tr>

</table>

<?php

} else {

?>

<table cellpadding="0" cellspacing="0" border="0" width="100%">

<tr>

<td>

 

<?php echo tep_draw_infoBox_top();?>

 

<table border="0" width="100%" cellspacing="5" cellpadding="2">

<tr>

<td class="main"><?php echo ENTRY_NAME; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_draw_input_field('name'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_EMAIL; ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_draw_input_field('email'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>

</tr>

</table>

<table cellpadding="0" cellspacing="0" border="0" width="100%">

<tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr>

</table>

<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" class="bg_input"><?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>

<table cellpadding="0" cellspacing="0" border="0" width="100%">

<tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr>

</table>

 

<?php echo tep_draw_infoBox_bottom();?>

 

</td>

</tr>

</table>

 

 

<?php

}

?>

 

 

<?php tep_draw_heading_bottom_1();?>

 

<?php tep_draw_heading_bottom();?>

 

</td></tr>

</table>

</form></td>

 

<!-- body_text_eof //-->

<td class="col_right">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</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'); ?>

Regards Ron

Link to comment
Share on other sites

If you enable the 'Guests can tell a friend' section some spambot will come along and send spam to everyone and their brother, and your host will shut your site down.

 

Don't know what's going on with the contact us...

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If you enable the 'Guests can tell a friend' section some spambot will come along and send spam to everyone and their brother, and your host will shut your site down.

 

Don't know what's going on with the contact us...

:unsure:

 

Thanks Jim, I suspected as much. Given my experience with this sort of thing, I've found that they only use you for a few days before moving on, would you agree to that? If so, I'd leave it switched on, however if the spammers stayed there a long time and were simply going to use the site for as long as they could, then I'd switch it off. My question to you is, how much benefit is there by the tell a friend facility in the first place, I have a suspicion that it would probably be rarely used by the greater majority of sites. I suppose some people might get inspired to tell a friend when they happen across a super bargain, but balance that against the extra few million e-mail that the spammers send out, it probably runs a poor second. Tell me if I my gut instinct is right and that the world won't really change significantly if I switch the Guest can tell friends facility off.

 

As for the Contact Us issue, I spoke last night to the System Operator at the server, he's very helpful and said he has come across it before but can't remember what he did to fix it. He pledged to look into it on the weekend where he will have a good few hours to go through it in a backwards sense. He did say that the script was sending a file and when he checked the mail logs, it wasn't going anywhere, which is a little chilly but seems fixable if indeed he can go through his system in reverse and see exactly what is stopping the process.

 

Sorry for raving, I just wanted to tell all because this problem might happen often and something in my description my jog someone’s memory who has indeed already resolved the issue previously. :thumbsup:

Regards Ron

Link to comment
Share on other sites

Thanks Jim, I suspected as much. Given my experience with this sort of thing, I've found that they only use you for a few days before moving on, would you agree to that? If so, I'd leave it switched on, however if the spammers stayed there a long time and were simply going to use the site for as long as they could, then I'd switch it off. My question to you is, how much benefit is there by the tell a friend facility in the first place, I have a suspicion that it would probably be rarely used by the greater majority of sites. I suppose some people might get inspired to tell a friend when they happen across a super bargain, but balance that against the extra few million e-mail that the spammers send out, it probably runs a poor second. Tell me if I my gut instinct is right and that the world won't really change significantly if I switch the Guest can tell friends facility off.

 

As for the Contact Us issue, I spoke last night to the System Operator at the server, he's very helpful and said he has come across it before but can't remember what he did to fix it. He pledged to look into it on the weekend where he will have a good few hours to go through it in a backwards sense. He did say that the script was sending a file and when he checked the mail logs, it wasn't going anywhere, which is a little chilly but seems fixable if indeed he can go through his system in reverse and see exactly what is stopping the process.

 

Sorry for raving, I just wanted to tell all because this problem might happen often and something in my description my jog someone’s memory who has indeed already resolved the issue previously. :thumbsup:

 

I'm having the exact same problem (everything else working except Contact Us) so I'll be very interested in this thread. I attempted to compare your Contact_Us.php with mine but we are on different versions so there was considerable difference. I'm not a programmer so I could not tell what was functionally equivalent and what was technically different.

 

mskill99

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...