sketter Posted February 12, 2016 Share Posted February 12, 2016 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 id100,101,102,103i 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 More sharing options...
NemoPS Posted February 13, 2016 Share Posted February 13, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now