kUdtiHaEX Posted April 10, 2012 Share Posted April 10, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted April 11, 2012 Share Posted April 11, 2012 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 0 Quote Link to comment Share on other sites More sharing options...
kUdtiHaEX Posted April 11, 2012 Author Share Posted April 11, 2012 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? 0 Quote Link to comment Share on other sites More sharing options...
kUdtiHaEX Posted April 11, 2012 Author Share Posted April 11, 2012 Ok, I've got it. relid from tblpricing = id from tbldomainpricing Thanks. Any ideas for a second question? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted April 11, 2012 Share Posted April 11, 2012 I'm pretty sure thats not possible currently. There is only one invoice template. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.