Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add "send me the message" to Contact Us form

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-26-2010, 04:31 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #2  
Old 03-06-2010, 10:36 AM
 
gatordp gatordp is offline
 

Advanced Member
  
Join Date: Aug 2009
Posts: 72
 

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

Awesome mod - just installed it... and cleaned up my contact form.
__________________
X-Cart Gold 4.5.4
Reply With Quote
  #3  
Old 03-06-2010, 12:33 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #4  
Old 03-07-2010, 05:37 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:45 PM.

   

 
X-Cart forums © 2001-2020