Data Feeds

From WHMCS Documentation

Revision as of 20:31, 24 October 2011 by Matt (talk | contribs) (moved Widgets to Data Feeds)

The Widgets in WHMCS are a dynamic way for extracting data from WHMCS for use on the pages of your website.

They allow you to get information out of WHMCS such as product names, descriptions and pricing in real-time, and so if ever make a change inside WHMCS it will auto update on your website.

Examples

The below code samples are ready to be simply copy & pasted into your webpage. The variables in the requests such as the product IDs and TLDs can be set as required.

Product Names

<script language="javascript" src="widgets/productsinfo.php?pid=1&get=name"></script>

Product Descriptions

<script language="javascript" src="widgets/productsinfo.php?pid=1&get=description"></script>

Product Pricing

<script language="javascript" src="widgets/productsinfo.php?pid=1&get=price
&billingcycle=monthly"></script>

Domain Pricing Table

<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="widgets/domainpricing.php"></script>

Individual TLD Pricing

<script language="javascript" src="widgets/domainprice.php?tld=.com&type=register
&regperiod=1&format=1"></script>

Domain Checker Form

<script language="javascript" src="widgets/domainchecker.php"></script>