We offer three lightweight PHP templates that integrate with your WHMCS installation to display domain pricing in a clean, responsive layout. These templates fetch live pricing using the WHMCS API and include optional sorting, currency toggling, and caching.
Files Included
File Name | Description |
---|---|
pricing-bootstrap.php |
Bootstrap 5 version with a modern UI |
pricing-bootstrap4.php |
Bootstrap 4 version styled like the WHMCS admin area |
pricing-enhanced.php |
Enhanced version with advanced sorting, caching, and styling |
Features
-
WHMCS API integration (
localAPI
) -
Currency toggle (default: USD and CAD)
-
Sort by TLD or price (ascending or descending)
-
Mobile-responsive (Bootstrap-based)
-
Weekly caching (to reduce API calls)
-
Easy to modify and extend
Installation
-
Upload the Files
Place the*.php
files in your WHMCS root folder or a public subdirectory such as/pricing/
. -
Adjust Currency Settings
Open any of the PHP files and update the currency ID mapping in this array:You can find your currency IDs in WHMCS under Setup > Payments > Currencies.
-
Verify WHMCS Path
Make sure this line points to your actual WHMCS installation path: -
Set Cache Permissions
Each file stores pricing in a/cache/
folder to avoid repeated API calls. If it doesn't exist, create it manually:
Access the Demo Pages
You can access the demos by visiting them in your browser:
-
yourdomain.com/pricing-bootstrap.php
-
yourdomain.com/pricing-bootstrap4.php
-
yourdomain.com/pricing-enhanced.php
Each version includes a currency toggle and sortable columns.
Customization Tips
-
To change the default sort order, look for this line:
Change
'whmcs'
to'alpha_asc'
,'price_asc'
, etc. as needed. -
To add or remove currencies, modify the
$currencies
array. -
You can update Bootstrap styles, colors, or layout by editing the HTML inside each file.
Need Help?
If you need help customizing the templates or integrating them into your website or client area, please contact support.