Jump to content

Can I show the list of services in clientareahome.tpl?


nordkappnett

Recommended Posts

Hi,

We're trying to list a customer's products/services on the clientarea homepage (clientareahome.tpl), similar to what was asked about in the old thread at https://whmcs.community/topic/182573-customise-clientareatpl-to-display-active-productsservices/. It suggested to use {php} tags, which from what I understand does not work anymore. Is there another way to get the content of $services as they are used in clientareaproducts.tpl available in clientareahome.tpl?

 

Link to comment
Share on other sites

1 hour ago, nordkappnett said:

We're trying to list a customer's products/services on the clientarea homepage (clientareahome.tpl), similar to what was asked about in the old thread at https://whmcs.community/topic/182573-customise-clientareatpl-to-display-active-productsservices/. It suggested to use {php} tags, which from what I understand does not work anymore.

in theory, I suppose the {php} solution could still work, though the option to use {php} in Smarty was removed years ago, and will at some point, be removed from WHMCS too.

1 hour ago, nordkappnett said:

Is there another way to get the content of $services as they are used in clientareaproducts.tpl available in clientareahome.tpl?

the usual way now would be to use a hook to get the information, usually by using Capsule, Models or the API, and return the resulting array back to the template - and then in the template, you would foreach loop through the array - now it might take some work to get the array the same as the one used on the products template page - but it's certainly doable if you have to go down that road... and you would do that in teh hook before it is returned to the template.

I will have posted the basic hook to do that - you could try searching on 'clientarepagehome' (which would be the hook point required if it's going to be in that template you specify and not a homepage panel)... or search for the database table (which would be 'tblhosting').

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