VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Stephen Roberts on December 02, 2011, 17:50:48 PM

Title: Bugs in vmextended plugin
Post by: Stephen Roberts on December 02, 2011, 17:50:48 PM
I've mentioned these before, but I'll summarize here. When developing an extended plugin (and trying to add a custom MVC to the back end) there are 4 things that need to be changed in the code (as of revision 4902):

1. vmextendedplugin.php line 20 change abstract protected $_path = ''; to protected $_path = '';, otherwise we get error "Fatal error: Properties cannot be declared abstract in /Users/stephenroberts/Sites/imd/administrator/components/com_virtuemart/plugins/vmextendedplugin.php on line 20".

2. vmextendedplugin.php line 26 change private $_name = ''; to public $_name = '';, otherwise we get error "Fatal error: Access level to vmExtendedPlugin::$_name must be public (as in class JPlugin) in /Users/stephenroberts/Sites/imd/administrator/components/com_virtuemart/plugins/vmextendedplugin.php on line 110".

3. vmcontroller.php lines 32-33 need to be:

public function __construct($cidName='cid',$config=array()) {
parent::__construct($config);


because we need to be able to specify model_path and view_path configuration.

4. vmmodel.php lines 40-41 need to be:

public function __construct($cidName='cid',$config=array()){
parent::__construct($config);


because we need to be able to specify the table_path configuration.

I hope to see these fixes in a revision soon. Thanks!
Title: Re: Bugs in vmextended plugin
Post by: Gruz on January 28, 2012, 16:39:59 PM
Vm 2.0.1.a

Item one again
Fatal error: Properties cannot be declared abstract in ... /administrator/components/com_virtuemart/plugins/vmextendedplugin.php on line 20
Title: Re: Bugs in vmextended plugin
Post by: Stephen Roberts on February 05, 2012, 02:33:13 AM
None of these issues have been fixed yet. Can a dev please take a look at them?
Title: Re: Bugs in vmextended plugin
Post by: Milbo on February 05, 2012, 16:32:12 PM
Thanks, we will take a look