system53 Posted January 10, 2017 Share Posted January 10, 2017 Hi, Dear forum users, Shows the number in active service in the customer interface. We want to show the number in active service with the group but we relevant product. For example: Dedicated Servers Virtual Servers Web hosting, etc. In these groups you have active or is it possible to show how Total product number. all shows the number of currently active services. So, the following code was used: {$clientsstats.productsnumactive} My code sample: <h1 class="text-left timer" data-from="0" data-to="{$clientsstats.productsnumactive}" data-speed="2500"> </h1> <p>{$LANG.clientareaactive} {$LANG.servername}</p> As we have mentioned, we have, for example, "Servers" the number of products we want to show which are active in the product group. How Can I do this. I thank everyone in advance 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 10, 2017 Share Posted January 10, 2017 How Can I do this. if the information you want isn't available to you in the template, your only practical solution is to write an action hook to query the database - however, to get those totals you want, you would need to query multiple database tables as the required data is spread over at least 3 different tables. 0 Quote Link to comment Share on other sites More sharing options...
system53 Posted January 10, 2017 Author Share Posted January 10, 2017 if the information you want isn't available to you in the template, your only practical solution is to write an action hook to query the database - however, to get those totals you want, you would need to query multiple database tables as the required data is spread over at least 3 different tables. We use only the active products in the design division. As I said, I want to show the number of active products in each group. Can you please tell what should I do for this? Can you please help me. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 10, 2017 Share Posted January 10, 2017 Can you please tell what should I do for this? when you say tell you what to do, I guess you mean do it for you! if it were just one table, I might quickly write the code - but for 3 linked tables, after a long day, it would require testing... I can tell you that I think the hook would need to query the hosting table to get a list of your clients products; then reference that against the products table to get the product group id; and then reference that against productgroup table to get the group name - and then do a count for each group. if it's urgent, you can always post in Service Offers & Requests and get a developer to write it for you. 0 Quote Link to comment Share on other sites More sharing options...
system53 Posted January 10, 2017 Author Share Posted January 10, 2017 when you say tell you what to do, I guess you mean do it for you! if it were just one table, I might quickly write the code - but for 3 linked tables, after a long day, it would require testing... I can tell you that I think the hook would need to query the hosting table to get a list of your clients products; then reference that against the products table to get the product group id; and then reference that against productgroup table to get the group name - and then do a count for each group. if it's urgent, you can always post in Service Offers & Requests and get a developer to write it for you. when you say tell you what to do, I guess you mean do it for you! if it were just one table, I might quickly write the code - but for 3 linked tables, after a long day, it would require testing... I can tell you that I think the hook would need to query the hosting table to get a list of your clients products; then reference that against the products table to get the product group id; and then reference that against productgroup table to get the group name - and then do a count for each group. if it's urgent, you can always post in Service Offers & Requests and get a developer to write it for you. Thank you for the reply I think I need some time for this Or I need to find a developer. We will do this in a short time with the help of a developer If needed I can provide it in the forum afterwards if possible 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.