News:

Support the VirtueMart project and become a member

Main Menu

Custom Search Plugin

Started by niosme, February 27, 2024, 08:37:36 AM

Previous topic - Next topic

niosme

   function sortSearchListQuery ($onlyPublished = TRUE, $virtuemart_category_id = FALSE, $group = FALSE, $nbrReturnProducts = FALSE, $params = array() ) {
      if($this->debug === 1) vmTrace('sortSearchListQuery',FALSE,3);
      $keyword = isset($params['keyword'])? $params['keyword'] : $this->keyword;
      /*
       * Plugins must return an array with product ids
       */
      $result = array();
-->      JPluginHelper::importPlugin('vmcustom');
      $used = vDispatcher::trigger('plgVmMySortSearchListProductsQuery',
         array(
            &$result,
            $keyword,
            $onlyPublished,
            $virtuemart_category_id,
            $group,$nbrReturnProducts,
            $params,
         ));

In administrator model product.php you have forgotten to say JPluginHelper::importPlugin('vmcustom'); before dispatch event for custom search plugin to develop.
Fullstack Developer and Joomla Expert

niosme

Can this be included please?
Fullstack Developer and Joomla Expert