khurramalvi Posted March 9, 2021 Share Posted March 9, 2021 (edited) Hello, I searched for the answer before posting this question. I know there is a domainprice feed available to display pricing table and show individual pricing.https://docs.whmcs.com/Data_Feeds#Individual_TLD_Pricing The styling of my website is complex and I would like to use Individual TLD Pricing snippet to display the TLD name and the price. However, I don't want to call JavaScript file 30 times. Website URL: https://webhostingmix.com/register-domain.php Is there any snippet which I can use to display the domain name and price by calling JavaScript file once? Any help is appreciated. Edited March 9, 2021 by khurramalvi 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 9, 2021 Share Posted March 9, 2021 2 minutes ago, khurramalvi said: Is there snippet which I can use to display the domain name and price by calling JavaScript file once? can you use the domainpricing.php data feed instead ? it returns a pricing table and so all you should need to do is adjust it's table content design to suit your site's current table method. also, don't edit the above file, copy it and work on the duplicate - if you edit the original feed file, then your changes will get lost during an update. 0 Quote Link to comment Share on other sites More sharing options...
khurramalvi Posted March 9, 2021 Author Share Posted March 9, 2021 That was the first option. I tried and it wasn't easy to do as I use many custom classes and the structure is different. It will be same when I want to fetch the pricing for the product. I will need to call "feeds/productsinfo.php" for each hosting product then make call 6 times to show monthly, yearly pricing. Any other suggestions. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 9, 2021 Share Posted March 9, 2021 22 minutes ago, khurramalvi said: That was the first option. I tried and it wasn't easy to do as I use many custom classes and the structure is different. the only difference I can see is the feed will show years by default, but that's a simple line to remove... and renew/transfer are the opposite way round (but those lines could be switched). if you have to, can't you keep the existing heading layout of the table on the page,then just tweak the feed to display the TLD and 3 prices ? 32 minutes ago, khurramalvi said: It will be same when I want to fetch the pricing for the product. I will need to call "feeds/productsinfo.php" for each hosting product then make call 6 times to show monthly, yearly pricing. you're not seriously intending to show six prices per product on the same page are you ? 33 minutes ago, khurramalvi said: Any other suggestions. on a non-WHMCS site, the feed would be your best option - there might be alternatives if your site used WordPress, but I don't think that it does (looks to be the Hostlar HTML theme). for domain pricing, you could link to the relevant client area page... https://webhostingmix.com/clients/domain/pricing/ you could try contacting Hostlar's developers to see if they have a data feed that matches their design - it really wouldn't be that difficult to do, but if they've already done it to match their design, that would save you some time. 0 Quote Link to comment Share on other sites More sharing options...
khurramalvi Posted March 9, 2021 Author Share Posted March 9, 2021 Hi Brain, Thanks for the quick response. I will try again to customise the domainpricing feed. The product pricing is a toggle between month and year, so I am wondering that I have to call the JS file a few many times. https://webhostingmix.com/wordpress-hosting.php 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 9, 2021 Share Posted March 9, 2021 2 hours ago, khurramalvi said: The product pricing is a toggle between month and year, so I am wondering that I have to call the JS file a few many times. if the number of calls to a feed are limited to single figures per page, then I wouldn't overly worry. 0 Quote Link to comment Share on other sites More sharing options...
khurramalvi Posted March 9, 2021 Author Share Posted March 9, 2021 Perfect, thanks 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.