Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

How to edit CONTACT_US Form?


Recommended Posts

In catalog/includes/languages/english/contact_us.php add the following:

define('THIS', 'Send me this:');
define('THAT', 'Send me that:');

In catalog/contact_us.php find the following (near the top):

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

and replace the last line in that with:

    $enquiry = tep_db_prepare_input($HTTP_POST_VARS['this']) . "\n";
   $enquiry .= tep_db_prepare_input($HTTP_POST_VARS['that']) . "\n";
   $enquiry .= tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

Further down that page find the entry fields for the email address:

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

and add in after that:

                   <td class="main"><?php echo THIS; ?></td>
                   <td class="main"><?php echo tep_draw_input_field('this'); ?></td>
                   <td class="main"><?php echo THAT; ?></td>
                   <td class="main"><?php echo tep_draw_input_field('that'); ?></td>

Feel free to change the silly field names or the text in the defines. :rolleyes:

I just did a quick test and this seems to work. It puts the text entered in the two new fields at the top of the body of the message.


I'm off to finish adding new fields to mine. Please post here if you have any problems with this.




See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites


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

  • Create New...