Jump to content

Remove currency from domain data feed


neaweb6

Recommended Posts

Hello,

 

I am trying to setup a data feed to display domain pricing on my website.

The current data feed script displays the price as '$14.95 USD' and I would like to remove the 'USD' suffix from the price. I was looking at this thread https://forums.whmcs.com/showthread.php?104355-Data-Feeds but it does not appear to work for the feeds/domainprice.php file.

 

How can I get this to work?

 

Edit: I realize that removing the "USD" suffix in the Currencies setup will fix this problem, but I'm wanting to keep the suffix on other pages.

Edited by neaweb6
Link to comment
Share on other sites

it should work fine if you modify/replicate the feed and use...

 

if ($format) {
   $price = formatCurrency($price);
   $price = str_replace('USD','',$price); 
}

... and then remember to add format=1 to your URL...

 

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

you could ultimately rewrite the feed to give you different currency output options, but the above should work for your needs. :idea:

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