Jump to content

Provisioning Module


neo.ealink

Recommended Posts

Hi, I would like to ask a simple question

 

I have set up some custom fields in my product.

In my module, I would like to get that custom fields value.

 

for example : my custom field name is customfield[27], its field name : Customer Code,

I understand that in the provisioning module, in order to use that parameter, we have to use following format :

 

$params['customfields']['Field Name'].. below is the list of param that i used to get that custom field value and NONE OF IT WORKS :(

 

$param['customfields']['customercode'];
$param['customfields'][27];
$param['customfields']['customfield[27]'];

 

For the moment, the only thing i can do is that taking the value directly from the "tblcustomfieldsvalues" table (either SELECT / UPDATE) but i think i still want to get the value from what WHMCS has set it via the $param..

 

Anyone please help..

 

Below is my sample code (jst to view the value in the log) :

 

 

function XXX_ChangePackage($params) {

logactivity("value from customfields in product/services-admin : ".$param['customfields']['customercode'].
$param['customfields'][27].$param['customfields']['customfield[27]']);

      //ignore below
       if ($successful) {
	$result = "success";
} else {
	$result = "Error Message Goes Here...";
}
return $result;

}

Link to comment
Share on other sites

var_dump it in your module and send the results to your email address. This way you can properly see what is provided and be sure you are handling "WHMCS" correctly - sorry, best I could offer as I have not been keen on the WHMCS dev side lately.

 

why should i send the results to my email instead of i just displayed it in the log using the logactivity()?? btw, still, all of those variables seems like did not sent / contain any value at all or now,back to the issue, i think the calling of the variable is wrong in my case. I would like to know how to call those custom fields in the provisioning module using the $param['customfields']

 

;'(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated