fossxplorer Posted May 12, 2017 Report Posted May 12, 2017 I'd like to know how i can read in different parameters before provisiong a product. in WHMCS it was done as following: $fullname = $params["clientsdetails"]["firstname"] . " " . $params["clientsdetails"]["lastname"]; $email = $params["clientsdetails"]["email"]; $myusername = $params["clientsdetails"]["customfields1"]; $mypassword = $params["password"]; $pid = $params["pid"]; //Product/Service ID Thanks. Quote
0 Adam Posted May 12, 2017 Report Posted May 12, 2017 32 minutes ago, fossxplorer said: I'd like to know how i can read in different parameters before provisiong a product. in WHMCS it was done as following: $fullname = $params["clientsdetails"]["firstname"] . " " . $params["clientsdetails"]["lastname"]; $email = $params["clientsdetails"]["email"]; $myusername = $params["clientsdetails"]["customfields1"]; $mypassword = $params["password"]; $pid = $params["pid"]; //Product/Service ID Thanks. Where are you planning on running this code? In a plugin? In a module? More information here: https://docs.blesta.com/display/dev/Overview -Adam Michael 1 Quote
0 fossxplorer Posted May 12, 2017 Author Report Posted May 12, 2017 Module yes. I need to create a module Quote
0 activa Posted May 12, 2017 Report Posted May 12, 2017 check the $var in addservice() function , it has the whole vars needed. Quote
0 fossxplorer Posted June 12, 2017 Author Report Posted June 12, 2017 I Thanks @activa. I fail to see what the array $var contains reading https://docs.blesta.com/display/dev/Module+Methods#ModuleMethods-addService($package,array$vars=null,$parent_package=null,$parent_service=null,$status="pending") But i might get an overview by dumping the $var perhaps and see i guess. Also, i need to read in a custom field "username". Is that also something i can do through $var? Quote
0 Adam Posted June 12, 2017 Report Posted June 12, 2017 5 hours ago, fossxplorer said: I Thanks @activa. I fail to see what the array $var contains reading https://docs.blesta.com/display/dev/Module+Methods#ModuleMethods-addService($package,array$vars=null,$parent_package=null,$parent_service=null,$status="pending") But i might get an overview by dumping the $var perhaps and see i guess. Also, i need to read in a custom field "username". Is that also something i can do through $var? http://source-docs.blesta.com/class-Module.html#_addService If you click on the description for any function it will expand (its of course not made clear with the template/theme of the page). -Adam Quote
Question
fossxplorer
I'd like to know how i can read in different parameters before provisiong a product.
in WHMCS it was done as following:
$fullname = $params["clientsdetails"]["firstname"] . " " . $params["clientsdetails"]["lastname"];
$email = $params["clientsdetails"]["email"];
$myusername = $params["clientsdetails"]["customfields1"];
$mypassword = $params["password"];
$pid = $params["pid"]; //Product/Service ID
Thanks.
5 answers 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.