Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2 Contact_us forms ?


krislyn5559

Recommended Posts

Posted

I was wondering if it is possible to have 2 contact form 1 for customers and one for dealer inquires that would each go to a different email address. I know the is a contribution for super contact_us but I do not want to have to do anything with mysql as I am new at this and the store is already live.

 

Thanks in advance

Posted

Yes.

 

You can make a "carbon copy" of your existing contact_us.php file, name it something else, and towards the top of it, find a line that looks like this:

 

	  tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

And alter it to something like this:

 

tep_mail(INSERT_NAME_HERE, INSERT_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

Example:

tep_mail('Kris', '[email protected]', EMAIL_SUBJECT, $enquiry, $name, $email_address);

 

Doing this you "hardcode" the email address it sends to into the code.

 

Then you just have to get the links to the two forms on whatever page(s) you want them on.

 

Added in edit:

 

There is another line later in the code that would need modification:

 

	<?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?>

You'd need to change the link there to point to your other page.

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 >

Posted

Thanks for your help thats perfect so what would be my next step if I wanted to just add it under the contact_us link and call it Dealer_inquires I know I am asking a lot but since the store is already live I am really scared to mess things up so if you can help I would really be grateful.

Posted

Is this is your store?

 

Click Me

 

If so, please copy/paste the contents of this file:

 

/shopla/includes/boxes/information.php

 

between "CODE" tags and I'll see what I can do.

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 >

Posted
Is this is your store?

 

Click Me

 

If so, please copy/paste the contents of this file:

 

/shopla/includes/boxes/information.php

 

between "CODE" tags and I'll see what I can do.

 

Thanks sooooo much !!

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<span class="ml7">'.BOX_HEADING_INFORMATION.'</span><br/><br/>'.
									 '   <a href="' . tep_href_link(FILENAME_SHIPPING) . '" style="font-size: 11px;">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_PRIVACY) . '" style="font-size: 11px;">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_CONDITIONS) . '" style="font-size: 11px;">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_CONTACT_US) . '" style="font-size: 11px;">' . BOX_INFORMATION_CONTACT . '</a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

Posted

Great!

 

Unfortunately a minor family emergency has arisen and I have to leave for a while.

 

By the time I get back it might be too late to finish this tonight.

 

It may be tomorrow afternoon before I can post again with specific step-by-step instructions.

 

Sorry for the delay.

:blush:

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 >

Posted
Great!

 

Unfortunately a minor family emergency has arisen and I have to leave for a while.

 

By the time I get back it might be too late to finish this tonight.

 

It may be tomorrow afternoon before I can post again with specific step-by-step instructions.

 

Sorry for the delay.

:blush:

Hey no problem I appreciate the help

Posted

When you clone the new page, you will also need to define the new page in includes/filenames.php, add a new information box constant to includes/languages/english.php plus any other language you use and if you want to have different text on the new page, to what is on the present contact us page, you will also need to clone the associated language file, redefine the constants in that and change the language call at the top of the new dealer_inquiries.php file. i.e.

 

1, Copy contact_us.php and name it dealer_inquiries.php

 

2, Change all instances of FILENAME_CONTACT_US in file to FILENAME_DEALER_INQUIRIES

 

3, Add define('FILENAME_DEALER_INQUIRIES', 'dealer_inquiries.php'); to includes/filenames.php

 

4, Copy includes/languages/english/contact_us.php, name it dealer_inquiries.php and change the text to suit

 

5, Add define('BOX_INFORMATION_DEALER_INQUIRIES', 'Dealer Inquiries'); to includes/languages/english.php

 

6, Repeat 4 and 5 for every language you use.

 

7, Add new link to includes/boxes/information.php

Posted

Just to help you out then:

 

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<span class="ml7">'.BOX_HEADING_INFORMATION.'</span><br/><br/>'.
									 '   <a href="' . tep_href_link(FILENAME_SHIPPING) . '" style="font-size: 11px;">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_PRIVACY) . '" style="font-size: 11px;">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_CONDITIONS) . '" style="font-size: 11px;">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_DEALER_INQUIRIES) . '" style="font-size: 11px;">' . BOX_INFORMATION_DEALER_INQUIRIES . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_CONTACT_US) . '" style="font-size: 11px;">' . BOX_INFORMATION_CONTACT . '</a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

 

 

Hope all is ok Jim!

Posted
Just to help you out then:

 

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<span class="ml7">'.BOX_HEADING_INFORMATION.'</span><br/><br/>'.
									 '   <a href="' . tep_href_link(FILENAME_SHIPPING) . '" style="font-size: 11px;">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_PRIVACY) . '" style="font-size: 11px;">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_CONDITIONS) . '" style="font-size: 11px;">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_DEALER_INQUIRIES) . '" style="font-size: 11px;">' . BOX_INFORMATION_DEALER_INQUIRIES . '</a><br>' .
									 '   <a href="' . tep_href_link(FILENAME_CONTACT_US) . '" style="font-size: 11px;">' . BOX_INFORMATION_CONTACT . '</a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

Hope all is ok Jim!

 

 

Oh my gosh you guys are great I just tried it and it works perfectly I can't thank-you enough ( hope all is well with you Jim)

Archived

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

×
×
  • Create New...