Portal Template WHMCS required? Why? How can I work around this?

I'm searching for a solution that would stick here. How do I setup the WP WHMCS integration without changing the default whmcs install to use the portal theme?

I'm setting up a new site for new clients and need to integrate without using the portal theme (which I loath by the way :slight_smile: )

AND, having put time into training clients on our current system with custom theme on WHMCS installation - changing to the portal theme for the system cannot be done at this stage.

What advice do you have in this situation?

Thanks for any help with pointers - and also perhaps this is a feature request?

Cool :slight_smile:

  • aecnu
    • WP Unicorn

    Greetings Tim Griffin,

    Welcome to WPMU Dev!

    Yes from a stock point of view meaning without custom coding the portal template is required due to it presents/contains the correct coding necessary for integration.

    Here is the coding direct from Arnold the lead developer of WHMCS WP Integration, the code and the link to the post:

    [wcp-content] contents of a div with an id="content_left"
    [wcp_welcome] contents of div with id="welcome_box"
    [wcp_menu] contents of div with id-"top_menu"
    A little messy after that
    [wcp_quick_nav] contents of div id="side_menu" first ul tag and the preceeding p tag.
    
    [wcp_account] first form in div id="side_menu" may or may not exist
    if not there then 2nd and 3rd p tag
    [wcp_statistics] second form in div id="side_menu" may or may not exist
    if not there then 4th and 5th p tag.

    The code picks out whatever is in those areas. Got to have something to select by to parse the template. It doesn't check what's in it, just grabs the content.

    This is the thread the discussion is in:
    https://premium.wpmudev.org/forums/topic/nothing-is-showing-up

    Thank you for being WPMU Dev Member!

    Cheers, Joe

  • Tim Griffin
    • WPMU DEV Initiate

    Ok, thanks Joe for the response.

    I'm confused... Portal is not required? or it is required but you can get around it?

    If I understand correctly based on reading this post and the link referenced in that post I can get around having Portal IF I go in and edit my custom template.

    Is that what you are getting at?
    I'll give that a try and see what happens next :slight_smile:

    Thanks for the fast response and for the welcome. Good impression :slight_smile:

  • Tim Griffin
    • WPMU DEV Initiate

    Gave that a shot in the custom template.
    Something not working - still getting the original error...

    Is it possible to get more detailed integration instruction for getting around the Portal requirement?

    I'll play with this some more once I get a chance.
    I did notice on one forum post something about specifying the portal link in the system url which WHMCS does allow for. Looked like editing the plugin was required to input the url to instruct use of Portal on the integration side of things...

  • Tim Griffin
    • WPMU DEV Initiate

    Well, clearly I must be missing something.

    Currently using a reworked default template and unable to get the connect to work.
    It does work when I temporarily switch to the portal template for the system - but not with the above edits placed in the WHMCS homepage.tpl; header.tpl or footer.tpl

    Where precisely in the WHMCS system do I need to place code.
    AND what is the exact code that must be placed in the template file?

  • aecnu
    • WP Unicorn

    Greetings Tim Griffin,

    Sorry to see that you are still having a problem with getting this working.

    Yes it is true that the Portal theme is normally required and I was trying to point out a work around that Arnold had hinted to.

    Thank you for letting us know that you tried to integrate this into your new template but it did not work out.

    Please post the URL to your new template and I will see about getting Arnold in here with his invaluable insight to check out your template to see what is/has gone wrong.

    As soon as you post the URL I will try to get Arnold in here asap so that he can look at the live source code for clues.

    Please advise.

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings Tim Griffin,

    It appears that an update has indeed been published since this ticket was opened and please update your installation to see if this issue has indeed been resolved with the update.

    Arnold is still tagged to come in here to offer his advice/advise but he will need the URL to your WHMCS installation so he can see the source of your template/theme to determine what if any items are missing that would cause this issue.

    Please advise.

    Cheers, Joe

  • Timothy Bowers
    • Chief Pigeon

    Hey there, hope you are well!

    Just checking in to see how things are going and if you need further assistance.

    If you do then please feel free to reopen this thread or create a new one.

    A new version is also out.

    The issue with theme is mainly due to how their API functions and allows us to pull the data in. So custom templates or those not currently supported would need some custom work at the moment.

    Take care and have a fantastic day!

  • invictus
    • New Recruit

    I am in the same boat as the OP, it's not possible for us to use the portal template on our main WHMCS site. We are currently using a slightly modified version of the default template.

    If it is in fact possible to work around this I would love to know also. I don't see that the release notes for the new version say anything about it.

  • Timothy Bowers
    • Chief Pigeon

    The issue as I understand it is the way that templates are fed through their API.

    The only way to do that would be to look at the code and make any needed adjustments. You may need to contact a developer for that.

    You could also create a new thread so we can see if the developer of this specific plugin has any pointers for you.

    Take care.

  • invictus
    • New Recruit

    Is it preferable for me to make a duplicate thread asking the same question rather than post here?

    Although it's not possible for our main WHMCS site to use the portal template, maybe we can still call it in this plugin and use it for WP integration, while keeping our default theme on WHMCS when accessed directly by clients. Would it work to have this plugin request the portal template by calling it in the URL?

    For example:
    http://my-whmcs-url/?systpl=portal

  • Timothy Bowers
    • Chief Pigeon

    Is it preferable for me to make a duplicate thread asking the same question rather than post here?

    It just keeps threads more organised and this one was marked resolved so when pinging developers it will send through the original post and status, rather than yours.

    Of course I can still ping him here and will do.

    Currently I don't believe requesting the template through a query string is possible. I had discussed such options in the past with Arnold.

    Take care.

  • Arnold
    • El Macho WP

    To get the various pieces of the screen that get displayed the plugin has to parse the html that is returned from WHMCS and find the various area of the screen. Portal was designed to help that along by having a clean consitant layout.

    Default has an entirely different layout. For example in Portal the main content is in a div with an id of "content-left". Default doesn't have that div at all. In fact there is no div that "contains" the main content. The only candidates are some marked with classes and they aren't unique and change from page to page.

    Also things like the account statistics aren't one every page so the widget for account stats won't have anything to display even if it were marked correctly. And many other things like were are the javascript and ajax calls.

    You might be able to mark it up to be useful but then it's likely to look a lot like portal once you get everything included.

  • Tim Griffin
    • WPMU DEV Initiate

    Any chance that you could make adjustments to use the new default template? This is a far superior layout compared to the very outdated portal template. At present there is not reason for me to go through the pain of marking up a template and end up with the Portal layout once more.

    Actually, until the portal is no longer a requirement this "integration" option is of no use whatsoever to me. I was really hoping this would be a good fit but... I'll have to keep looking or wait till the integration is more transparently integrated with our WordPress powered website.

    Thoughts? Timeline on using a different template for integration or finding a way to integrate that is template independent?

    I appreciate your time and input - answering questions and helping!

    Tim

  • Arnold
    • El Macho WP

    Hi Tim,

    The problem is we have to be able to parse the pages generated by WHMCS to find the various pieces for display. Currentl Portal is the only one that is marked up consistently. Every page has all the pieces. The default template doesn't display things like statistic or account summaries except on certain pages which would make mopst of the Widgets and shortcode useless because the data is just not there.

    What you can do is use Default on the WHMCS site and have intergration force the use of Portal for it' s display.

  • Tim Griffin
    • WPMU DEV Initiate

    Ok, I've dug around, read and re-read the setup instructions and have not located the precise instructions on how to "force the use of Portal".

    Could that become part of the standard plugin install where this becomes a simple option to activate?

    Is there something already there that I am missing?

    Cool :slight_smile: Thanks for pointers on getting this issue resolved!

  • Arnold
    • El Macho WP

    You can patch it yourself. In the whmcs-integration.php file around line 1105 there is a line

    $result = $this->load_whmcs_url($this->settings['remote_host']);// . '?systpl=portal');

    The piece at the end is commented out from my testing. Change it to

    $result = $this->load_whmcs_url($this->settings['remote_host'] . '?systpl=portal');

    and it will force the portal template. The reason I'm reluctant is it leaves a cookie that forces the regular view of WHMCS not through the integration to also show portal.

  • Tim Griffin
    • WPMU DEV Initiate

    So, I can see that this has limited effectiveness.

    For instance, the knowlegdebase breadcrumbs point to the default WHMCS install which takes you off the site with the plugin active. Breadcrumbs for other sections more or less work as expected.

    Also, when doing a domain search and selecting the whois link - the popup shows the error:

    Sorry this doesn't look like a WHMCS site at https://missioncommunicate.com/members/ Make sure your WHMCS Integration settings are pointing to the correct URL and that the WHMCS site is set for the Portal template in Setup | General.

    Aside from this is the fact that all the items which show in the portal template by default are here on the site. I'm looking for a quick way to remove a number of these items which we do not use. If I edit the default template will that reflect on the integration side of things?

    Thanks for your patience, help and moving this plugin forward!

  • Patrick
    • Support Monkey

    Hiya @Tim Griffin

    Just a heads-up :slight_smile:

    I'm doing a bit of house-cleaning today and archiving old threads.

    I'll mark this one as resolved for now. But, if you need more help with this, please feel free to re-open this thread, or start a new one.

    Have a great day!

  • RIT
    • Recruit

    Has this been updated in recent years as WHMCS no longer comes with Portal. It uses Six as default.

    EDITED: Totally set SIX in both and it works just as it should. Thank you all the same. Sorry for opening this again for nothing.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.