laurent0071 Posted September 11, 2019 Share Posted September 11, 2019 Hello, The new pagination numbers on the back office of Prestashop 1.7.6.1 is very low. We cannot display more than 100 products / categories on the back office Before it was possible to display up to 1000 products / categories in the back office Someone knows where can I change these numbers, I need to increase them. I have already tried: /classes/controller/AdminController.php /** @var array Number of results in list per page (used in select field) */ protected $_pagination = array(20, 50, 100, 300, 1000); /** @var int Default number of results in list per page */ protected $_default_pagination = 50; It"s not helping, also you can see that the pagination of this line is not what is displayed in the back office. Thanks Link to comment Share on other sites More sharing options...
hotwirenetworks Posted January 23, 2020 Share Posted January 23, 2020 I am needing a solution to this as well! Link to comment Share on other sites More sharing options...
zod Posted July 29, 2020 Share Posted July 29, 2020 In PS 1.7 that select field is in a TWIG template here: /src/PrestaShopBundle/Resources/views/Admin/Common/pagination.html.twig You find the code of the select, then you add custom options after the "for" cycle, like this (I added 500 and 1000): <select name="paginator_select_page_limit" id="paginator_select_page_limit" psurl="{{ changeLimitUrl }}" class="pagination-link custom-select"> {% if limit not in limit_choices %} <option value="{{ limit }}" selected="selected">{{ limit }}</option> {% endif %} {% for limit_choice in limit_choices %} <option value="{{ limit_choice }}" {% if limit==limit_choice %}selected="selected"{% endif %}>{{ limit_choice }}</option> {% endfor %} <option value="500">500</option> <option value="1000">1000</option> </select> But this is a dirty hack of the Core file in Prestashop, eventually overridden by a future Prestashop update. The proper way to override TWIG templates is explained in this page: https://devdocs.prestashop.com/1.7/modules/concepts/templating/admin-views/ So, we need to make a module to override the admin views. You are lucky, I made a little module for this, and you can download it here. This is useful to override other admin templates too, you just have to copy the files with the right folder structure inside the "views" folder. overrideviews.zip 5 1 Link to comment Share on other sites More sharing options...
siomosp Posted December 18, 2020 Share Posted December 18, 2020 Hello, in PS 1.7.5.2 it does not help. Any ideas who i can change the pagination numbers at 1.7.5.2? I want to add 150, 200 at list Link to comment Share on other sites More sharing options...
ShopMann Posted January 14, 2021 Share Posted January 14, 2021 (edited) Am 29.7.2020 um 8:41 PM schrieb zod: But this is a dirty hack of the Core file in Prestashop, eventually overridden by a future Prestashop update. The proper way to override TWIG templates is explained in this page: https://devdocs.prestashop.com/1.7/modules/concepts/templating/admin-views/ So, we need to make a module to override the admin views. You are lucky, I made a little module for this, and you can download it here. This is useful to override other admin templates too, you just have to copy the files with the right folder structure inside the "views" folder. overrideviews.zip 10.16 kB · 33 downloads Hi, is it compatible with Prestashop 1.7.7.1 and Prestashop 1.7.2.4? Edited January 14, 2021 by Viaceslav (see edit history) 1 Link to comment Share on other sites More sharing options...
SalDan Posted January 23, 2021 Share Posted January 23, 2021 Ciao Viaceslav lo provato su Prestashop 1.7.7.1 ed è compatibile. saluti 1 Link to comment Share on other sites More sharing options...
jef933 Posted March 16, 2021 Share Posted March 16, 2021 (edited) Hi everyone ! I think there is no need to change core files or override templates. prestashop 1.7 provides for paginations by 300 and 1000 but they are constrained by your php configuration. Take a look: /src/Adapter/Product/AdminProductDataProvider.php I think you have to check your php configuration and the memoru limit allocate to php. hope this helps someone. Edited March 16, 2021 by jef933 (see edit history) 1 Link to comment Share on other sites More sharing options...
ShopMann Posted March 17, 2021 Share Posted March 17, 2021 vor 11 Stunden schrieb jef933: Hi everyone ! I think there is no need to change core files or override templates. prestashop 1.7 provides for paginations by 300 and 1000 but they are constrained by your php configuration. Take a look: /src/Adapter/Product/AdminProductDataProvider.php I think you have to check your php configuration and the memoru limit allocate to php. hope this helps someone. Hi! The first number in $memory is the php memory limit but what do the second and third numbers mean? I mean * 1024 * 1024. Link to comment Share on other sites More sharing options...
jef933 Posted March 17, 2021 Share Posted March 17, 2021 (edited) 19 minutes ago, Viaceslav said: Hi! The first number in $memory is the php memory limit but what do the second and third numbers mean? I mean * 1024 * 1024. Hi Viaceslav, It's to convert Mb in octets. Look at : /classes/Tools.php Edited March 17, 2021 by jef933 (see edit history) Link to comment Share on other sites More sharing options...
wzzly Posted April 12, 2021 Share Posted April 12, 2021 Did you guys solve this by upping the php memory limit? I have 2048Mb allocated, but it still gives my max 100 items per page on the BO orders page. Link to comment Share on other sites More sharing options...
jef933 Posted April 12, 2021 Share Posted April 12, 2021 (edited) Hi wzzly, It only works on AdminProductPage. For others, if nobony has other way to do this, you'll have to override template. Edited April 12, 2021 by jef933 (see edit history) Link to comment Share on other sites More sharing options...
wzzly Posted April 12, 2021 Share Posted April 12, 2021 @jef933 I edited the TWIG files and it works... but hope there is a less dirty fix Link to comment Share on other sites More sharing options...
jef933 Posted April 12, 2021 Share Posted April 12, 2021 Rather than editing the twig core file, you can override it with module. It's already cleaner Link to comment Share on other sites More sharing options...
gaiasl Posted March 12, 2022 Share Posted March 12, 2022 Hello, I have try to change /classes/controller/AdminController.php with the code up but I have a 500 error in front office and in product page. I have prestashop 1.7.7.3 and multistore. I have activating the debug mode and I have this error: Notice: Undefined property: Shop::$id_theme please, someone can help me? thanks Link to comment Share on other sites More sharing options...
Pit Bike Posted February 22, 2023 Share Posted February 22, 2023 Hello. Has someone find the solution to this? We have more than 100 categories and we need to order them by position, but it's imposible because of the pagination limit (100). Link to comment Share on other sites More sharing options...
vipier Posted May 4, 2023 Share Posted May 4, 2023 On 7/29/2020 at 1:41 PM, zod said: In PS 1.7 that select field is in a TWIG template here: /src/PrestaShopBundle/Resources/views/Admin/Common/pagination.html.twig You find the code of the select, then you add custom options after the "for" cycle, like this (I added 500 and 1000): <select name="paginator_select_page_limit" id="paginator_select_page_limit" psurl="{{ changeLimitUrl }}" class="pagination-link custom-select"> {% if limit not in limit_choices %} <option value="{{ limit }}" selected="selected">{{ limit }}</option> {% endif %} {% for limit_choice in limit_choices %} <option value="{{ limit_choice }}" {% if limit==limit_choice %}selected="selected"{% endif %}>{{ limit_choice }}</option> {% endfor %} <option value="500">500</option> <option value="1000">1000</option> </select> But this is a dirty hack of the Core file in Prestashop, eventually overridden by a future Prestashop update. The proper way to override TWIG templates is explained in this page: https://devdocs.prestashop.com/1.7/modules/concepts/templating/admin-views/ So, we need to make a module to override the admin views. You are lucky, I made a little module for this, and you can download it here. This is useful to override other admin templates too, you just have to copy the files with the right folder structure inside the "views" folder. overrideviews.zip 10.16 kB · 181 downloads Hello, I tried to up the php memory limit as jef933 said but it didn't work, so I just did the twig override and it did work. I am using prestashop 1.7.8.8 Thanks Zod! Link to comment Share on other sites More sharing options...
redfordnl Posted January 22 Share Posted January 22 On 7/29/2020 at 8:41 PM, zod said: In PS 1.7 that select field is in a TWIG template here: /src/PrestaShopBundle/Resources/views/Admin/Common/pagination.html.twig You find the code of the select, then you add custom options after the "for" cycle, like this (I added 500 and 1000): <select name="paginator_select_page_limit" id="paginator_select_page_limit" psurl="{{ changeLimitUrl }}" class="pagination-link custom-select"> {% if limit not in limit_choices %} <option value="{{ limit }}" selected="selected">{{ limit }}</option> {% endif %} {% for limit_choice in limit_choices %} <option value="{{ limit_choice }}" {% if limit==limit_choice %}selected="selected"{% endif %}>{{ limit_choice }}</option> {% endfor %} <option value="500">500</option> <option value="1000">1000</option> </select> But this is a dirty hack of the Core file in Prestashop, eventually overridden by a future Prestashop update. The proper way to override TWIG templates is explained in this page: https://devdocs.prestashop.com/1.7/modules/concepts/templating/admin-views/ So, we need to make a module to override the admin views. You are lucky, I made a little module for this, and you can download it here. This is useful to override other admin templates too, you just have to copy the files with the right folder structure inside the "views" folder. overrideviews.zip 10.16 kB · 222 downloads Can confirm this is working for Prestashop 8.X (8.2 in my case) as well. Weird that max is only 100 in new Prestashop, in the past it was up to 300. but changes works directly after clearing cache. Thanks for the solution, appreciated! 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