tiagocaus Posted July 28, 2019 Share Posted July 28, 2019 Good afternoon. I have a car rental system. I am creating a module to control sales through WHMCS. I need two of your help. 1º) How to make the field USERNAME receive the first name of the register? 2º) In the custom field, called CHAVE , how do I automatically generate an MD5 number? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
0 Grizzlyware Josh Posted October 17, 2019 Share Posted October 17, 2019 @tiagocaus sorry it's a bit late of a reply, but you can do this with a hook on service created (using the auto release module) or order created. If you are writing your own module, you could edit the custom field value using Salmon: // Assign the data store to a variable for shorter example $customFieldDataStore = $service->customFieldStore(); // Fetch the custom field $customFieldValue = $customFieldDataStore->getCustomFieldValue($customFieldDataStore->getFieldByName('Chave')); // From which you can then set a new value $customFieldValue->value = md5(microtime()); // And save it $customFieldValue->save(); More docs: https://github.com/grizzlyware/salmon-whmcs/wiki/Custom-fields Hope this helps! 🙂 1 Quote Link to comment Share on other sites More sharing options...
Question
tiagocaus
Good afternoon.
I have a car rental system. I am creating a module to control sales through WHMCS.
I need two of your help.
1º) How to make the field USERNAME receive the first name of the register?
2º) In the custom field, called CHAVE , how do I automatically generate an MD5 number?
Thank you.
Link to comment
Share on other sites
1 answer to this question
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.