SabirBoi04 Posted November 11 Share Posted November 11 Is their any if else statment variable, like If user have active service = example text If user don't have any active service= second example 0 Quote Link to comment Share on other sites More sharing options...
File_Explorer Posted November 14 Share Posted November 14 the real question is, what page on WHMCS are you trying to achieve this on? 0 Quote Link to comment Share on other sites More sharing options...
SabirBoi04 Posted November 14 Author Share Posted November 14 22 minutes ago, File_Explorer said: the real question is, what page on WHMCS are you trying to achieve this on? @File_Explorer Thanks for your reply! By the way, I want to add this code inside whmcs/templates/six/footer (basically, I want to add a button called "Active/Inactive" on the user client area footer side). For Example <?php $hasActiveService = true; if ($hasActiveService) { echo '<button>Button1</button>'; } else { echo '<button>Button2</button>'; } ?> 0 Quote Link to comment Share on other sites More sharing options...
File_Explorer Posted November 14 Share Posted November 14 Hello, You can edit your footer template and add the below {if $clientsstats.productsnumactive > 0} client has active services {else} client doesn't have any active services {/if} 0 Quote Link to comment Share on other sites More sharing options...
SabirBoi04 Posted November 14 Author Share Posted November 14 1 hour ago, File_Explorer said: Hello, You can edit your footer template and add the below {if $clientsstats.productsnumactive > 0} client has active services {else} client doesn't have any active services {/if} Thank you so much, it worked. where I can get such codes like for credit balance, domain active etc 0 Quote Link to comment Share on other sites More sharing options...
File_Explorer Posted November 14 Share Posted November 14 I used {debug} in the template to see if whmcs provided data for active client services, you can do the same possibly also have a look at their hooks documentation, variables provided in the hook itself may be useful to you 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.