Chad Posted July 17, 2009 Share Posted July 17, 2009 I need to post a custom message for a specific product group (dedicated servers) using some kind of "if" conditional per se. Anyone know how this can be done and what file must be edited? Actually, I want it specifically on the product config page. Thanks 0 Quote Link to comment Share on other sites More sharing options...
tgriff Posted July 7, 2010 Share Posted July 7, 2010 This would be very helpful. If an active client has ordered a product from a specific group (I.E Web Hosting or Paid Support, or Dedicated Servers) how can I merge a conditional statement to clients in this group. For instance on invoice payment reminders it would be extremely helpful to let these clients know specifically what happens when their account is not renewed within a period of time. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted July 7, 2010 WHMCS Support Manager Share Posted July 7, 2010 You've revived a very old thread here. The conditional display feature has since been implemented, please refer to the frame at the bottom of the edit email template page. 0 Quote Link to comment Share on other sites More sharing options...
tgriff Posted November 10, 2010 Share Posted November 10, 2010 John, The bottom of the email template page gives the following detail: Conditional Display You can use conditionals to display text based on other values - for example: {if $ticket_department eq "Sales"} Sales only operates Monday-Friday 9am-5pm {else} Your ticket has been received and will be answered shortly {/if} Looping through data A foreach loop can be used to cycle through values like invoice items: {foreach from=$array_data item=data} {$data.option}: {$data.value} {/foreach} It would be extremely helpful to see some actual working examples. For instance, let's talk invoice/product renewal reminders. The need is to be able to have conditional statements for the specific product(s) in that are up for renewal. i.e. If you have product "a" what happens if you let it expire or if you have product "b" or "c" what happens when this expires - or even a better scenario is including a coupon code for their specific product that is soon expiring. Perhaps this is all very simple to input on the email templates? Could you post this here or on the documentation in reference to email templates for easy reference? (looked high and low for this - did I miss it?) 0 Quote Link to comment Share on other sites More sharing options...
01jack Posted June 28, 2011 Share Posted June 28, 2011 I need to understand how this works exactly: Looping through dataA foreach loop can be used to cycle through values like invoice items: {foreach from=$array_data item=data} {$data.option}: {$data.value} {/foreach} 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted August 22, 2011 Share Posted August 22, 2011 Could anyone shed light on the best way to loop through a clients list of domains? I've just imported their account with a bunch of domains and would like to send one email with a list of the updated domains in the account How to do this via the foreach command? 0 Quote Link to comment Share on other sites More sharing options...
Adamski Posted August 27, 2011 Share Posted August 27, 2011 Also can't work out how to show list of domains. I've tried using {foreach item=domain from=$domains} as per the code in clientareadomains.tpl but that doesn't seem to work 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted December 6, 2011 Share Posted December 6, 2011 (edited) I still haven't managed to get this working. I've emailed support and will post the answer here! Basically, I just want to create a new email template that, when selected, will send the customer an email showing a list of their services / products. Here is my code - if anyone can check it and tell me if it works, I'd be grateful (I can't test myself as my test accounts all have dummy domains that don't show in the email as they aren't actually registered) Dear {$client_first_name} Here's a list of your current domains: Domains: {foreach from=$array_data item=$domain_name} {$domain_name}: {$domain_expiry_date} {/foreach} Hosting Products: {foreach from=$array_data item=$service_product_name} {$service_product_name}: {$service_next_due_date} {/foreach} I would appreciate some feedback. Thanks Sol Edited December 6, 2011 by sol2010 0 Quote Link to comment Share on other sites More sharing options...
01jack Posted December 6, 2011 Share Posted December 6, 2011 Yes please sol2010, look forward to the response from support ... Thanks. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 7, 2011 Share Posted December 7, 2011 Here's a list of your current domains: Domains: {foreach from=$array_data item=$domain_name} {$domain_name}: {$domain_expiry_date} {/foreach} Hosting Products: {foreach from=$array_data item=$service_product_name} {$service_product_name}: {$service_next_due_date} {/foreach} Of course you could go with the really simple solution "Dear client, you can access the list of your domains and your products at any time in your client area at http://....." 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted February 15, 2012 Share Posted February 15, 2012 Well, support told me this is not possible. So I guess for now, it's best to go with othellotech's recommendation. 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.