marieneige Posted September 26, 2014 Share Posted September 26, 2014 Hi I would like to have the domain price table for every year but I don't get to do it. I tried to modify the feeds php file but this is just how far I went. I don't see how to change the years and I would like to have it only for 1 tld at once. http://docs.whmcs.com/Data_Feeds <?php require("../init.php"); require("../includes/domainfunctions.php"); /* *** USAGE SAMPLES *** <style type="text/css"> table.domainpricing { width: 600px; background-color: #ccc; } table.domainpricing th { padding: 3px; background-color: #efefef; font-weight: bold; } table.domainpricing td { padding: 3px; background-color: #fff; text-align: center; } </style> <script language="javascript" src="feeds/domainpricing.php?currency=1"></script> */ $code = '<table cellspacing="1" cellpadding="0" class="domainpricing"><tr><th>TLD</th><th>For 1 year</th></tr>'; if (!is_numeric($currency)) { $currency = array(); } else { $currency = getCurrency('', $currency); } if (!$currency || !is_array($currency) || !isset($currency['id'])) { $currency = getCurrency(); } $whmcs = WHMCS_Application::getInstance(); $type = $whmcs->get_req_var('type'); $freeamt = formatCurrency(0); $tldslist = getTLDList(); foreach ($tldslist AS $tld) { $tldpricing = getTLDPriceList($tld, true); $firstoption = current($tldpricing); $year = key($tldpricing); $code .= sprintf( '<tr><td>%s</td><td>%s</td></tr>', htmlspecialchars($tld, ENT_QUOTES, 'UTF-8'), htmlspecialchars($firstoption["register"], ENT_QUOTES, 'UTF-8') ); } $code .= '</table>'; echo "document.write('".$code."');"; ?> 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 26, 2014 Share Posted September 26, 2014 Marie, i've answered your question in the thread below. http://forum.whmcs.com/showthread.php?93715-Domain-Pricing-Table-Data-Feed-Specific-TLD-for-1-10-years 0 Quote Link to comment Share on other sites More sharing options...
marieneige Posted September 26, 2014 Author Share Posted September 26, 2014 awesome I looked at the code it looks perfect, I am looking to try this tonight, thank you so much. I passed the whole night yesterday trying to achieve it 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.