Michael M Posted April 2, 2020 Share Posted April 2, 2020 Hello, We are selling various products through WHMCS. shared hosting, ssl, vps, The email template that needs customization is the ones with the VPS. We want to create an if statement to check that if the client has already another VPS or had in the past with the same clientID to make a small change in some login details we sent him. So, is there a way we check in the database that the client has or had the same or same product's team to perform this check? Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 3, 2020 Share Posted April 3, 2020 On 02/04/2020 at 01:12, Michael M said: So, is there a way we check in the database that the client has or had the same or same product's team to perform this check? not directly in the email template - you would have to use an EmailPreSend hook to query the database, if it's a product email template, then your starting point will be the service id of the service for the email being generated - from that, you'll have to get the client and then work out whether they have or had similar products.. and then the hook returns a mergefield to the template, and it's that mergefield that you would use in the email template if statement to determine whether to make any login detail changes. 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.