X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add "send me the message" to Contact Us form (https://forum.x-cart.com/showthread.php?t=52558)

cflsystems 02-26-2010 04:31 PM

Add "send me the message" to Contact Us form
 
Tested on 4.2.1 and code below is from 4.2.1

1. Open skin1/customer/help/contactus.tpl abd add this

{* Added by CFL Systems for "send me the message" *}
<tr>
<td class="data-name">&nbsp;</td>
<td class="data-required">&nbsp;</td>
<td>
<input type="checkbox" id="cust_send_email" name="cust_send_email" value="Y"{if $userinfo.cust_send_email eq 'Y'} checked="checked"{/if} /> Please send this message to my email address shown above
{if $fillerror ne "" and $userinfo.subject eq ""}
<span class="error-message"><<</span>
{/if}
</td>
</tr>

{* Added by CFL Systems for "send me the message" *}


where you want it to display, I personally would suggest just before this line

{if $active_modules.Image_Verification && $show_antibot.on_contact_us eq 'Y'}


2. Open include/help.php, find

$store_contactus = false;
func_header_location("help.php?section=contactus&m ode=sent");

and just before add

# if statement added by CFL Systems to send contact us message to customer if box is checked
if ($contact["cust_send_email"] == "Y")
func_send_mail($contact["email"], "mail/help_contactus_subj.tpl", "mail/help_contactus.tpl", $config["Company"]["support_department"], false);


Done. Run cleanup.php

gatordp 03-06-2010 10:36 AM

Re: Add "send me the message" to Contact Us form
 
Awesome mod - just installed it... and cleaned up my contact form.

gb2world 03-06-2010 12:33 PM

Re: Add "send me the message" to Contact Us form
 
You may want to exercise caution with this. It makes it possible for some miscreant to use the form and your server to send inappropriate email to someone other than themselves. If you do this - you should make sure you enable the captcha. You should also make sure to keep something like the default message in the eml_mail_header language variable - that lets people know than even though the message is from your business, if they did not initiate, they should ignore it.

cflsystems 03-07-2010 05:37 AM

Re: Add "send me the message" to Contact Us form
 
Quote:

Originally Posted by gb2world
You may want to exercise caution with this. It makes it possible for some miscreant to use the form and your server to send inappropriate email to someone other than themselves. If you do this - you should make sure you enable the captcha. You should also make sure to keep something like the default message in the eml_mail_header language variable - that lets people know than even though the message is from your business, if they did not initiate, they should ignore it.


That is true. Thanks for pointing that out for anyone who wishes to use this one


All times are GMT -8. The time now is 10:25 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.