igortomiatti Posted March 28, 2016 Share Posted March 28, 2016 I am creating a ShoppingCartValidateProductUpdate hook. In order process has a two customfields (login and password). One of the variables of this hook, is the array "customfield". How can I access the specific customfield? I got it entering the ID of customfields that I found accessing the WHMCS database. Like this: $vars["customfield"]["1"]. There is an easier way to access the customfield? Like for example entering the name of customfield? Like this: $vars["customfield"]["Login"] 0 Quote Link to comment Share on other sites More sharing options...
tonnybarros Posted March 28, 2016 Share Posted March 28, 2016 Hello friend, how to get get the custom fields? See I'm also in need, but it seems that whmcs forgot that part of its documentation. http://forum.whmcs.com/showthread.php?112615-Help-to-create-hooks 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted March 28, 2016 Share Posted March 28, 2016 as described in the documentation, you can call each customfield with their IDs: $vars['customfields'][5]; There is an easier way to access the customfield? Like for example entering the name of customfield? Like this: $vars["customfield"]["Login"] you can query Database to get this information, but you will need product/service ID for that purpose which is not available in this ActionHook point. http://docs.whmcs.com/Hooks:ShoppingCartValidateProductUpdate 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.