CW2305 Posted January 21, 2009 Share Posted January 21, 2009 Hello. My intention is to setup a domain pricelist page that draws in the pricelist on a standard information page without the same as it does in Domain Checker, but without the search function. I created a new page as per these documentation instructions: http://wiki.whmcs.com/Creating_Pages The Pricelist table column headings appear, but nothing under them. I even duplicated the domainchecker.php in this suggested manner, and the same thing happens: http://trafficzone.com.au/support/domain-names-test.php Is there a way I can draw the pricelist into a new page to avoid having to update it manually? Thank you. CW 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 21, 2009 Share Posted January 21, 2009 I haven't tried it yet, but why don't you post what you used so we can see it? 0 Quote Link to comment Share on other sites More sharing options...
CW2305 Posted January 22, 2009 Author Share Posted January 22, 2009 OK. This is the domain-names-test.php: <?php define("CLIENTAREA",true); require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="domain-names.php">Domain Names Registration</a>'; initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav); if ($_SESSION['uid']) { # User is Logged In - put any code you like here } # To assign variables in Smarty use the following syntax. # This can then be used as {$variablename} in the template $smartyvalues["variablename"] = $value; # Define the template filename to be used without the .tpl extension $templatefile = "domaintest"; outputClientArea($templatefile); ?> And this is the template, domaintest.tpl (a direct copy of domainchecker.tpl): {if $bulkdomainsearchenabled}<p align="center"><a href="domainchecker.php">{$LANG.domainsimplesearch}</a> | <a href="domainchecker.php?search=bulkregister">{$LANG.domainbulksearch}</a> | <a href="domainchecker.php?search=bulktransfer">{$LANG.domainbulktransfersearch}</a></p>{/if} <p>{$LANG.domainintrotext}</p> <form method="post" action="domainchecker.php"> <div class="contentbox" align="center"> www. <input type="text" name="domain" value="{$domain}" size="40"><br /> <table align="center"><tr> {foreach key=num item=listtld from=$tldslist}<td align="left"><input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds)} checked{/if}>{$listtld}</td>{if $num % 5 == 0}</tr><tr>{/if}{/foreach} </tr></table> {if $inccode}<font color="#cc0000"><strong>{$LANG.imagecheck}</strong></font><br />{/if} {if $capatacha}<img src="includes/verifyimage.php" align="middle"> <input type="text" name="code" size="10" maxlength="5"> {/if}<input type="submit" id="Submit" value="{$LANG.domainlookupbutton}"> </div> </form> <br /> {if $lookup} {if $available} <p align="center" class="domaincheckeravailable" style="font-size:18px;">{$LANG.domainavailable1} <strong>{$domain}{$ext}</strong> {$LANG.domainavailable2}</p> {elseif $invalid} <p align="center" class="domaincheckerunavailable" style="font-size:18px;">{$LANG.ordererrordomaininvalid}</p> {elseif $error} <p align="center" class="domaincheckerunavailable" style="font-size:18px;">{$LANG.domainerror}</p> {else} <p align="center" class="domaincheckerunavailable" style="font-size:18px;">{$LANG.domainunavailable1} <strong>{$domain}{$ext}</strong> {$LANG.domainunavailable2}</p> {/if} {if !$invalid} <p><strong>{$LANG.morechoices}</strong></p> <form method="post" action="cart.php?a=add&domain=register"> <table class="clientareatable" cellspacing="1"> <tr class="clientareatableheading"><td width="20"></td><td>{$LANG.domainname}</td><td>{$LANG.domainstatus}</td><td>{$LANG.domainmoreinfo}</td></tr> {foreach key=num item=result from=$availabilityresults} <tr class="clientareatableactive"><td>{if $result.status eq "available"}<input type="checkbox" name="domains[]" value="{$result.domain}" {if $num eq "0" && $available}checked {/if}/>{else}X{/if}</td><td>{$result.domain}</td><td class="{if $result.status eq "available"}domaincheckeravailable{else}domaincheckerunavailable{/if}">{if $result.status eq "available"}{$LANG.domainavailable}{else}{$LANG.domainunavailable}{/if}</td><td>{if $result.status eq "unavailable"}<a href="http://{$result.domain}" target="_blank">WWW</a> <a href="#" onclick="window.open('whois.php?domain={$result.domain}','whois','width=500,height=400,scrollbars=yes');return false">WHOIS</a>{else}<select name="domainsregperiod[{$result.domain}]">{foreach key=num item=regoption from=$result.regoptions}<option value="{$regoption.period}">{$regoption.period} {$LANG.orderyears} @ {$currencysymbol}{$regoption.price} {$currency}</option>{/foreach}</select>{/if}</td></tr> {/foreach} </table> <p align="center"><input type="submit" value="{$LANG.ordernowbutton} >>" /></p> </form> {/if} {else} <p align="center"><strong>{$LANG.domainspricing}</strong></p> <table class="clientareatable" cellspacing="1"> <tr class="clientareatableheading"><td>{$LANG.domaintld}</td><td>{$LANG.domainminyears}</td><td>{$LANG.domainsregister}</td><td>{$LANG.domainstransfer}</td><td>{$LANG.domainsrenew}</td></tr> {foreach key=num item=tldpricelist from=$tldpricelist} <tr class="clientareatableactive"><td>{$tldpricelist.tld}</td><td>{$tldpricelist.period}</td><td>{if $tldpricelist.register}{$currencysymbol}{$tldpricelist.register} {$currency}{else}{$LANG.domainregnotavailable}{/if}</td><td>{if $tldpricelist.transfer}{$currencysymbol}{$tldpricelist.transfer} {$currency}{else}{$LANG.domainregnotavailable}{/if}</td><td>{$currencysymbol}{$tldpricelist.renew} {$currency}</td></tr> {/foreach} </table> {/if} Thanks for your time! 0 Quote Link to comment Share on other sites More sharing options...
CW2305 Posted January 22, 2009 Author Share Posted January 22, 2009 And this is how domainchecker looks on my site as it is: http://trafficzone.com.au/support/domainchecker.php 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted January 22, 2009 Share Posted January 22, 2009 You have not assigned any variables to smarty to be outputted in the template. You need to do the required DB calls in the php file and assign the variables so they can be passed to the template. 0 Quote Link to comment Share on other sites More sharing options...
CW2305 Posted January 23, 2009 Author Share Posted January 23, 2009 Thanks. I am having trouble getting the variables right to work, after searching WHMCS and Smarty info. Going back to just: $smartyvalues["tldpricelist"] = $value; ...I'm a step closer, but still struggling. 0 Quote Link to comment Share on other sites More sharing options...
CW2305 Posted January 23, 2009 Author Share Posted January 23, 2009 Current result: http://trafficzone.com.au/support/domain-names-test.php Thanks. 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.