Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Super Contact us enhancement 1.0


John-Peter

Recommended Posts

Hello.

 

I uploaded your code to my ISP and tried it on our site. It works without any problems here.

I have to say it seems that your ISP is using som special settings or something to break the send function.

 

Have you tried sending other emails from the site? Tell a friend, order confirmations and so on?

 

Cheers.

 

When a customer sends mail through contact_us.php

 

it appears to the customer as though it was successful....

 

but infact no mail is ever sent.

 

I checked admin...and it all looks correct so i contacted the server provider.

 

they looked at contact_us.php and tested the email I have with them...and replied me with,

 

"there is no mail ID set in the script to which the enquiery has to be sent. This is the reason why the sending of the mails is failing."

 

I have contact_us.php below but have no idea....and it has been hard to get an answer,

 

I have checked and rechecked admin at least 10 times now!,

 

COME ON GUYS Please help!

QUOTE

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 339
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Problem Resolved: Found the problem in my php.ini file under the root directory.

This is the line I had to change:

[mail function]

; For Win32 only.

SMTP = localhost

 

; For Win32 only.

sendmail_from = admin@localhost

 

Changed to this:

[mail function]

; For Win32 only.

SMTP = localhost

 

; For Win32 only.

sendmail_from = [email protected]

 

Hi, there!

I have the same problem... and I would like to solve it... but I can't find any php.ini file in my root directory... :( Does it have another name? Thank you

Link to comment
Share on other sites

Hi, there!

I have the same problem... and I would like to solve it... but I can't find any php.ini file in my root directory... :( Does it have another name? Thank you

 

it's not about the oScommerce file, it's about the Apache server file... If you have it installed on your PC, it's ok but if it's for your hosting company, you can't change it like this...

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Link to comment
Share on other sites

it's not about the oScommerce file, it's about the Apache server file... If you have it installed on your PC, it's ok but if it's for your hosting company, you can't change it like this...

oooooohhhhhhhhh... ok. :( I don't have it installed on my PC :(( Do you know if there is any other solution to this?

 

Thank you!

 

Simone

Link to comment
Share on other sites

oooooohhhhhhhhh... ok. :( I don't have it installed on my PC :(( Do you know if there is any other solution to this?

 

Thank you!

 

Simone

 

I don't know for now because I don't use this kind of solution to make the email work, I use the normal thing Oscommerce deal with the email. I don't have check for a solution for the people which have the error thing. One day, I will.

Edited by Jeep_ice

John

--------------------

osCommerce 2.3.4 Bootstrap Edge

Link to comment
Share on other sites

  • 1 month later...

When I istall the new "Super Contact us Enhancement 1.0" I don't see a drop down menu for Email Depts. just for the reasons. and when I do an email test I get this fallowing error:

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

 

 

--------------------------------------------------------------------------------

 

Apache/1.3.33 Server at www.mtechama-test.com Port 80

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Link to comment
Share on other sites

Hi there,

 

So far so good on the contribution. However, I have two things thus far I need help with.

 

1 - I send a test email and the "success" page is messed up. Here is the URL for that ...

http://www.mysite.com/catalog/contact_us.php?action=success

 

It repeats my little upright corner image into the main body of hte page, left justified and states "TEXT_SUCCESS".

 

Is there anything I can do about this?

 

2 - The table setup for the left side of the contact us page, the side with the store address and hours, is screwy. It's creating a TD to the left of the wording and I can't get rid of it ... this is causing a large void of space between my left column and the main part of the contact us page, as you can see here:

http://www.moonlightdelights.com/catalog/contact_us.php You can go ahead and do a test email to see the success page as I described in my first question.

 

Here is my contact_us.php code:

 

<?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']);
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

// BOF Super Contact us enhancement 1.0 

$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)) {
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_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $emailsubject, $enquiry, $name, $email_address);
}
// EOF Super Contact us enhancement 1.0 

  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>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>
<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="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="90%" cellspacing="0" cellpadding="0" align="center">
	  <tr>
		<td class="pageHeading"><center><?php echo HEADING_TITLE; ?></center></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'silvermoon.jpg', 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 . 'silvermoon.jpg', 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="90%" 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.0 //-->
<?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="90%" cellspacing="0" cellpadding="0" align="center">
		<tr> 
			<td width="650" height="0"></td>
			<td width="600"></td>
		</tr>

		<tr> 
			<td rowspan="11" valign="top"> 
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
			   		<tr> 
				   		<td colspan="2" align="left" valign="top" class="main"></td>
			   		</tr>
					<tr> 
						<td width="38" height="120" align="left" valign="top" class="main"></td>
							<td width="334" valign="top">
								  <table width="100%" border="0" cellpadding="0" cellspacing="0">
									<tr> 
										  <td width="333" height="120" align="left" valign="top" class="main">
										  <STRONG><?php echo nl2br(STORE_NAME_ADDRESS); ?></STRONG><br><br>
										  <?php echo (OPENING_HOURS); ?>
										  </td>
										  <td width="10">?</td>
			 						</tr>
								</table>
							</td>
					  </tr>
					<tr> 
						<td align="left" valign="top" class="main"><p>?</p></td>
					</tr>
				</table>
			</td>
			<td height="40" valign="top" class="main">
				<?php echo ENTRY_NAME; ?><br>
				<?php echo tep_draw_input_field('name'); ?>
			</td> 
		</tr>
		<tr> 
			<td height="4"></td>
		</tr>
		<tr> 
			<td height="40" valign="top" class="main">
				<?php echo ENTRY_EMAIL; ?><br>
				<?php echo tep_draw_input_field('email'); ?>
			</td> 
		</tr>
		<tr> 
			<td height="40" valign="top" class="main">
				<?php echo ENTRY_ORDER_ID; ?><br>
				<?php echo tep_draw_input_field('order_id'); ?>
			</td> 
		</tr>
		<tr> 
			<td height="4"></td>
		</tr>

		<tr> 
			<td height="40" valign="top" class="main">
<?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;
		}
?>
			</td> 
		</tr>
		<tr> 
			<td height="4"></td>
		</tr>
		<tr> 
			<td height="40" valign="top" class="main">
				<?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>
			</td> 
		</tr>
		<tr> 
			<td height="4"></td>
		</tr>
		<tr> 
			<td height="200" width="350" valign="top" class="main">
				<?php echo ENTRY_ENQUIRY; ?><BR>
				<!-- BOF This is the change for the Form Vunerability Fix //-->
				<?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?>
				<!-- EOF This is the change for the Form Vunerability Fix //-->
			</td>
		</tr>
		<tr> 
			<td height="4"></td>
		</tr>
		<tr> 
			<td height="66" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr> 
					<td width="547" height="62" valign="top" align="middle"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
				</tr>
				<tr>
					<td height="4"></td>
				</tr>
			</table>
		</td>
	  </tr>
		<tr> 
			<td height="41" colspan="2" align="left" class="main"><br> </td>
		</tr>
			</table>
			</td>
		</tr>
		<tr>
			<td height="41" colspan="2" align="left" class="main"><br> </td>
		</tr>
<?php
 }
?>
<!-- EOF Super Contact us enhancement 1.0 //-->

</table></form></td>
<!-- body_text_eof //-->

<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

I just want my test line up on the left side to be like my other pages (FAQ, Shipping, etc) ... I have my main table for each page set at 90% width - which is what I want. It's just that the left side of the text has that added TD I can't get rid of. When I do delete it, it messes EVERYTHING up.

 

Also, I would like the "continue" button to appear under the comment box, but when I move that TD, the page messes up also.

 

Thanks in advance. Now off to see if my test email made it to the inbox.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

I get this when trying to tun the SQL???

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/phpmyadmin/libraries/header_meta_style.inc.php:27) in /usr/share/phpmyadmin/libraries/common.lib.php on line 1154

 

 

Helle :-(

Link to comment
Share on other sites

  • 2 weeks later...

ok I got the SQL error - but the SQL code got in the database - anyway!

 

Tested it - looks great, but the only thing I get is this error message no matter WHAT email I type in:

Your E-Mail Address does not appear to be valid - please make any necessary corrections.

 

Furthermore, if I ever get to correct this error, I would love if this page could work together with Anti Robot Registration 2.5

 

Helle :blink:

Link to comment
Share on other sites

This is the standard contact_us.php page with the great Anti Robot Validation v2.5 added.

How do I implement this with this nice looking contrib???

 

Helle - please someone - is it not possible?

 

 

 

 

________________________________

 

 

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

 

// BOF Anti Robot Validation v2.5

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

 

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

if (ACCOUNT_VALIDATION == 'true' && CONTACT_US_VALIDATION == 'true') {

$sql = "SELECT * FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "' LIMIT 1";

if( !$result = tep_db_query($sql) ) {

$error = true;

$entry_antirobotreg_error = true;

$text_antirobotreg_error = ERROR_VALIDATION_1;

} else {

$entry_antirobotreg_error = false;

$anti_robot_row = tep_db_fetch_array($result);

if (( strtoupper($HTTP_POST_VARS['antirobotreg']) != $anti_robot_row['reg_key'] ) || ($anti_robot_row['reg_key'] == '') || (strlen($antirobotreg) != ENTRY_VALIDATION_LENGTH)) {

$error = true;

$entry_antirobotreg_error = true;

$text_antirobotreg_error = ERROR_VALIDATION_2;

} else {

$sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE session_id = '" . tep_session_id() . "'";

if( !$result = tep_db_query($sql) ) {

$error = true;

$entry_antirobotreg_error = true;

$text_antirobotreg_error = ERROR_VALIDATION_3;

} else {

$sql = "OPTIMIZE TABLE " . TABLE_ANTI_ROBOT_REGISTRATION . "";

if( !$result = tep_db_query($sql) ) {

$error = true;

$entry_antirobotreg_error = true;

$text_antirobotreg_error = ERROR_VALIDATION_4;

} else {

$entry_antirobotreg_error = false;

}

}

}

}

if ($entry_antirobotreg_error == true) $messageStack->add('contact', $text_antirobotreg_error);

}

// EOF Anti Robotic Registration v2.5

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

 

// BOF Anti Robot Registration v2.5

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

}

 

// EOF Anti Robotic Registration v2.5

}

 

$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_LEFT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" 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>

<?php

} else {

?>

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

</tr>

</table></td>

</tr>

<tr>

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

</tr>

 

<?php

// BOF Anti Robot Registration v2.5

if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'contact_us') && CONTACT_US_VALIDATION == 'true') {

?>

<tr>

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

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="2" cellpadding="2">

<tr>

<?php

if (ACCOUNT_VALIDATION == 'true' && strstr($PHP_SELF,'contact_us') && CONTACT_US_VALIDATION == 'true') {

if ($is_read_only == false || (strstr($PHP_SELF,'contact_us')) ) {

$sql = "DELETE FROM " . TABLE_ANTI_ROBOT_REGISTRATION . " WHERE timestamp < '" . (time() - 3600) . "' OR session_id = '" . tep_session_id() . "'";

if( !$result = tep_db_query($sql) ) { die('Could not delete validation key'); }

$reg_key = gen_reg_key();

$sql = "INSERT INTO ". TABLE_ANTI_ROBOT_REGISTRATION . " VALUES ('" . tep_session_id() . "', '" . $reg_key . "', '" . time() . "')";

if( !$result = tep_db_query($sql) ) { die('Could not check registration information'); }

?>

<tr>

<td class="main"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">

<tr>

<td class="main"><table border="0" cellspacing="0" cellpadding="2">

<tr>

<td class="main" width="100%" NOWRAP><span class="main"> <?php echo ENTRY_ANTIROBOTREG; ?></span></td>

</tr>

<tr>

<td class="main" width="100%">

<?php

$check_anti_robotreg_query = tep_db_query("select session_id, reg_key, timestamp from anti_robotreg where session_id = '" . tep_session_id() . "'");

$new_guery_anti_robotreg = tep_db_fetch_array($check_anti_robotreg_query);

$validation_images = tep_image('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id']);

if ($entry_antirobotreg_error == true) {

?>

<span>

<?php

echo $validation_images . ' <br> ';

echo tep_draw_input_field('antirobotreg') . ' <br><b><font color="red">' . ERROR_VALIDATION . '<br>' . $text_antirobotreg_error . '</b></font>';

} else {

?>

<span>

<?php

echo $validation_images . ' <br> ';

echo tep_draw_input_field('antirobotreg', $account['entry_antirobotreg']) . ' ' . ENTRY_ANTIROBOTREG_TEXT;

}

}

}

?>

</span>

</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

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

</tr>

<?php

}

// EOF Anti Robot Registration v2.5

?>

 

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

}

?>

</table></form></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH_RIGHT; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" 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'); ?>

Link to comment
Share on other sites

i just had set up contact_us enhancement 1.0 on my localhost testing server on apache host and my first expression is simply => "i love it" . thanks for this contribution :)

 

I'm excited to see it on the action on my web server. But a little bit confused to read all the negative comments about users having problems on the action :huh: i hope it works great as well as it looks great;) Because i had the problem below on the testing server and i'm worried to set it up on the production server ?? :( :

 

Warning: main(includes/languages/turkish/cookie_usage.php) [function.main]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\shop\cookie_usage.php on line 15

Fatal error: main() [function.require]: Failed opening required 'includes/languages/turkish/cookie_usage.php' (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\shop\cookie_usage.php on line 15

 

i also made a turkish translation for this enhancement and upload to the contribution area of oscommerce site :thumbsup:

Edited by hakand
Link to comment
Share on other sites

i finally installed it on the remote server.

it looks perfect but i have the same problem as most of the people tried this contibution here

i don't receive my test mails although i got the message "your mail has been succesfully sent to store owner" :(

i have done everything right just as explained ; i have read all the posts in this topic many times but i can't fix it up

i use yahoo small business web hosting service and i also got suspicious if that would be because of my hosting company's own settings or any other requirements except this enhancment code. I recieve order emails but can't recieve contact_us emails only so i thought maybe that's just because of php-mail settings of yahoo web hosting or special php code requirements of yahoo hosting service. And finally i found this information on this website(please click to see) about php requirements of yahoo hosting service. i'm totally newbie to php so would you please check it out for me and all those other users having difficulties recieving test emails ? :rolleyes: i'd really appreciate to hear your comments about this.i really loved your contact_us contribution (i've translated it to Turkish and added it on the contribution page) and i don't want to turn back to standard email_us form :'(

Link to comment
Share on other sites

sorry for posting one on other :blush: but i had to add an important new info about my situation. i prepared a simple code to test if the problem is derived from the enhancement or from my hosting company requirements. i uploaded it to remote host and when i tried it out i got my test emails with success. So i guess problem is something about this enhancement :(

 

the code i tried is as below :

<?php 
mail("sales@*******.com", "Email Test", "Line 1 TestingnLine 2 Another Line of Text nLine 3 Even more Testing"); 
echo "Okay"; 
?>

Link to comment
Share on other sites

i've also checked out my mail error logs on the server and found that : :huh:

 

From address not in member domain. Message not sent.

 

May i please learn which code does this enhancement use to send mail ? so maybe i can check it out myself :)

Edited by hakand
Link to comment
Share on other sites

Hi Jeep,

 

Great contrib by the way. I got it working on the first install hehe. Anyways I may be asking a stupid question here, but can you please tell me how to change the store hours? I dont see them anywhere in the admin>configuration menu. Thanks

Link to comment
Share on other sites

Thanks a bunch. I guess that was a pretty stupid question :D

 

I have resolved this issue on Yahoo. It was a lucky guess.

 

Update your email.php replace the SMTP section with this:

 

if (EMAIL_TRANSPORT == 'smtp') {

return mail($to_addr,$subject,$this->output);

}

}

 

And It will work. Yahoo hosting brothers and sisters peace and love. :thumbsup:

 

jspight

 

www.systemflip.com

Link to comment
Share on other sites

thanks Jason ,

 

i wish i seen your post before :blush:

 

i had to write the contact_us page from the beginning and i also have written a new php file to send email and it took me 3 long days :(

 

your code replacement is short and useful :thumbsup:

 

thank you very much for that ! i'm sure many people will use your code on the yahoo servers ;)

Link to comment
Share on other sites

  • 2 weeks later...

Probably i am overlooking something about this mod.

 

I installed everything as is written in the file, and included tha extra database addition, Everything works ok BUT...

In my form i find this :

**

Volledig naam:

 

E-Mail Adres:

 

Bestelnummer (indien van toepassing):

 

Send Contact Form Email To:

CONTACT_US_LIST

Email Subject:

Algemeen Product Informatie Registratie probleem Login probleem Order and shipping Return merchandise

**

Beneath the textline

"Send Contact Form Email To:"

i find the text :

"CONTACT_US_LIST"

 

What do i do wrong?

I added 2 email adresses in the admin but i can't choose in the form.

 

Who can give me some guidance..

Jacques.

Link to comment
Share on other sites

EFVI you should add this line :

define('CONTACT_US_LIST', 'X');

to the php file :

"includes/Languages/German/contact_us.php"

 

NOTE: replace the X in the define command Whatever you want to appear instead of CONTACT_US_LIST ;)

if you do not replace that , you will see X instead of CONTACT_US_LIST :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...