Jump to content

why is this link work in email /whmcs/clientarea.php?action=productdetails&id={$service_ id}

Recommended Posts

Hi guys,


as I am not a coder I wonder if I could get some help.


when I add this link /whmcs/clientarea.php?action=productdetails&id={$service_id} in my "Hosting Account Welcome Email" the link is generating the service ID.


But if I add the same link header.tpl or other page the link don generate any service id.



any ideas how I can make it generate the service id?


warm regards K

Share this post

Link to post
Share on other sites

not all pages have access to the same variables - so with email templates, you can only use the merge fields listed in the box at the bottom of the page; with the other site templates pages, you can see what variables can be easily accessed by adding {debug} into your template source code.


also, it may be available in the other template pages - but not necessarily be called {$service_id} - it's possible it could be called something else.

Share this post

Link to post
Share on other sites

it depends in what page you want to do it and how you want to use it - but in general, there are two ways to do this...


you either see if the variable is available on the given template page - for example, in clientareaproductdetails.tpl you can access the variable {$id} which appears to be the same as your {$service_id}... although in clientareaproducts.tpl, it's accessed by {$service.id}


or alternatively, you query the database and pull the info from there.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated