Jump to content

Is it possible to display prices from WHMCS on none WHMCS pages?


-M-

Recommended Posts

We use a custom webdesign for 90% of our website, which was build by hand with Bootstrap.

For the rest we use WHMCS' system (for ordering and such).

 

Now I was wondering if it's possible to display prices for several products and services on our main website, which is not WHMCS?

Now we edit/change everything, when needed by hand, but we would like this to be automatic.

 

So, as for my question, is it possible to include WHMCS coding into our current pages, so we call upon $variables anywhere we want?

 

Thank you.

 

Regards

Link to comment
Share on other sites

Thanks brian!

 

I didn't know this existed. I did a search about including things and the only result I got back was the domainchecker function and announcements (or something like that).

Apparently I should have searched on "Data Feeds".

 

Anyways, thank you for pointing me in the right direction! :idea:

 

Regards

Link to comment
Share on other sites

Well a small update. I modified productsinfo.php a little bit (and renamed it so it doesn't get overwritten in the future because of updates).

 

I didn't want to display the currency as EUR, so I did the following:

 

//$price = formatCurrency($price);

 

And it works.

 

I now have another small issue, but I don't know if I can change it at all.

 

I want to display the lowest price for a hosting package, so I entered the corresponding PID.

However it will display the price per year, because the product isn't available monthly, quarterly, but only per year.

 

I tried doing the following:

 

$price = $data[$billingCycle/12];

 

(added /12)

 

But that didn't work out. :P

 

Is there a way to create a re-calculation like price/12?

 

Thank you. :)

 

- - - Updated - - -

 

Nevermind. I was close already.

 

Just retried it with:

 

   $price = $data[$billingCycle]/12;

 

And now it works. :)

 

And yes, I will keep this in mind when using other products (as I mentioned I renamed the file to be used with hosting only). :))

 

//edit

 

Well using it twice on a page slows it down considerably. At least I noticed it straight away. Guess I will change it back my original coding, so I need to change it by hand. Won't happen much, so no harm done.

 

I will use this however on the TLD page. Very useful for it!

Edited by MvdL1979
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