didier1 Posted January 2, 2014 Share Posted January 2, 2014 Hi, I am trying to display a certain information on my product welcoming email if client selected a particular configurable option in their order. I tried {if $service_config_options eq "Encryption WPA2 /Mac Address Filter"} WPA {else} No WPA {/if} where "Encryption WPA2 /Mac Address Filter" is the name of my configurable option. Problem : email is not generated. I think the condition eq is not really appropriate. I am more looking for : {if $service_config_options is not NULL "Encryption WPA2 /Mac Address Filter"} but not sure of the syntax. thanks for your help 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 3, 2014 Share Posted January 3, 2014 what does it show if you just use {$service_config_options} in the email on an order where you had added the above config option? it might be that you need to not use equals, but to search if your wanted phrase is stored in {$service_config_options}... possibly something along the lines of... {if $service_config_options|strstr:"Encryption WPA2 /Mac Address Filter"} WPA {else} No WPA {/if} 0 Quote Link to comment Share on other sites More sharing options...
didier1 Posted January 4, 2014 Author Share Posted January 4, 2014 Hello, 1- if I just use : {$service_config_options} I have 'Array' displayed in my email. 2- If I use {if $service_config_options|strstr:"Encryption WPA2 /Mac Address Filter"} WPA {else} No WPA {/if} Email does not get send and whmcs page hangs after clickcing button send email. Am I missing something ? thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 5, 2014 Share Posted January 5, 2014 Am I missing something ? No, I was.... I suspected it might be an array, but hoped it wasn't!.. we'll have to check a specific part of the array for your string. try putting {$service_config_options_html} in the email and see what that displays - forget about the if statement for now. I found that @ http://forum.whmcs.com/showthread.php?39315-Email-template-help 0 Quote Link to comment Share on other sites More sharing options...
didier1 Posted January 14, 2014 Author Share Posted January 14, 2014 Hello, with {$service_config_options_html} without any condition , email displayed nothing. Any idea why ? - - - Updated - - - Actually, my test client did not have configurable option. Sorry forthat. NOW I see the configurable option descrption / value chosen when ordering. So I am assuming I could start building mupy conditional structure with If {$service_config_options_html} = xxx/yyy then zzz. I will let you know how it goes. Thanks for the tips, at least now I have more element to work my way to a solution. Didier 0 Quote Link to comment Share on other sites More sharing options...
didier1 Posted January 14, 2014 Author Share Posted January 14, 2014 Hello again, I had no success tonight configuring that. Here's my code : {if $service_config_options_html eq "WPA: 1"} WPA ON {else} WPA OFF {/if} -- When just puting {$service_config_options_html} , the email look like that : WPA: 1 ( WPA is the name of the configurable iption and : 1 id the number ordered ) Any guidance would be appreciated at this point. Cheers 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 14, 2014 Share Posted January 14, 2014 now that we know the content, can you try my code from the second post... {if $service_config_options_html|strstr:"WPA"} WPA {else} No WPA {/if} if it works, we'll still probably need to tidy the if statement a little... but let's see if it works first! 0 Quote Link to comment Share on other sites More sharing options...
didier1 Posted August 18, 2014 Author Share Posted August 18, 2014 following last comment, how to identify service_config_options when you have 4 within the same product. thanks - - - Updated - - - service_config_options.1 ? service_config_options_%name% ? any help is appreciated 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.