alanorr Posted November 29, 2014 Share Posted November 29, 2014 Hi I'm trying to set up the product email so that it sends a different product depending on which product is picked. Normally in php this would be simple: switch $productPicked{ case "product1"; //send this email break; case "product2"; //send this email break; case "product3"; //send this email break; } Can anyone tell me how to do this? Although I can create php using {php} tags in the SMARTY template I can access the product variable to find out which product has been chosen. I've asked the support people at whmcs, they didn't know and so they suggested I ask in this forum. thanks Alan 0 Quote Link to comment Share on other sites More sharing options...
mbit Posted November 29, 2014 Share Posted November 29, 2014 Are you talking about the custom product/service message template? If so, i guess you want to use the same template for multiple products? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted November 29, 2014 Share Posted November 29, 2014 You can't use {php} statement in Email Templates. You have to use EmailPreSend hook point to alter / create variables. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.