Jump to content

Client dashboard no link


hostxls

Recommended Posts

Hello,

 

I have seen that there isn't a link to return to the client dashboard when you are in the client area.

 

Is it possible to make the 'Welcome, Name' redirect to the dashboard ( /clients/clientarea.php) and how do I do that.

 

 

Thanks,

Link to comment
Share on other sites

normally, when the client is logged in and in their client area, they can click the "Home" button on the navbar to return to the client area homepage.

 

however, I notice that when not logged in, your home button goes to your parent site... that likely means that the logged in home link won't work either.

 

try going to setup -> general settings -> general -> WHMCS System URL (or WHMCS SSL System URL) - I suspect the current value in there is "https://www.hostxls.com/" - change it to "https://www.hostxls.com/clients/" and then see if the home button works correctly when logged in.

Link to comment
Share on other sites

try going to setup -> general settings -> general -> WHMCS System URL (or WHMCS SSL System URL) - I suspect the current value in there is "https://www.hostxls.com/" - change it to "https://www.hostxls.com/clients/" and then see if the home button works correctly when logged in.

 

I'm sorry but it was always this link ( "https://www.hostxls.com/clients/") that we have used. see image.

I it possible to ad a 'dashboard' link in the Account Tab and how can I do that?

Screenshot_61.png

Link to comment
Share on other sites

I'm sorry but it was always this link ( "https://www.hostxls.com/clients/") that we have used. see image.

so with the client logged in, where does the "Home" button link too... by default, it should be "https://www.hostxls.com/clients/clientarea.php"... actually, it's strange it doesn't point to https://www.hostxls.com/clients/index.php when not logged in :?:

 

you haven't modified the navbar in anyway have you - template, hook etc ?

 

I it possible to ad a 'dashboard' link in the Account Tab and how can I do that?

yes, using an action hook.

 

http://docs.whmcs.com/Client_Area_Navigation_Menus_Cheatsheet

Edited by brian!
Link to comment
Share on other sites

so with the client logged in, where does the "Home" button link too... by default, it should be "https://www.hostxls.com/clients/clientarea.php"... actually, it's strange it doesn't point to https://www.hostxls.com/clients/index.php when not logged in :?:

 

you haven't modified the navbar in anyway have you - template, hook etc ?

 

Yep, I have change the point to address, because otherwise you can not go back to the normal website (http://www.hostxls.com)

With the Home link you will stay on the client website.

 

That's why I need to create the "dashboard" link within the client "Hello, xxx!" tab.

So that the client always can go back to his/her dashboard and with the Home to the home website.

Link to comment
Share on other sites

Hello Brian,

 

I have try to enter a new child into the Account tab ( Hello, Vincent!) as you can see in the image using this hook but it seems not to work.

 

What am I doing wrong? Can you help fix this.

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('Primary_Navbar-Account', 1, function (MenuItem $primaryNavbar)
{
   if (!is_null($primaryNavbar->getChild('Account'))) {
       $primaryNavbar->getChild('Account')
           ->addChild('Dashboard', array(
               'label' => 'Dashboard',
               'uri' => 'https://hostxls.com/clients/clientarea.php',
               'order' => '100',
           ));
   }
});

Screenshot_66.png

Link to comment
Share on other sites

Yep, I have change the point to address, because otherwise you can not go back to the normal website (www.hostxls.com)

With the Home link you will stay on the client website.

yes, but there currently is no real site at hostxls.com, just a holding page.

 

in any event, you're going to integrate your WHMCS site into Wordpress at some point, so when that occurs, both links will likely be there and it would make more sense for the "Home" link to either go to clients/index.php when logged out, or clients/clientarea.php when logged in - which it should do by default anyway.

 

That's why I need to create the "dashboard" link within the client "Hello, xxx!" tab.

So that the client always can go back to his/her dashboard and with the Home to the home website.

if it were me, what I would do is leave the "Home" link working as it should (as above) and change the link on the hostxls logo to go back to the main site... that's just a minor tweak to header.tpl

 

I have try to enter a new child into the Account tab ( Hello, Vincent!) as you can see in the image using this hook but it seems not to work.

What am I doing wrong? Can you help fix this.

that right hand navbar is a Secondary navbar, not Primary - so your were using the wrong action hook (and using it wrongly too!)

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar)
{
   if (!is_null($secondaryNavbar->getChild('Account'))) {
       $secondaryNavbar->getChild('Account')
           ->addChild('Dashboard', array(
               'label' => 'Dashboard',
               'uri' => 'clientarea.php',
               'order' => '100',
           ));
   }
});

personally, I don't think that's a good place to put it... as the client wouldn't know it was there unless they saw it... if you're going to do something like this, it almost makes more sense to change "Home" into a dropdown with two links - one to your "main site" and another to "dashboard".

 

though I return to my earlier point that if/when your site is going to get integrated into WP, then you shouldn't really need to be messing with the navbars like this... but it's entirely up to you! :)

Link to comment
Share on other sites

I should have made the navbar hook only work for logged in clients...

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar)
{
   $client = Menu::context('client'); 

   if (!is_null($client) && !is_null($secondaryNavbar->getChild('Account'))) {
       $secondaryNavbar->getChild('Account')
           ->addChild('Dashboard', array(
               'label' => 'Dashboard',
               'uri' => 'clientarea.php',
               'order' => '100',
           ));
   }
});

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