Jordan0361 Posted March 12, 2022 Share Posted March 12, 2022 How would I get the service id on module creation? 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted March 14, 2022 Share Posted March 14, 2022 On 3/12/2022 at 11:10 PM, Jordan0361 said: How would I get the service id on module creation? AfterModuleCreate hook 0 Quote Link to comment Share on other sites More sharing options...
Jordan0361 Posted March 14, 2022 Author Share Posted March 14, 2022 27 minutes ago, pRieStaKos said: AfterModuleCreate hook I'm using that hook but service ID is blank, probably due to my test setup. I'm guessing $params['serviceid'] or would it be something else? 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted March 14, 2022 Share Posted March 14, 2022 7 minutes ago, Jordan0361 said: I'm using that hook but service ID is blank, probably due to my test setup. I'm guessing $params['serviceid'] or would it be something else? Your data is in $vars 0 Quote Link to comment Share on other sites More sharing options...
Jordan0361 Posted March 14, 2022 Author Share Posted March 14, 2022 4 minutes ago, pRieStaKos said: Your data is in $vars So $vars['serviceid'] would be correct right I believe? Because it returns this: array(1) { ["params"]=> array(52) { ["accountid"]=> int(14) ["serviceid"]=> int(14) ["addonId"]=> int(0) ["userid"]=> int(1) ["domain"]=> string(0) "" ["username"]=> string(0) "" ["password"]=> string(14) "" ["packageid"]=> int(1) ["pid"]=> int(1) ["serverid"]=> int(0) ["status"]=> string(6) "Active" ["qty"]=> int(1) ["type"]=> string(5) "other" ["producttype"]=> And loads of other data, which will save the massive quote. Unsure if this is due to the module I have chose, as just chose it to make tickets currently to save linking the correct module - this may be the reason why though. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted March 14, 2022 Share Posted March 14, 2022 1 minute ago, Jordan0361 said: So $vars['serviceid'] would be correct right I believe? Because it returns this: array(1) { ["params"]=> array(52) { ["accountid"]=> int(14) ["serviceid"]=> int(14) ["addonId"]=> int(0) ["userid"]=> int(1) ["domain"]=> string(0) "" ["username"]=> string(0) "" ["password"]=> string(14) "" ["packageid"]=> int(1) ["pid"]=> int(1) ["serverid"]=> int(0) ["status"]=> string(6) "Active" ["qty"]=> int(1) ["type"]=> string(5) "other" ["producttype"]=> And loads of other data, which will save the massive quote. Unsure if this is due to the module I have chose, as just chose it to make tickets currently to save linking the correct module - this may be the reason why though. $vars[‘params’][‘serviceid’] 0 Quote Link to comment Share on other sites More sharing options...
Jordan0361 Posted March 14, 2022 Author Share Posted March 14, 2022 1 minute ago, pRieStaKos said: $vars[‘params’][‘serviceid’] That works but returns this only: int(14) 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.