Jump to content

WHMCS product price fetch according to season currency id


mroxidane

Recommended Posts

I am not a developer, I was hard coding prices in my template for years. But in that case I was needed to create several front end version of my website for several currencies. Then I came to know that the price can be fetched from WHMCS database easily. So I used below code to fetch price.

<script language="javascript" src="{$WEB_ROOT}/feeds/productsinfo.php?pid=81&get=price&billingcycle=monthly&currency={$activeCurrency.id}"></script>

 

I have two main currency in my WHMCS and planning to add more. The above code worked fine for me on the first try, so I removed all hard coded price from 30+ pages and redeveloped by the new code. I was exited everything was fine but suddenly everything stopped working.  {$activeCurrency.id} does work when I pass &currecny=6 on the URL but after that when I navigate to different page, the currency returns back to default one.

So the main problem is I need to fetch prices as per season currency, if a user select EUR  then all the prices will show in EUR and not in default, which is USD. The currency selector also works, but for that specific page and when I navigate to a different page, it shows default. Please someone tell me why season currency id isn't working and how to fix it. I am using custom template.

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.

×
×
  • 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