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

Give Customer Choice of HTML or TEXT email

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-07-2004, 03:18 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default Give Customer Choice of HTML or TEXT email

Would this be possible?
-Create a new db field, "htmltext" with Y/N values Y-HTML, N-TEXT
-add this to register.php and register.tpl giving the customer the choice of what format they want their email to be.
-this is where im having trouble, i found it easy to create if statments in tpls but for the register.php and orders.php, i cant find the proper code to be along the lines of "If userinfo html text eq Y then send profileHTML.tpl else send profile.tpl

I tried putting the if statements before the func_processed send mail lines but no luck, can someone help me out?

Thank you.
Reply With Quote
  #2  
Old 05-07-2004, 03:34 PM
 
jeremye jeremye is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Philadelphia, PA
Posts: 158
 

Default

I'm not sure what version you're using, but look in include/register.php. In my version I have a send mail function such as:

Code:
# # Send mail to registered user # func_send_mail($newuser_info["email"], "mail/profile_modified_subj.tpl", "mail/profile_modified.tpl", $config["Company"]["users_department"], false);

In order to use either TEXT or HTML, I would suggest something like this:

Code:
# # Send mail to registered user # if ($userinfo[htmltext] == "Y") func_send_mail($newuser_info["email"], "mail/profile_modified_subj.tpl", "mail/profileHTML.tpl", $config["Company"]["users_department"], false); else func_send_mail($newuser_info["email"], "mail/profile_modified_subj.tpl", "mail/profileTEXT.tpl", $config["Company"]["users_department"], false);

Again, I am not sure of version info, or if the variables used above will work in your version, but this should get you started...

Let me know if you have trouble implementing it.
__________________
Jeremy
X-Cart Gold v3.4.14 [Linux/Apache]
Heavily Modded
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 01:15 PM.

   

 
X-Cart forums © 2001-2020