title: Prestashop search from pages and categories with product search
body: <p>I am using prestashop. I have already search functionality.
  But that works with products such a way that I want to make search that searches 
  keywords from pages and categories also.</p>
  
  <p>I have the script from SearchController.php that is currently running. have any idea ?</p>
  
  <pre><code>&lt;?php
  
  if (($query = Tools::getValue('search_query', Tools::getValue('ref'))) &amp;&amp; !is_array($query))
  
            {
  
              $this-&gt;productSort();
              $this-&gt;n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
              $this-&gt;p = abs((int)(Tools::getValue('p', 1)));
              $search = Search::find($this-&gt;context-&gt;language-&gt;id, $query, $this-&gt;p, $this-&gt;n, $this-&gt;orderBy, $this-&gt;orderWay);
              Hook::exec('actionSearch', array('expr' =&gt; $query, 'total' =&gt; $search['total']));
              $nbProducts = $search['total'];
              $this-&gt;pagination($nbProducts);
              $this-&gt;context-&gt;smarty-&gt;assign(array(
                  'products' =&gt; $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module
                  'search_products' =&gt; $search['result'],
                  'nbProducts' =&gt; $search['total'],
                  'search_query' =&gt; $query,
                  'homeSize' =&gt; Image::getSize('home_default')));
          }
  ?&gt;
  </code></pre>