sohouk Posted February 25, 2011 Share Posted February 25, 2011 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 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 25, 2011 Share Posted February 25, 2011 Unfortunately, the flag for auto-renewal isn't in the tbldomains otherwise it would be easy. It is, and it's called donotrenew 0 Quote Link to comment Share on other sites More sharing options...
sohouk Posted February 26, 2011 Author Share Posted February 26, 2011 So its has - I took that to mean something else 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 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 26, 2011 Share Posted February 26, 2011 it's probably not in the results-set in that php file - you'll need to do your own code to query the value 0 Quote Link to comment Share on other sites More sharing options...
sohouk Posted February 26, 2011 Author Share Posted February 26, 2011 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 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 26, 2011 Share Posted February 26, 2011 WHERE 'domain`LIKE '{$domain.domain}'); 3 things you'll need ... * sort out your quotes and backticks * use the ID not the domain name * put the result into a smarty "field" for use in teh template (or just echo it inline if you must) 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.