Jump to content

Take the value of a custom field.


tiagocaus

Recommended Posts

I created a custom field called KEY. It appears on the PRODUCTS / SERVICES screen.

I need to get theVALUE from the KEY field, inside the clientssumary.tpl file.

I tried it this way:

{php}
   echo $params['customfields']["KEY"];
{/php}

But it doesn't capture the value.

How to do this?

Thank you.

Link to comment
Share on other sites

10 hours ago, tiagocaus said:

I created a custom field called KEY. It appears on the PRODUCTS / SERVICES screen.

so it's a product custom field ?

10 hours ago, tiagocaus said:

I need to get theVALUE from the KEY field, inside the clientssumary.tpl file.

for a start, you definitely shouldn't be using {php} tags. naughty.gif

if it's a product custom field, then you're going to have to query the database - the template won't have access to product custom fields... and if the client has multiple products that has this product field, then there are potentially going to be multiple values in the database.

how do you intend to use this product custom field in the clientsummary page ?

Link to comment
Share on other sites

2 hours ago, tiagocaus said:

After I get the value of the "Chave", I will make a select in the external database to get some data related to the client and put it in the clientssummarybox.

but what happens if the client has multiple services with this custom field - do you want to get them all, or only one ? and if one, which one ??

Link to comment
Share on other sites

  • 2 years later...
On 9/10/2020 at 6:04 AM, brian! said:

so it's a product custom field ?

for a start, you definitely shouldn't be using {php} tags. naughty.gif

if it's a product custom field, then you're going to have to query the database - the template won't have access to product custom fields... and if the client has multiple products that has this product field, then there are potentially going to be multiple values in the database.

how do you intend to use this product custom field in the clientsummary page ?

how to show custom field in each product in:  clientarea.php?action=services

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