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)
-   -   Give Customer Choice of HTML or TEXT email (https://forum.x-cart.com/showthread.php?t=7487)

xcell67 05-07-2004 03:18 PM

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.

jeremye 05-07-2004 03:34 PM

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.


All times are GMT -8. The time now is 01:44 AM.

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