VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: tlahtine on December 30, 2011, 17:01:59 PM

Title: Payment Plugin constructor never called
Post by: tlahtine on December 30, 2011, 17:01:59 PM
I'm developing a new payment plugin and have succesfully installed it. However, when setting the parameters, the payment plugin constructor is never called. As if the observer system is not working for my class.

Not being too familiar with Joomla and Virtuemart I don't know where to start debugging this.
How the registration system works, i.e. what could be wrong here?
Title: Re: Payment Plugin constructor never called
Post by: alatak on December 30, 2011, 18:31:04 PM
Hi,


Did you add those two functions:


function plgVmDeclarePluginParamsPayment($name, $id, &$data) {
return $this->declarePluginParams('payment', $name, $id, $data);
    }

    function plgVmSetOnTablePluginParamsPayment($name, $id, &$table) {
return $this->setOnTablePluginParams($name, $id, $table);
    }
Title: Re: Payment Plugin constructor never called
Post by: tlahtine on January 03, 2012, 08:30:00 AM
Quote from: alatak on December 30, 2011, 18:31:04 PM
Did you add those two functions:

Yes.

But we are not on the right track here, if the class is never even created, the problem is not missing methods.

How does the plugin system work, where the observer registration happens?
Title: Re: Payment Plugin constructor never called
Post by: tlahtine on January 03, 2012, 08:44:45 AM
OK, solved this one, I had a stupid error in sys.ini files.


However, I would still be interested in understanding a bit how this observer plugin system works.