Jump to content

If else statment


Recommended Posts

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>';
}
?>
 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated