panacheweb Posted September 8, 2017 Share Posted September 8, 2017 how do I get active hosting account using the internal API for getting the exact number of an active product. I've tried everything I can think of. 0 Quote Link to comment Share on other sites More sharing options...
panacheweb Posted September 10, 2017 Author Share Posted September 10, 2017 my concept is to make a hook that checks data, has an output option to a template page 0 Quote Link to comment Share on other sites More sharing options...
Vivek Nair Posted October 3, 2017 Share Posted October 3, 2017 Hello, You might have solved this already. Anyway, from what I understood you need to know number of active hosting products. Here is a way you can do that : You can write a query like this : $Data = Capsule::table('tblhosting')->where('domainstatus', '=', ''Active')->count(); You will get the number you required. Please clear me if this is not what you meant. Thank you 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted October 4, 2017 Share Posted October 4, 2017 (edited) For the API - not sure, but in simple sql terms it'd be select count(id) from tblhosting where domainstatus="Active" and packageid=(theplanyouwanttocountfor) Edited October 4, 2017 by othellotech 0 Quote Link to comment Share on other sites More sharing options...
panacheweb Posted October 13, 2017 Author Share Posted October 13, 2017 On 10/3/2017 at 5:55 AM, Vivek Nair said: Hello, You might have solved this already. Anyway, from what I understood you need to know number of active hosting products. Here is a way you can do that : You can write a query like this : $Data = Capsule::table('tblhosting')->where('domainstatus', '=', ''Active')->count(); You will get the number you required. Please clear me if this is not what you meant. Thank you does that include the specifics for a product ID? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 13, 2017 Share Posted October 13, 2017 8 hours ago, panacheweb said: does that include the specifics for a product ID? no - it would just give you a total number of all products that are active... if you wanted a total active number for a specific product... $Data = Capsule::table('tblhosting') ->where('packageid','1') ->where('domainstatus','Active') ->count(); 0 Quote Link to comment Share on other sites More sharing options...
Parihe Posted November 27, 2020 Share Posted November 27, 2020 Hello, After get total count of active product, how to display in template? Please help 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.