Hi all!
I'am developing an extend VM plugin to filter products on page by special way.
<?php
defined('_JEXEC') or die( 'Direct Access to ' . basename( __FILE__ ) . ' is not allowed.' ) ;
if (!class_exists('vmExtendedPlugin')) require(JPATH_VM_PLUGINS . DS . 'vmextendedplugin.php');
class plgVmExtendedPcplugin extends vmExtendedPlugin {
public function onVmSiteController($controller){
var_dump($controller);
}
}
From Virtuemart wiki:
QuoteThis event is fired, when the called view was not found in the frontend maincontroller. It allows to add new views to virtuemart 2
But when I go to http://mysite/index.php?option=com_virtuemart&view=some_nonexistent_view, VM redirects me on http://mysite/index.php?option=com_virtuemart.
How is right way to use this feature?
Found some mistakes.
Inside XML:
<install version="1.5" type="plugin" group="vmextend" >
Right is:
<install version="1.5" type="plugin" group="vmextended" >
Inside PHP: onVmSiteController must declare a class with name VirtueMartControllerViewname what must extends JController, then virtuemart.php redirects on VM index page.