Jump to content

Display TLD name and associate price using feed


Recommended Posts

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 by khurramalvi
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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