Jump to content

Merging multiple clientarea sections into a single page


Recommended Posts

I have been looking into consolidation several sections of WHMCS into a single page so that my customers don't have to click through so many pages in order to do simple things like access cPanel for their hosting services, or to view all domains on their account.

 

The problem I found is that one cannot simply merge the tpl files for these sections as the smarty variables are not defined for those pages ---

 

Example:

 

If you combine `clientareahome.tpl` with `clientareadomains.tpl`, you will not get a list of the domains on the account on the `clientareahome.tpl` page. Instead, you will get errors.

 

I dug a bit deeper, and I could not find anywhere to force the variables to load the appropriate information for these pages --- most likely because the files that control the flow of this data seem to be all IonCube encoded.

 

I am seeking assistance with this as I (and my customers), have found WHMCS client area to be unnecessarily excessive on the amount of clicking necessary in order to reach common information. This makes the 2 clicks from my home page seem horrendous when you count the 4 clicks to get to cPanel for a particular hosting package (Login, View, View Details, Login to cPanel). I am just using the cPanel button as an example of distance from user entry to action. This applies to other things such as Domains, SSL control, Profile editing, and so on, which could be consolidated more efficiently.

 

I have sought out third party assistance from 'theme integrators', however they only migrate the header/footer html, and do nothing with the actual content itself. I have restyled everything using Bootstrap3, and modern components (if I could hack the tables, I would use a jQuery sortable table rather than the one that requires a page reload on every sort change -- which supports filtering as well).

 

Any assistance in this would be fantastic -- or if the only way is to have the source for the 'clientarea.php' file, instructions on how one may obtain a source license would be great.... even if it is just the client area sources. I can put up with the nuances in the administration area, so I am really just concerned about UX/UI for the user area.

Edited by microvb
Link to comment
Share on other sites

  • 7 months later...

I understand that it might seem so odd but this is absolutely normal. As you stated you can't combine templates because for example all variables on mypage.tpl come from mypage.php so you can't merge this template with another page. Of course the solution is not trying to access to the source of PHP files for a lot of different reasons: it's denied, unmaintainable, nightmares everytime you need to update something and so on.

 

Nobody forces you to use default templates of WHMCS. Almost all of all existing templates, even the expensive ones, are always based on the same .php files so it's like they're always the same thing just with different colors and disposition of elements.

 

Said that the solution is simple to explain. Create your own .php files to support all your customized .tpl files. You can achieve all your goals with no limitations. See the attached screenshot (they're all BETA/ALFA versions a.k.a. shitty and buggy so be advised).

 

Screenshot 2015-01-07 06.28.23.png

 

In the first one you can see that I grouped all services of same domain (hosting, domain, ssl, dns) under an unified table where people can play (create or unsuspend), pause (suspend), stop (terminate), configure, login and see how much they're spending for all their services. Basically the idea is the entire client area of WHMCS has been "condensed" in a single page.

 

Screenshot 2015-01-07 06.29.41.png

 

In the second screenshot you can see an horrible thing ;) well ignore how buggy it looks because I worked on it for less than 10 minutes (I abandoned it because I'm still looking for inspiration). Anyway the idea is the same I described above. Everything on a page but this time not with a table but with colored bricks that you can filter in real time by using the search box. Every brick is supposed to display you how much you are spending globally (domain + hosting + ssl + dns) and provides detailed costs on mouse over. You can perform all actions by simply clicking on your brick.

 

Ok I said enough. To make it short code your own .php files to support your templates. In case you need to grab just few variables on a .tpl just push all additional informations you need with a small PHP file to include on top of your .tpl. Job done.

Link to comment
Share on other sites

I understand that it might seem so odd but this is absolutely normal. As you stated you can't combine templates because for example all variables on mypage.tpl come from mypage.php so you can't merge this template with another page. Of course the solution is not trying to access to the source of PHP files for a lot of different reasons: it's denied, unmaintainable, nightmares everytime you need to update something and so on.

 

Nobody forces you to use default templates of WHMCS. Almost all of all existing templates, even the expensive ones, are always based on the same .php files so it's like they're always the same thing just with different colors and disposition of elements.

 

Said that the solution is simple to explain. Create your own .php files to support all your customized .tpl files. You can achieve all your goals with no limitations. See the attached screenshot (they're all BETA/ALFA versions a.k.a. shitty and buggy so be advised).

 

[ATTACH=CONFIG]7863[/ATTACH]

 

In the first one you can see that I grouped all services of same domain (hosting, domain, ssl, dns) under an unified table where people can play (create or unsuspend), pause (suspend), stop (terminate), configure, login and see how much they're spending for all their services. Basically the idea is the entire client area of WHMCS has been "condensed" in a single page.

 

[ATTACH=CONFIG]7859[/ATTACH]

 

In the second screenshot you can see an horrible thing ;) well ignore how buggy it looks because I worked on it for less than 10 minutes (I abandoned it because I'm still looking for inspiration). Anyway the idea is the same I described above. Everything on a page but this time not with a table but with colored bricks that you can filter in real time by using the search box. Every brick is supposed to display you how much you are spending globally (domain + hosting + ssl + dns) and provides detailed costs on mouse over. You can perform all actions by simply clicking on your brick.

 

Ok I said enough. To make it short code your own .php files to support your templates. In case you need to grab just few variables on a .tpl just push all additional informations you need with a small PHP file to include on top of your .tpl. Job done.

 

Ok, I don't like to listen to "can't do it" answers because such answers are wrong pretty much 100% of the time. Anything can be done. The question is, the extent to do it.

 

However, you do provide a good alternative. If I do make a PHP page I should be able to use javascript to build a URL into the submit button based on options on my custom PHP page. Which, when submitted, should be able to build all the user selections into a full URL. I wonder however if it's possible to do such a thing with the following sections:

 

* Username/password for new account

* Registration details

 

Also, it might theoretically be possible to build a "mock" summary section at the bottom based on what the user selected ("mock" as in, it does not pull the real database queries but just pulls data from the page to build a mock summary).

 

Well, I will work with this, and see what I can come up with. A bit late tonight though to begin on this.

 

UPDATE:

Looks like you can use the API to create a new user, password, and registration, via PHP. http://docs.whmcs.com/API:Add_Client

 

It's looking like it might be possible to, using the API, combine the complete selection and registration all into one page.

 

Time will tell, but it's looking optimistic.

Edited by gfdh
Link to comment
Share on other sites

Yes, API is the way :) Few weeks ago I started to code a totally separated custom website that works with WHMCS via API. If you want to see it (it's a mockup) login here (email: info@revhosting.org - password: aaa) then visit these pages:

 

All you see there is 100% custom and works via API. When you login, logout, submit a ticket, view ticket, invoice (...) you are doing it for real via API on a real WHMCS that is installed in a different place. So to make it short as you can see you can do everything.

Link to comment
Share on other sites

Yes, API is the way :) Few weeks ago I started to code a totally separated custom website that works with WHMCS via API. If you want to see it (it's a mockup) login here (email: info@revhosting.org - password: aaa) then visit these pages:

 

All you see there is 100% custom and works via API. When you login, logout, submit a ticket, view ticket, invoice (...) you are doing it for real via API on a real WHMCS that is installed in a different place. So to make it short as you can see you can do everything.

 

Could you send me the files so I could use them to integrate into my site?

Can you use this to register new customers?

Edited by gfdh
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.

×
×
  • 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