VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: WebStuff on February 27, 2013, 19:31:55 PM

Title: Can I add javascript to a plugin config page so I can alter backend xml file?
Post by: WebStuff on February 27, 2013, 19:31:55 PM
Versions: PHP 5.4, VM2.0.18, J2.5

Hi,
I would like to add extra fields to a shipment plugin config page "on the fly" as it were.
In VM1 this was easy as the backend config was loaded from a php/.cfg.php file so I could just add an "Add" button and a "Delete" button for extra parameters. Then use javascript to update the plugins cfg.php files from the backend.
On VM2 the config for plugins is loaded from an xml file, so is there a place that I can add fields or a function that hooks into the backend onload event so I can throw some js powered buttons into the backend plugin config screen?

Any help greatly appreciated.
Title: Re: Can I add javascript to a plugin config page so I can alter backend xml file?
Post by: WebStuff on March 01, 2013, 16:18:03 PM
Or if someone knows of a plugin that already does this then I could take a look at the code.
Please post a link if you do know of one.

Thanks
Title: Re: Can I add javascript to a plugin config page so I can alter backend xml file?
Post by: WebStuff on March 11, 2013, 11:47:46 AM
I am trying to get this for a non-commercial UK postcode shipping plugin if that is any incentive to reply.  ;D