overbags Posted May 19, 2021 Share Posted May 19, 2021 (edited) Hello everybody prestashop 1.6.1.24 do you know how I can make the sorting by "reference" and the display of 300 articles default? even if the core needs to be changed Edited March 11, 2022 by overbags Solved (see edit history) Link to comment Share on other sites More sharing options...
Ress Posted March 3, 2022 Share Posted March 3, 2022 Hi, In AdminOrdersController, For sorting by reference set $this->_orderBy = 'reference'; and for nr. of articles $this->_default_pagination = 300; 1 1 Link to comment Share on other sites More sharing options...
overbags Posted March 4, 2022 Author Share Posted March 4, 2022 thank you very much for the answer. in the meantime he managed to modify the AdminController.php file in class -> controller to modify default_pagination now I have also corrected _orderBy and everything works. do you know the difference between AdminController.php and AdminOrdersController? Link to comment Share on other sites More sharing options...
Ress Posted March 4, 2022 Share Posted March 4, 2022 If you change in AdminController, the changes will take effect for all classes that extend this class (and of course, are not overwritten). If you change in AdminOrdersController, the changes will only take effect on the orders page. Link to comment Share on other sites More sharing options...
overbags Posted March 4, 2022 Author Share Posted March 4, 2022 the page in question, however, is that of the products, which is the specific file? Link to comment Share on other sites More sharing options...
Ress Posted March 4, 2022 Share Posted March 4, 2022 Sorry, I don't know why I thought it was the order page. For the product page, it is AdminProductsController Link to comment Share on other sites More sharing options...
overbags Posted March 4, 2022 Author Share Posted March 4, 2022 thank you very much 1 Link to comment Share on other sites More sharing options...
overbags Posted March 4, 2022 Author Share Posted March 4, 2022 in the AdminProductsController file I cannot find the lines to modify prestashop 1.6.1.24 Link to comment Share on other sites More sharing options...
Ress Posted March 4, 2022 Share Posted March 4, 2022 If you can't find them, you can define them yourself, and they will be taken into account. Link to comment Share on other sites More sharing options...
overbags Posted March 5, 2022 Author Share Posted March 5, 2022 do I define them within the first function? public function __construct() { $this->_orderBy = 'reference'; $this->_default_pagination = 300; $this->bootstrap = true; $this->table = 'product'; $this->className = 'Product'; ecc. ecc. Link to comment Share on other sites More sharing options...
Ress Posted March 5, 2022 Share Posted March 5, 2022 Yes exactly. Link to comment Share on other sites More sharing options...
overbags Posted March 7, 2022 Author Share Posted March 7, 2022 it works, thanks a lot ress 1 Link to comment Share on other sites More sharing options...
ZiedDams Posted March 7, 2022 Share Posted March 7, 2022 Hello , @Ress is this work for the 1.7.x versions ? Link to comment Share on other sites More sharing options...
overbags Posted March 7, 2022 Author Share Posted March 7, 2022 I do not know I have the target 1.6.1.24 and it works fine 1 Link to comment Share on other sites More sharing options...
Ress Posted March 7, 2022 Share Posted March 7, 2022 Hi, Works for classic controllers, not for those made with symfony. 1 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