Jump to content

Using service variables from newly created page


prodiac

Recommended Posts

I've followed the documentation here: http://wiki.whmcs.com/Creating_Pages

 

I've created a new page, and edited header.tpl to get the new page linked with the other client area options.

 

The problem is I want to use the variables that are available and used in the clientareaproducts.tpl, in this new page.

 

The script I've written uses the following code:

 

{foreach key=num from=$services item=service}

{php}

$productid = $this->_tpl_vars['service']['id'];

 

This script works when added to the end of the clientareaproducts.tpl template, and displays what it is supposed to there. But when it is my custom page, it does not recognize the $services variable.

 

I presume that I need to add something else to my main page in the root directory for the script, to have it load those variables, but I am just not sure what needs to go there.

 

Can anybody help? I've built an addon for WHMCS to integrate it with Cacti graphs to display them for each users dedicated/colo servers, have it functioning as needed to display on the admin side, and billing for overage. All that's left is displaying on the client side.

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