Jump to content

Showing in Client area if a name is set to Auto Renew


sohouk

Recommended Posts

The client domain details page (../whmcs/clientarea.php?action=domains) provides a tabular list of the domains a client has in their account.

 

Quite a few clients make use of the auto-renew feature and some have commented that it would be very useful to know if it was possible to add a column in the table to simply show if the domain has auto-renew enabled or disabled.

 

Currently, the client has to access each domain individually to find this information, and with clients who have a lot of domains, that is a very laborious task.

 

Unfortunately, the flag for auto-renewal isn't in the tbldomains otherwise it would be easy.

 

Can someone point me as to where the auto renew flag is stored?

 

 

Trevor

Link to comment
Share on other sites

So its has - I took that to mean something else :shock:

 

I wonder why then this code does not work in the main loop where the domains are listed :?

I added an extra column into the page and added this as part of the populating loop.

 

{if $donotrenew} Disabled {/if}

 

I also tried:

{if stristr($domains.donotrenew,"on")} Disabled {/if}

 

Which simply tests the contents of the field for 'on' and outputs the value 'Disabled' if its found.

 

The code on the domaindetails page does work, but copying and pasting it breaks it in the domain listing page.

 

{if $donotrenew}<div class="errorbox">{$LANG.domainsautorenewdisabledwarning}</div><br>{/if}

 

I wonder if the code is somehow resiliant to certain queries (Matt / John??)

 

I saw the same question was asked ages ago and no answer was found

 

Trevor

Link to comment
Share on other sites

You are right. Looking at the array (by way of the {debug} tag) its not in there which seems odd.

 

I thought I could use:

 

{php}

$result = mysql_query("SELECT 'donotrenew' FROM 'tbldomains' WHERE 'domain`LIKE '{$domain.domain}');

while($row = @mysql_fetch_array( $result ))

 

{$renew = ($row['donotrenew']);}

 

But that does not work :|

TBH, I'm not even sure its the right format to go in a template !

 

So, if anyone has any idea how to get the value of the field 'donotrenew from the table 'domains' ' into a variable that would be good ;)

 

Trevor

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