greghl Posted July 17, 2014 Share Posted July 17, 2014 I've been looking at the feeds - specifically domainpricing.php and domainprice.php With domainpricing - can't I specify a single TLD for a domain price-table? with domainprice.php - some TLDs have min 1 year, some have min 2 years - I'd like to be able to output the price + min number of years - is that an option? I don't see docs on the parameters that these feeds will take - am I missing something? http://docs.whmcs.com/Data_Feeds thx 0 Quote Link to comment Share on other sites More sharing options...
greghl Posted July 18, 2014 Author Share Posted July 18, 2014 ok - well no response is not good news - so I took a look at feeds/domainpricing.php - it was easy to copy the code to a different script - I created onedomainpricing.php - changed the line: $tldslist = getTLDList(); to: if ((!isset($_GET['tld'])) || ($_GET['tld'] == 'all')){ $tldArray=getTLDList(); } else { if (empty($_GET['tld'])){ $tldArray=getTLDList(); } else{ $tldArray=array($_GET['tld']); } } $tldslist = $tldArray; //$tldslist = getTLDList(); Now I can call the script as: <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/onedomainpricing.php?currency=1&tld=.com"></script> I'll look at the output of domainprice.php in a little while - I need to have the script output the "price / X year(s)" - or - "$X.XX / year" where $X.XX is the price for min reg period / min years - to show the per year price, even when min years = 2 years or higher. - - - Updated - - - ok - there really are no options in domainprice.php apart from years, and format or no format. I'll code my own - our 2 year price is always twice the 1 year price (if available) - I can use that to always look up 2 years, then divide it by 2 and output $X.XX per year. Hope someone finds my snippet useful - if wanted, I can post my revised domainprice.php - but unless you have the same business condition that I have, ie, 2 year is ALWAYS 2x 1 year price, then it won't help you a lot. 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.