mpouliot34 Posted July 22, 2016 Share Posted July 22, 2016 Hello PrestaShop version: 1.6.0.6 Current theme in use: default-bootstrap I am wondering where I can change the default display value of products in the product list view. I know I can change the item count at the bottom but whenever I log out and back in it does not show by default. I woulld like to at lease see for example 200 items when I load the section. On the same section I am also wondering if it is possible to NOT display items that are not in stock by default. Thanks Link to comment Share on other sites More sharing options...
sandipchandela Posted August 20, 2016 Share Posted August 20, 2016 Its been long, but i m try to give a solution, The limit options in the drop down are declared and defined in classes/controller/AdminController.php: Have a look into this. /** @var array Number of results in list per page (used in select field) */ protected $_pagination = array(20, 50, 100, 300, 1000);` The default pagination limit (on first load) is defined directly below: (if you put 20,100, 300 but make sure that whatever the value you put that should be exist in $_pagination array ) /** @var int Default number of results in list per page */ protected $_default_pagination = 50; You can change this variable by overriding AdminController, read more about overriding here: http://doc.prestashop.com/display/PS16/Overriding+default+behaviors#Overridingdefaultbehaviors-Overridingaclass Please don't do changes in directly in core Files. take a backup of AdminController file. Clear cache your folder. Happy coding Link to comment Share on other sites More sharing options...
sro1234 Posted October 17, 2017 Share Posted October 17, 2017 Hi. I am on 1.7. I found this field in Admincontroller.php : protected $_pagination = array(20, 50, 100, 300, 1000) However, my backoffice shows only "20,50,100" and is set to 100 by default. So it is not matching at all. If I set it as protected $_pagination = array(20, 50, 100, 500, 4000) and sets let say 500 as default, still the same. No change despite caches cleared. Is that the correct field ??? 1 Link to comment Share on other sites More sharing options...
Spaco.pl Posted November 27, 2018 Share Posted November 27, 2018 The only way i found that work is by doing something like that: I dont get it how it works but it makes the point I use Firefox and thats the code inspector... that object can be found at the box with selection of the default numbers 20, 50, 100, 300 Link to comment Share on other sites More sharing options...
Spaco.pl Posted November 27, 2018 Share Posted November 27, 2018 On 10/17/2017 at 12:05 PM, sro1234 said: Hi. I am on 1.7. I found this field in Admincontroller.php : protected $_pagination = array(20, 50, 100, 300, 1000) However, my backoffice shows only "20,50,100" and is set to 100 by default. So it is not matching at all. If I set it as protected $_pagination = array(20, 50, 100, 500, 4000) and sets let say 500 as default, still the same. No change despite caches cleared. Is that the correct field ??? The only way i found that work is by doing something like that: I dont get it how it works but it makes the point I use Firefox and thats the code inspector... that object can be found at the box with selection of the default numbers 20, 50, 100, 300 Link to comment Share on other sites More sharing options...
Rizzzle Posted August 10, 2021 Share Posted August 10, 2021 Hello, Does anyone have a hardcoded solution to this? I'd like to have the option to view more than 300 products per page in the admin area? Thanks 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