serge Posted September 5, 2015 Report Share 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? Quote Link to comment Share on other sites More sharing options...
Blesta Addons Posted September 5, 2015 Report Share 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? you need it without hacking the core file ? $vars->id serge and PauloV 2 Quote Link to comment Share on other sites More sharing options...
Tyson Posted September 6, 2015 Report Share Posted September 6, 2015 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 Quote Link to comment Share on other sites More sharing options...
serge Posted September 6, 2015 Author Report Share 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? Quote Link to comment Share on other sites More sharing options...
Tyson Posted September 8, 2015 Report Share 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 Quote Link to comment Share on other sites More sharing options...
serge Posted September 9, 2015 Author Report Share Posted September 9, 2015 Great info, Thank You 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.