Jump to content

How to update ticket count in the client home page


wtools

Recommended Posts

I tried to update ticket count using the below hook, but that's not working.

add_hook('ClientAreaPrimaryNavbar', 1, function( Item $primaryNavbar) {
    if (!is_null($primaryNavbar->getChild('Support'))) {
        $primaryNavbar
            ->getChild('Support')
            ->getChild('Tickets')
            ->setBadge(11);
    }
});

I would like to set the ticket count in the client area home page to a diffrent value, how can i do that?

 

Link to comment
Share on other sites

17 hours ago, wtools said:

I tried to update ticket count using the below hook, but that's not working. 

it wouldn't as they aren't part of the navbar.... are we talking about the homepage tiles ?

8GROEzE.png

17 hours ago, wtools said:

I would like to set the ticket count in the client area home page to a different value, how can i do that?

two options - simplest way, just edit the clientareahome.tpl template as that is where which of these tiles are displayed to the user...

the other way might be to use a clientareapagehome action hook and modify the {$clientsstats.numactivetickets} array, but unless you were replacing it with a new value that had to be generated/queried, it's probably easier to just edit the template.

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