Jump to content

Custom Search Modul | Show Results


Recommended Posts

Hi all,  have custom search module for project build on prestashop 1.6.1.2. 
I have only multiple product id. I need help with show this product id .TPL file in hook 

Example:
I have product id
100,101,102,103

i need send in TPL file complete information for show this product with classic

{foreach from=$products item=product name=products}

{/foreach}


This code show product by id, but only simple and not complete information for classic product file
 

public function hookDisplayFilter($params){

$product = new Product($id_product,false,$id_lang);
       
        $this->smarty->assign(array(
'product' => $product->name,
 
));
 
        return $this->display(__FILE__, 'views/templates/front/filter.tpl');
}


Thank you from help.

 

Link to comment
Share on other sites

Hello,

Could you clarify what you are trying to achieve? Run a custom hook inside product.tpl?
If you need the id, you need to pass it to the hook like {hook h='hookDisplayFilter' id_product = $product->id}
Then you can call it like $params['id_product']

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...