1. The 2 triggers are different, so would not be an issue.
In the plugin the functions could be defined as:
function onBeforeProductListingLoad(&$filters, &$order, &$productView){...}
function onBeforeProductListingLoad(&$filters, &$order, &$categoryView){...}
2. In my installations (currently 5.3) PHP handles variable parameters lists with additional parameters being ignored by the interpreter. Only if one where to be removed would there be a problem.
I have tested this with the following code and it worked fine:
...
$dispatcher->trigger( 'onBeforeProductListingLoad', array( & $filters, & $order, & $this) );
...
class plgHikashopBf_Search extends JPlugin{
// function onBeforeProductListingLoad(&$filters, &$order, &$view) {
// $searchable = trim($view->params->get('searchable'));
// if (empty($searchable)) return;
function onBeforeProductListingLoad(&$filters) {
$searchable = 'product_name,product_description';
...
}
}
The
searchable parameter is an additional field I put into my template view override for the menu form.php file.