Jump to content

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


Anders

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

Link to comment
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.

Link to comment
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.

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