Hi Guys,
I'm trying to make a module that is very dependent on all the products the user has along with the top level product they have.
so, in this case, think of it like I need to know the reseller ID they were assigned before I can link the new domain to the correct internal reseller they have.
So, I figured I'd use client Custom fields to trigger this, but I'm not sure how I'm supposed to save the custom field from within the provisioning module.
In the spirit of my last example, lets say a user purchases a hosting package. My companies policy is to immediately assign them a reseller package and that happens within the provisioning module, so it creates both the reseller and the hosting package within the reseller.
The next time the user comes along, I want to be able to tell the system "This user already has a reseller, just add the next domain to that reseller".
Now as you can probably figure out, this is NOT infact a reseller account, but the designs are so similar, it's semantics.
I've tried a few different options:
$params['client']::find($params['userid'])->customFieldValues->save(['KEY' => rand(100,100000)]);
Client::find($params['userid'])[0]->customFieldValues->save(['KEY' => rand(100,100000)]);
neither work at all. I believe custom fields are given as apart of the arguments passed to createAccount, so shouldn't be much of an issue getting the details, only setting.
Any help is very much appreciated.