For the /cart.php?gid=renewalswrite something like this in domainrenewals.tpl
{* Set 'cantrenew' for the domain if the .au domain cant be renewed *}
<code>
{php}
$autlds = array("asn.au","com.au","edu.au","org.au","net.au","id.au");
$renewalArray = $this->_tpl_vars['renewals'];
$renewalsCopy = $renewalArray;
for ($i = 0; $i < count($renewalArray); $i++) {
$sql = "SELECT * FROM tbldomains WHERE id=".$renewalArray[$i]['id']." AND userid='".$_SESSION['uid']."' AND DATEDIFF(expirydate, NOW()) >= 90 AND status='Active'";
$result = mysql_query($sql);
while ($data = mysql_fetch_array($result)) {
foreach ($autlds as $xx) {
$audomain = strstr($data['domain'], $xx);
if ($audomain) break;
}
if ($audomain){ // Can't renew this .au domain name
$renewalsCopy[$i][cantrenew] = '1';
$this->append('renewals', $renewalsCopy,TRUE);
}
}
}
//echo '<PRE>'.print_r( $this->get_template_vars(renewals),1 ).'</PRE>';
{/php}
</code>
Then lower down in template:
{if !$renewal.pastgraceperiod AND !$renewal.cantrenew} etc etc