tiagocaus Posted September 9, 2020 Share Posted September 9, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 10, 2020 Share Posted September 10, 2020 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. 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 ? 1 Quote Link to comment Share on other sites More sharing options...
tiagocaus Posted September 10, 2020 Author Share Posted September 10, 2020 @brian! Yes, it is a customized field on the product screen. See image below. I wrote here in English, but the name of the field is in Portuguese. 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 10, 2020 Share Posted September 10, 2020 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 ?? 0 Quote Link to comment Share on other sites More sharing options...
tiagocaus Posted September 10, 2020 Author Share Posted September 10, 2020 @brian! There is only one custom field with the name Chave. 0 Quote Link to comment Share on other sites More sharing options...
Xfireteam Posted March 11, 2023 Share Posted March 11, 2023 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. 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 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.