Jump to content

Get domain pricing vi API and custom invoice templates


kUdtiHaEX

Recommended Posts

I have two questions regarding WHMCS API:

 

1. I'm trying to get domain pricing. Since there is no API call for this, I've decided to extend API by putting my own PHP file in /includes/api folder. It would not be so hard if I would know how to connect tables tbldomainpricing and tblpricing? What is the key connection between these tables since I can't find it?

 

2. Since WHMCS 5.0 we got more freedom with templates and that is great. So my quetion is: let say that I have two types of invoices, I will call them INVOICE1 and INVOICE2.

 

When the customer comes in and he orders something, how can I via API tell to WHMCS to send his invoice using either INOVICE1 or INVOICE2 template? I can't seem to find such function in API.

Link to comment
Share on other sites

It would not be so hard if I would know how to connect tables tbldomainpricing and tblpricing?

mysql> select * from tblpricing where type like "%domain%" limit 10;

 

should tell you everything you need to know about the table design ...

 

the important fields are

type

currency

relid

Link to comment
Share on other sites

mysql> select * from tblpricing where type like "%domain%" limit 10;

 

should tell you everything you need to know about the table design ...

 

the important fields are

type

currency

relid

 

Yes, i know that but how to connect relid with tbldomainpricing? That table however does not have any kind of foreign key or any other way to connect it to tblpricing. It has only internal AI id field and some description fields, nothing helpful.

 

To clarify: if I have .com domain in tbldomainpricing, how to get it's price from tblpricing? It's not ap roblem to left join two tables, but to join them with what?

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