VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Pirosoft on April 19, 2013, 15:13:30 PM

Title: add a where clause in product model
Post by: Pirosoft on April 19, 2013, 15:13:30 PM
Hi, i want know if it possible add (without change the model) a where clause of query in product model in sortSearchListQuery function.
For example if i can trigger a event of my plugin, i can change the sql query. In model it's this code:

if ($this->searchplugin !== 0){
.....
$ret = $dispatcher->trigger('plgVmAddToSearch',array(&$where, &$PluginJoinTables, $this->searchplugin));
....

but i don't know why i my custom plugin with plgVmAddToSearch function is not called.

thanks for your help