Hi to everyone,
I'm trying to override a model,
administrator/components/com_virtuemart/models/user.php I create a Joomla plugin to this purpose, but it doesn't work the model override.
This is my plugin code:
<?php
defined('_JEXEC') or die('Restricted access');
if (!class_exists('VmConfig'))
require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php');
jimport('joomla.plugin.plugin');
class plgSystemVMOverrideEag extends JPlugin {
public function __construct(&$subject, $config = array()) {
parent::__construct($subject, $config);
}
public function onAfterRoute() {
$app = JFactory::getApplication();
if('com_virtuemart' == JRequest::getCMD('option') && !$app->isAdmin()) {
require_once(dirname(__FILE__) . DS . 'overrides' . DS . 'models' . DS . 'user.php');
}
}
}
In the same folder to the plugin, exist the next folder structure:
/overrides/models/user.phpThanks in advance
QuoteJoomla 2.5.4
VM 2.0.6
PHP 5.3.3