Tom Wilson Posted December 26, 2019 Share Posted December 26, 2019 Hi, We have got the below code:  {if $mcproducts.codeguard gt 0 || $mcaddons.codeguard gt 0}<p>You have an active CodeGuard!</p>{/if}  But it it not working, any ideas why? Let me know if you need anything t help. And yes, the client does have CodeGuard active 😛 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 27, 2019 Share Posted December 27, 2019 Hi Tom, 16 hours ago, Tom Wilson said: We have got the below code:  {if $mcproducts.codeguard gt 0 || $mcaddons.codeguard gt 0}<p>You have an active CodeGuard!</p>{/if}  I recognise that code! 😎 16 hours ago, Tom Wilson said: But it it not working, any ideas why? Let me know if you need anything t help. And yes, the client does have CodeGuard active 😛 if memory serves, the hook that generates those arrays is coded to only work on specific pages, e.g help etc... so first question would be are you trying to use the arrays on a page that doesn't have access to them ?? if yes, then add their names to the if templatefile statement... if no, then add {$mcproducts|print_r} to the template and see if the array exists (or just use {debug} if that's easier)... if it exists, it will output the array; if it doesn't exist, it will just print 1 Array ( [codeguard] => 1 [sitelock] => 1 [spamexperts] => 0 [sslcerts] => 0 [weebly] => 1 ) 1 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.