LynxMukka Posted December 1, 2019 Share Posted December 1, 2019 Hi all - looking for some help if this is currently possible in WHMCS.. If we were to have a set of optional fields (like billing address) during user registration, can we get these so that they're compulsory during the ordering of a product? Or in other words, we have some custom fields during registration, but WHMCS will prevent the user from creating a new order until they've provided certain additional fields. Like other sites, we want to provide the ability for customers to register (without bombarding them with input fields), understand how our portal works, and then make an order when they're ready. Hope this makes sense. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 2, 2019 Share Posted December 2, 2019 13 hours ago, LynxMukka said: Hope this makes sense. so in other words, some fields would be optional/removed on register.php, but required at checkout ? not from admin settings, but it could be achieved with hooks, possibly even template edits - but often it's just simpler to disable registration and leave it until ordering before the need to collect client info (unless there is some specific need on your site for them to register first before ordering?). 0 Quote Link to comment Share on other sites More sharing options...
LynxMukka Posted December 3, 2019 Author Share Posted December 3, 2019 19 hours ago, brian! said: so in other words, some fields would be optional/removed on register.php, but required at checkout ? not from admin settings, but it could be achieved with hooks, possibly even template edits - but often it's just simpler to disable registration and leave it until ordering before the need to collect client info (unless there is some specific need on your site for them to register first before ordering?). Thanks for the guidance. If we were to look at doing this without disabling registration, how might you go about it with hooks? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 4, 2019 Share Posted December 4, 2019 On 03/12/2019 at 09:48, LynxMukka said: If we were to look at doing this without disabling registration, how might you go about it with hooks? what I would do first is make these fields optional in setup -> general settings -> other -> optional client profile fields... that will make them optional on both the registration and checkout pages... then I would use a hook to make these specific fields required at checkout.. an example of which I have posted previously in the thread below... in that example, the companyname and taxid fields are now required at checkout - but would still be optional during registration. one thing that I seem to have forgotten to mention in that solution is the requirement to create Language Overrides for the error messages (in each language used on your site) - or you could hardocde the error in a specific language in the hook. $_LANG['clientareaerrorcompanyname'] = "You did not enter a company name"; 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.