Jump to content

Do not show expired domains over 30 days or canceled domains


Recommended Posts

1) Backup \templates\portal\clientareadomains.tpl (or the same file under any other template you use) and Open the file in notepad or any code editor you use

2) Add the following code before line #1

{php}
$clientarea_domainlist = $this->_tpl_vars['domains'];
for($domi=0;$domi<count($clientarea_domainlist);$domi++){
$clientarea_domainlist[$domi]['nextduedate'] = str_replace("/","-",$clientarea_domainlist[$domi]['nextduedate']);
$domainexpiryts = strtotime($clientarea_domainlist[$domi]['nextduedate']);
$before30daysts = time()- (30 * 24 * 60 * 60);
if( ( ($clientarea_domainlist[$domi]['status'] == "expired") && ($domainexpiryts>$before30daysts) ) || ($clientarea_domainlist[$domi]['status'] == "cancelled") ){
   unset($clientarea_domainlist[$domi]);
}
}
sort($clientarea_domainlist);  $this->_tpl_vars['domains'] = $clientarea_domainlist; $this->_tpl_vars['numproducts'] = count($clientarea_domainlist);
{/php}

3) Save the file and overwrite existing \templates\portal\clientareadomains.tpl on your server.

 

If you are using WHMCS 4.4.2 and portal template, you can as well download the attached clientareadomains.tpl.zip in this post, extract and overwrite it. DO NOT overwrite with attached if you are using a different or custom template.

 

This will hide all expired domains over 30 days or canceled domains from your clientarea domains list.

clientareadomains.tpl.zip

Link to comment
Share on other sites

  • 2 months later...
If you are using WHMCS 4.4.2 and portal template, you can as well download the attached clientareadomains.tpl.zip in this post, extract and overwrite it. DO NOT overwrite with attached if you are using a different or custom template.

 

Does this work for the latest version of WHMCS? as i see your using 4.4.2 and the template from there..any users tried this on the new version?:roll:

Link to comment
Share on other sites

Does this work for the latest version of WHMCS? as i see your using 4.4.2 and the template from there..any users tried this on the new version?:roll:

 

4.5.2 - It works (kind of).

 

It works when you go to the domains page, but if the client clicks on the 'Show 100' domains link or 'show all' etc, the resulting pages show the expired/cancelled domains.

 

ie, the url that ends with: clientarea.php?action=domains&page=3

 

When the customer goes back to his domain's main page, all of the domains older than 30 days show up again. :-(

 

Almost does the job, but not quite.

 

Si

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