Override Existing Option from Another Package

  • Hello,

    How can I override an existing option by installing another package?

    For example, my Package_A installs a boolean example_option with defaultvalue of 0.

    Now, I have my Package_B and what I want is to set example_option to 1 by installing this package.

    I have tried this in my Package_B option.xml:

    <option name="example_option">

    but this results in an error: option 'example_option' is already provided by 'Package_A'

  • Thanks for the responses. Well, I think I have this weird scenario of mine :D

    Let's say I have My_Plugin which will be offered both as Free and Premium. When installed, the premium options features will be already there but is disabled. When My_Plugin_Premium is installed, that will enable the premium options in My_Plugin.

    Something like this:

  • I would recommend, that the new options are shipped with the premium upgrade. That's what we do for example in our TinyIMG plugin.

    You should not forget, that people also can uninstall the premium package and just leave the free package installed, so you would also have to disable the options, again. That's way more work, than required and it's not easily done, for obvious reasons.