baymax Posted December 31, 2019 Share Posted December 31, 2019 Hi all, I've added some custom fields to the Domains page by using the additionalfields.php file so now I am wondering how I can pull reports and search by the custom fields that I've created on the page. Which file do I need to edit and what do I have to insert? Thank you so much! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 31, 2019 Share Posted December 31, 2019 8 hours ago, baymax said: Which file do I need to edit and what do I have to insert? if you're creating a custom report, then you would create a new file (in /modules/reports), possibly using an existing report file as a template. with regards to the additional field values themselves, then they're stored in the database, specifically the tbldomainsadditionalfields table, but you'd probably have to join it to tbldomains to get any results that made sense. 1 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 2, 2020 Author Share Posted January 2, 2020 On 12/31/2019 at 8:22 PM, brian! said: if you're creating a custom report, then you would create a new file (in /modules/reports), possibly using an existing report file as a template. with regards to the additional field values themselves, then they're stored in the database, specifically the tbldomainsadditionalfields table, but you'd probably have to join it to tbldomains to get any results that made sense. Hey Brian, so I have been looking at the modules\reports\ folder but couldn't get any sense out of it. What you said does make sense though. Hopefully WHMCS makes this ability available in a future update. Being able to search custom fields for Domains would be super helpful! Brian, thanks again! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 2, 2020 Share Posted January 2, 2020 8 hours ago, baymax said: Hey Brian, so I have been looking at the modules\reports\ folder but couldn't get any sense out of it. yeah, they can have that effect on you initially. 😱 8 hours ago, baymax said: What you said does make sense though. that's worrying. 😃 the trick when starting off is hoping that there is an existing report that is *similar* to what you want to do - that way, you're just changing the SQL queries rather than rewriting the structure... although ironically, if you know the SQL query for what you want, you don't really need to write a report, you could just query the db directly to get the answer. 9 hours ago, baymax said: Hopefully WHMCS makes this ability available in a future update. almost certainly, that won't happen - if you feature requested it, that would take 4+ years for even the most popular of features... but I can't recall a similar thread in the last 6+ years asking for the option to search additional fields, so I doubt any feature request for this would hit double figures in votes, let along three figures... and if they're going to randomly introduce it, then I doubt that would happen before the mythical v8 appears. as a report, it's doable - though gets awkward if you need it to be TLD specific, e.g find .uk domains where registrant name = X, because the TLD won't be stored separately, but there are workarounds to that. I would say that if you need this in the next year or two, get a developer in to write it, or you could try a report generator addon or SQL report generator - though you'd probably have to know the tables to query and the relationships between them for the last two. 1 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 3, 2020 Author Share Posted January 3, 2020 (edited) On 3/01/2020 at 1:52 AM, brian! said: yeah, they can have that effect on you initially. 😱 that's worrying. 😃 the trick when starting off is hoping that there is an existing report that is *similar* to what you want to do - that way, you're just changing the SQL queries rather than rewriting the structure... although ironically, if you know the SQL query for what you want, you don't really need to write a report, you could just query the db directly to get the answer. almost certainly, that won't happen - if you feature requested it, that would take 4+ years for even the most popular of features... but I can't recall a similar thread in the last 6+ years asking for the option to search additional fields, so I doubt any feature request for this would hit double figures in votes, let along three figures... and if they're going to randomly introduce it, then I doubt that would happen before the mythical v8 appears. as a report, it's doable - though gets awkward if you need it to be TLD specific, e.g find .uk domains where registrant name = X, because the TLD won't be stored separately, but there are workarounds to that. I would say that if you need this in the next year or two, get a developer in to write it, or you could try a report generator addon or SQL report generator - though you'd probably have to know the tables to query and the relationships between them for the last two. Brian, let me give you an example of what I'm doing on my end. Products/Services page, I've got the following custom fields: Domains page, I've got the following additional custom fields: You'll see I've got a custom field that's a tickbox which I believe makes the matter worse(?). I think what I'm looking for is when I pull up the Services or Domains report under Exports, it will show *all* the custom fields under Products/Services or Domains automatically (fields to include part) and also let me filter them individually just like the already existing fields. Hope that makes sense. Any idea how much I should pay to have a developer create this for me? Thanks again. Edited January 5, 2020 by WHMCS ChrisD Removed PII Information in accordance with community guidelines 0 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 6, 2020 Author Share Posted January 6, 2020 Here are the screen shots. Products & Services page + Domains page Is this possible? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 7, 2020 Share Posted January 7, 2020 On 03/01/2020 at 04:01, baymax said: You'll see I've got a custom field that's a tickbox which I believe makes the matter worse(?). they would have a value of "on" if they have been ticked. On 03/01/2020 at 04:01, baymax said: I think what I'm looking for is when I pull up the Services or Domains report under Exports, it will show *all* the custom fields under Products/Services or Domains automatically (fields to include part) and also let me filter them individually just like the already existing fields. the problem with custom fields in this context is that there are (or can be) multiple fields (and their values) that may or may not apply for any given domain/service... the default WHMCS reports all tend to expect value per field... so what's required in your case is more than a little tweak. On 03/01/2020 at 04:01, baymax said: Hope that makes sense. it does - what you will need is effectively two custom reports (ine for domains, another for services), using new filenames to ensure that they're not overwritten during a WHMCS update. On 03/01/2020 at 04:01, baymax said: Any idea how much I should pay to have a developer create this for me? I see that you've started a SO&R thread, but it's worth noting that developers in such threads will not publicly post a price for projects like this, they will all ask you to go to their sites and complete their contact forms... and then give you a quote privately. 1 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.