News:

Looking for documentation? Take a look on our wiki

Main Menu

Bugs in vmextended plugin

Started by Stephen Roberts, December 02, 2011, 17:50:48 PM

Previous topic - Next topic

Stephen Roberts

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!
Sell downloadable (virtual) products in VirtueMart 2 and deliver downloads via local server, Amazon S3, and more! http://www.digitollsoftware.com

Gruz

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
Your installable language for VM2: http://gruz.org.ua/virtuemart-language-files.html

Stephen Roberts

None of these issues have been fixed yet. Can a dev please take a look at them?
Sell downloadable (virtual) products in VirtueMart 2 and deliver downloads via local server, Amazon S3, and more! http://www.digitollsoftware.com

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/