Feature Requests
Share ideas, discuss and vote on requests from other users in community

Provisioning Module Config Options - Product vs Addon

Will G shared this idea 2 years ago
Under Consideration

(First off not sure if the category is correct for this, so I appologize in advance if its incorrect).

Currently the provisioning module shows the same configuration options for both products and addons.

I'm in the process of building out a provisioning module and it would be nice to be able to provide configuration options if the product being created is an addon and not a product.


Currently I have a configuration of "Data Center" that is chosen when the product is created.

When addons are created; I don't care about the "Data Center" because its dependent on the product so its a pointless option to display when creating the addon.

Ideally something like this would be possible:

  1. function provisioningmodule_configOptions()
  2. {
  3. return [
  4. 'product' => [
  5. 'Text Field' => [
  6. 'Type' => 'text',
  7. ...
  8. ],
  9. ...
  10. ],
  11. 'addon' => [
  12. 'Text Field' => [
  13. 'Type' => 'text',
  14. ...
  15. ],
  16. ...
  17. ]
  18. ];
  19. }

On the backend, if what is returned isn't an array with only the keys 'product' and 'addon' display the config for everything; otherwise only display the config for the respective component.

Comments (1)


I think i figured out a way to do this; but I'm sure its not considered "best practice" by any means.

  1. if(basename($_SERVER["SCRIPT_FILENAME"],".php") == "configaddons")
    //return addon options