lucavolante Posted March 10, 2015 Share Posted March 10, 2015 To intervene on getProducts () method of the class category of prestashop which file to edit? Link to comment Share on other sites More sharing options...
rocky Posted March 11, 2015 Share Posted March 11, 2015 You'll need to be more specific to get a decent answer to your question. You can override the Category::getProducts() method by creating override/classes/Category.php with the following code: <?php class Category extends CategoryCore { public function getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null) { $products = parent::getProducts($id_lang, $p, $n, $order_by, $order_way, $get_total, $active, $random, $random_number_products, $check_access, $context); // Do stuff with products return $products; } } 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