VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: WebStuff on March 13, 2013, 15:53:17 PM

Title: Is it possible to override vmRender() in a shipment plugin?
Post by: WebStuff on March 13, 2013, 15:53:17 PM
Looking to override vmRender() from parameterparser.php in a shipment plugin I'm working on. Wondered if this were possible or not. Or would it have to be done with another plugin for the rendering side of things?

Any help greatly appreciated.

Thanks in advance.
Title: Re: Is it possible to override vmRender() in a shipment plugin?
Post by: Milbo on March 13, 2013, 21:02:33 PM
http://docs.virtuemart.net/tutorials/33-templating-layouts/101-how-to-overwrite-plugins
Title: Re: Is it possible to override vmRender() in a shipment plugin?
Post by: WebStuff on March 18, 2013, 19:05:46 PM
Thanks Milbo,
My plugin is working fine. I have it in the correct vmshipment folder. Perhaps if I explained better what I am trying to do.
The administrator/components/com_virtuemart/helpers/parameterparser.php file contains a vmRender function which does the layout of the plugin parameters in the Backend into a table.
I would like to "override" this function from within my plugin so that more plugin parameters could be added from the backend without editing the xml file.

The plugin in question is for UK postcode zones related shipment costs.
I would like to release it to the public once it is working (non-commercial), so I would like them to be able to add and delete zones in a layout similar to the picture.
I have the buttons "Add Postcode Zone" and "Delete This Postcode Zone" working as a simple js popup at the moment but it won't render the params unless they are in the xml file.

Any ideas greatly appreciated.


[attachment cleanup by admin]
Title: Re: Is it possible to override vmRender() in a shipment plugin?
Post by: Milbo on March 20, 2013, 00:49:17 AM
Quote from: mirrorsandglass on March 18, 2013, 19:05:46 PM
The administrator/components/com_virtuemart/helpers/parameterparser.php
This is a vm1.1 file. Check the textinput plugin of vm2