serge Posted September 5, 2015 Report Posted September 5, 2015 In this client template: - client_main_custom_fields.pdt I would like to get value for: - client_id All my try did not work, any idea?
Blesta Addons Posted September 5, 2015 Report Posted September 5, 2015 On 9/5/2015 at 8:53 PM, serge said: In this client template: - client_main_custom_fields.pdt I would like to get value for: - client_id All my try did not work, any idea? you need it without hacking the core file ? $vars->id PauloV and serge 2
Tyson Posted September 6, 2015 Report Posted September 6, 2015 On 9/5/2015 at 9:56 PM, naja7host said: you need it without hacking the core file ? $vars->id This is the user ID. The client ID would be available with: $vars->client_id However, the content of $vars changes based on post data. For example, if there was an error on the page, the page would be shown again and $vars would not contain the client ID any longer. serge 1
serge Posted September 6, 2015 Author Report Posted September 6, 2015 Thank You, both solutions worked fine, and it's echo same value I wanted/needed. by the way I'm confused by the sense of user_id VS customer_id, what's the difference? Do there is connection with contact(s) vs customer, so when there is only one contact for the customer both id match?
Tyson Posted September 8, 2015 Report Posted September 8, 2015 The user ID and client ID reference different tables in the database and represent different records. While it's possible the user ID and client ID can be the same for some users, it is not reliable to assume this to be the case. You should reference the correct ID for what you're trying to do. user ID = user login information client ID = client information Every client has a user, but not every user is a client. serge 1
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now