Jump to content

documentation on options available for feeds?


greghl

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated