freelance84 Posted April 22, 2013 Share Posted April 22, 2013 Hello, where can i change query where products-list.tpl iterate on it? Thanks Link to comment Share on other sites More sharing options...
Paul C Posted April 22, 2013 Share Posted April 22, 2013 It really depends on what you want to do..... Which version of Prestashop are you using? In 1.5 There's a hook in the CategoryController called in assignProductList(): actionProductListOverride($params) The keys to the $params array are: nbProducts(integer), catProducts(product array) and hookExecuted(bool) Or you could look at the Product class and override the getProductProperties() method. Link to comment Share on other sites More sharing options...
freelance84 Posted April 23, 2013 Author Share Posted April 23, 2013 It really depends on what you want to do..... Which version of Prestashop are you using? In 1.5 There's a hook in the CategoryController called in assignProductList(): actionProductListOverride($params) The keys to the $params array are: nbProducts(integer), catProducts(product array) and hookExecuted(bool) Or you could look at the Product class and override the getProductProperties() method. Hello Paul, I want only add a condition in query for extract distinct value for column "name". I'm using version 1.5 and i will try your suggests. Link to comment Share on other sites More sharing options...
Tung at RockPOS.com Posted April 23, 2013 Share Posted April 23, 2013 Hello, There are 2 options: 1. Override class Category::getProducts() 2. Create a new module, and add hook "actionProductListOverride". In this hook method, just copy function Category::getProducts() and apply your change. It depends on you to select one of them. Cheers, 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