jvicente1971 Posted April 17 Share Posted April 17 Hello I'm in prestashop since versions 1.5 and I have been migrating since then and now I am in 8.1.7. So because of some mistakes made in past, my first product in store has an ID of 1100166 and have something like 3000 products. So because of this when I try to search for a product in Admin Products, it wont let me search because prestashop is limited to 1000000 top ID. Please see attached image. So please tell me how to increase this number? I know what I should have done was to delete all products and start from scratch and remove the auto increment id etc....but that's a lot of work and everything is working fine ... Any one can help me please? Link to comment Share on other sites More sharing options...
Nickz Posted April 17 Share Posted April 17 Searching you also could over the Database. this might help:https://www.sitolog.com/en/content/category/12-import-data-catalog-prestashop Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 17 Share Posted April 17 38 minutes ago, jvicente1971 said: t wont let me search because prestashop is limited to 1000000 top ID You mean PrestaShop is not allowed to enter any number more than 1000000 in the min and max field like 1100000 etc? I checked at my end in the PS8.1.3 & I can enter any number of any length like 10000000009 etc Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 17 Author Share Posted April 17 1 hour ago, Knowband Plugins said: You mean PrestaShop is not allowed to enter any number more than 1000000 in the min and max field like 1100000 etc? I checked at my end in the PS8.1.3 & I can enter any number of any length like 10000000009 etc Yes that's exactly what I mean. If I enter 1000001 or any numbe above it gives me red flashing notice and don't accept it. Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 18 Author Share Posted April 18 Any one? Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 19 Share Posted April 19 Post a screenshot with the error maybe we determine if it is backend or frontend. Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 19 Author Share Posted April 19 (edited) There's no error showing. Please see print screen. As soon as I enter any number above 1000000 in the MAX or MIN fields it goes automatically to 1000000 and flashes 3 times in red. So I can't search for any product id because they all start above 1000000 By the way, I have one different store and this is working fine in that store. So in the first one (with the error) I come from old PS and have been migrating. In the second one that is working fine, I have just migrated once from 1.7 to 8.1...so I guess there is something to do with the migration from 1.6... Edited April 19 by jvicente1971 (see edit history) Link to comment Share on other sites More sharing options...
ComGrafPL Posted April 19 Share Posted April 19 I have checked on 8.2 and it seems its the same "issue". Found the limit on products_table.html.twig, but override couldn't handle it. So it must have other source as well. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 19 Share Posted April 19 Strange!!! I had checked in the PS8.1 and now checked in the PS8.2 & I can enter anything in the Max field. I tried even a long number like 23232323232343424 Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 19 Share Posted April 19 (edited) Checked in Prestashop 8.1.7 and works without issues, alternatively in your case you can use an alternative manager module like QuickUpdate to manage your products easier. Edited April 19 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
ComGrafPL Posted April 19 Share Posted April 19 (edited) 1 hour ago, Knowband Plugins said: Strange!!! I had checked in the PS8.1 and now checked in the PS8.2 & I can enter anything in the Max field. I tried even a long number like 23232323232343424 On 8.2.1 for me is like: All above 1000000 gives error. prodlist.mp4 Edited April 19 by ComGrafPL (see edit history) Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 19 Share Posted April 19 (edited) The initial post is ps 8.1.7 and we tested on ps 8.1.7 and did not reproduce so it might have to do with the migrations, in other versions of PS, like 8.2.x we are talking about a different version then the one discussed by the op OR there is some common module/code of PS 8.1.x and 8.2.x that gets activated in specific conditions. Edited April 19 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
Nickz Posted April 19 Share Posted April 19 1 hour ago, QuickUpdate.net said: The initial post is ps 8.1.7 and we tested on ps 8.1.7 and did not reproduce so it might have to do with the migrations, in other versions of PS, like 8.2.x we are talking about a different version then the one discussed by the op OR there is some common module/code of PS 8.1.x and 8.2.x that gets activated in specific conditions. Or some modules who use the product numbers. What would happen if you just take away the 1st 1 of 1100166? Whatever the author plans hopefully backups are there. Database, files the lot. Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 19 Author Share Posted April 19 so, I´m not the only one having this issue... Can any one help on this? Also, can any one tell me exactly what is the file that controls that search box? Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 19 Share Posted April 19 (edited) the file where the filters are sanitized is: "src/PrestaShopBundle/Entity/AdminFilter.php", but could not find a limit that causes the error in 8.1.7, maybe in other versions there is. Edited April 19 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 19 Author Share Posted April 19 2 hours ago, ComGrafPL said: On 8.2.1 for me is like: All above 1000000 gives error. prodlist.mp4 3.77 MB · 0 downloads Yess, exactly this same problem... Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 21 Author Share Posted April 21 Still NOT SOLVED. My file range_inputs.html.twig have some code where I can see: // parse and fix init value var value = sliderInput.attr('sql'); if (value != '') { value = value.replace('BETWEEN ', ''); value = value.replace(' AND ', ','); value = value.replace('<=', '{{ min|default('0') }},'); value = value.replace('>=', '{{ max|default('1000000000') }},'); value = value.split(','); value[0] = Number(value[0]); value[1] = Number(value[1]); } else { But in my products_table.html.twig file I see: <td> {% include '@PrestaShop/Admin/Helpers/range_inputs.html.twig' with { 'input_name': "filter_column_id_product", 'min': '0', 'minLabel': "Min"|trans({}, 'Admin.Global'), 'maxLabel': "Max"|trans({}, 'Admin.Global'), 'value': filter_column_id_product, 'disabled': filters_disabled, } %} </td> So, I guess there's something wrong in this peace of code. Any one can please help? Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 21 Share Posted April 21 Hi, Can you provide the html of the error message (obtained with the developer tools inspector) Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 21 Author Share Posted April 21 What I see is: <input type="hidden" id="filter_column_id_product" name="filter_column_id_product" value="" sql=">=1000000"> Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 21 Share Posted April 21 Is that the error element html? Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 21 Author Share Posted April 21 1 hour ago, QuickUpdate.net said: Is that the error element html? as I mentioned before there is no "error". When I try to enter some number above 1000000 it flashes 3 times red and the number entered is removed and appears 1000000. Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 21 Share Posted April 21 (edited) ok, considering this it most probably comes form javascript, so looking into tpl / twig files is less probable as a cause, and php would be only if the verification is done with ajax the issue still stands though - we tested in 8.1.7 as your version and it does not reproduce. Edited April 21 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 21 Author Share Posted April 21 in dev tools I get this code as soon as I enter any number above 1000000: $(document).ready(function() { var sliderInput = $('#filter_column_id_product'); var minInput = $('#filter_column_id_product_min'); var maxInput = $('#filter_column_id_product_max'); // parse and fix init value var value = sliderInput.attr('sql'); if (value != '') { value = value.replace('BETWEEN ', ''); value = value.replace(' AND ', ','); value = value.replace('<=', '0,'); value = value.replace('>=', '1000000,'); value = value.split(','); value[0] = Number(value[0]); value[1] = Number(value[1]); } else { value = [0, 1000000]; } value = value.sort(function sortNumber(a,b) { return a - b; }); // Init inputs if (value[0] > 0) minInput.val(value[0]); if (value[1] < 1000000) maxInput.val(value[1]); // Change events var inputFlasher = function(input) { // animate input to highlight it (like a pulsate effect on jqueryUI) $(input).stop().delay(100) .fadeIn(100).fadeOut(100) .queue(function() { $(this).css("background-color", "#FF5555").dequeue(); }) .fadeIn(160).fadeOut(160).fadeIn(160).fadeOut(160).fadeIn(160) .animate({ backgroundColor: "#FFFFFF"}, 800); }; var updater = function(srcElement) { var isMinModified = (srcElement.attr('id') == minInput.attr('id')); // retrieve values, replace ',' by '.', cast them into numbers (float/int) var newValues = [(minInput.val()!='')?Number(minInput.val().replace(',', '.')):0, (maxInput.val()!='')?Number(maxInput.val().replace(',', '.')):1000000]; // if newValues are out of bounds, or not valid, fix the element. if (isMinModified && !(newValues[0] >= 0 && newValues[0] <= 1000000)) { newValues[0] = 0; minInput.val(''); inputFlasher(minInput); } if (!isMinModified && !(newValues[1] >= 0 && newValues[1] <= 1000000)) { newValues[1] = 1000000; maxInput.val(''); inputFlasher(maxInput); } // if newValues are not ordered, fix the opposite input. if (isMinModified && newValues[0] > newValues[1]) { newValues[1] = newValues[0]; maxInput.val(newValues[0]); inputFlasher(maxInput); } if (!isMinModified && newValues[0] > newValues[1]) { newValues[0] = newValues[1]; minInput.val(newValues[0]); inputFlasher(minInput); } if (newValues[0] == 0 && newValues[1] == 1000000) { sliderInput.attr('sql', ''); } else if (newValues[0] == 0) { sliderInput.attr('sql', '<='+newValues[1]); } else if (newValues[1] == 1000000) { sliderInput.attr('sql', '>='+newValues[0]); } else { sliderInput.attr('sql', 'BETWEEN ' + newValues[0] + ' AND ' + newValues[1]); } } minInput.on('change', function(event) { updater($(event.srcElement)); }); maxInput.on('change', function(event) { updater($(event.srcElement)); }); }); Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 21 Share Posted April 21 (edited) Hi, In that files it seems that the values are different then we have in a fresh 8.1.7 install, that is for example in line: var newValues = [(minInput.val()!='')?Number(minInput.val().replace(',', '.')):{{ min|default('0') }}, (maxInput.val()!='')?Number(maxInput.val().replace(',', '.')):{{ max|default('1000000000') }}]; end of line, value is "1000000000", in your code it is "1000000" - maybe replace all occurrences of "1000000" in that file with "10000000" and then clear the var/cache folder and check if it solves the issue, though could not identify that the respective code is actually executed on filtering. Edited April 21 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 21 Author Share Posted April 21 can you please tell me what is that file? I have changed in products_table.html.twig but no luck. 10 minutes ago, QuickUpdate.net said: Hi, In that files it seems that the values are different then we have in a fresh 8.1.7 install, that is for example in line: var newValues = [(minInput.val()!='')?Number(minInput.val().replace(',', '.')):{{ min|default('0') }}, (maxInput.val()!='')?Number(maxInput.val().replace(',', '.')):{{ max|default('1000000000') }}]; end of line, value is "1000000000", in your code it is "1000000" - maybe replace all occurrences of "1000000" in that file with "10000000" and then clear the var/cache folder and check if it solves the issue. Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 21 Share Posted April 21 this is the file: src/PrestaShopBundle/Resources/views/Admin/Helpers/range_inputs.html.twig Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 21 Author Share Posted April 21 26 minutes ago, QuickUpdate.net said: this is the file: src/PrestaShopBundle/Resources/views/Admin/Helpers/range_inputs.html.twig My file is the same as yours I Guess: (I had to remove the strings script from the code in order to prestashop forum accep it... {#** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <contact@prestashop.com> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) *#} {# Display a range input with min/max controls #} $(document).ready(function() { var sliderInput = $('#{{ input_name }}'); var minInput = $('#{{ input_name }}_min'); var maxInput = $('#{{ input_name }}_max'); // parse and fix init value var value = sliderInput.attr('sql'); if (value != '') { value = value.replace('BETWEEN ', ''); value = value.replace(' AND ', ','); value = value.replace('<=', '{{ min|default('0') }},'); value = value.replace('>=', '{{ max|default('1000000000') }},'); value = value.split(','); value[0] = Number(value[0]); value[1] = Number(value[1]); } else { value = [{{ min|default('0') }}, {{ max|default('1000000000') }}]; } value = value.sort(function sortNumber(a,b) { return a - b; }); // Init inputs if (value[0] > {{ min|default('0') }}) minInput.val(value[0]); if (value[1] < {{ max|default('1000000000') }}) maxInput.val(value[1]); // Change events var inputFlasher = function(input) { // animate input to highlight it (like a pulsate effect on jqueryUI) $(input).stop().delay(100) .fadeIn(100).fadeOut(100) .queue(function() { $(this).css("background-color", "#FF5555").dequeue(); }) .fadeIn(160).fadeOut(160).fadeIn(160).fadeOut(160).fadeIn(160) .animate({ backgroundColor: "#FFFFFF"}, 800); }; var updater = function(srcElement) { var isMinModified = (srcElement.attr('id') == minInput.attr('id')); // retrieve values, replace ',' by '.', cast them into numbers (float/int) var newValues = [(minInput.val()!='')?Number(minInput.val().replace(',', '.')):{{ min|default('0') }}, (maxInput.val()!='')?Number(maxInput.val().replace(',', '.')):{{ max|default('1000000000') }}]; // if newValues are out of bounds, or not valid, fix the element. if (isMinModified && !(newValues[0] >= {{ min|default('0') }} && newValues[0] <= {{ max|default('1000000000') }})) { newValues[0] = {{ min|default('0') }}; minInput.val(''); inputFlasher(minInput); } if (!isMinModified && !(newValues[1] >= {{ min|default('0') }} && newValues[1] <= {{ max|default('1000000000') }})) { newValues[1] = {{ max|default('1000000000') }}; maxInput.val(''); inputFlasher(maxInput); } // if newValues are not ordered, fix the opposite input. if (isMinModified && newValues[0] > newValues[1]) { newValues[1] = newValues[0]; maxInput.val(newValues[0]); inputFlasher(maxInput); } if (!isMinModified && newValues[0] > newValues[1]) { newValues[0] = newValues[1]; minInput.val(newValues[0]); inputFlasher(minInput); } if (newValues[0] == {{ min|default('0') }} && newValues[1] == {{ max|default('1000000000') }}) { sliderInput.attr('sql', ''); } else if (newValues[0] == {{ min|default('0') }}) { sliderInput.attr('sql', '<='+newValues[1]); } else if (newValues[1] == {{ max|default('1000000000') }}) { sliderInput.attr('sql', '>='+newValues[0]); } else { sliderInput.attr('sql', 'BETWEEN ' + newValues[0] + ' AND ' + newValues[1]); } {% if on_change_func_name is defined %} var afterUpdate = function() { {{ on_change_func_name|raw }} }; afterUpdate(); {% endif %} } minInput.on('change', function(event) { updater($(event.srcElement)); }); maxInput.on('change', function(event) { updater($(event.srcElement)); }); }); <div id="{{ input_name }}_div"> <input type="hidden" id="{{ input_name }}" name="{{ input_name }}" value="" sql="{{ value }}" /> <div> <input class="form-control form-min-max" type="text" id="{{ input_name }}_min" value="" placeholder="{{ minLabel|default('Min') }}" {% if disabled|default(false) %}disabled{% endif %} aria-label="{{ "%inputId% Minimum Input"|trans({'%inputId%': input_name}, 'Admin.Global') }}" /> </div> <div> <input class="form-control form-min-max" type="text" id="{{ input_name }}_max" value="" placeholder="{{ maxLabel|default('Max') }}" {% if disabled|default(false) %}disabled{% endif %} aria-label="{{ "%inputId% Maximum Input"|trans({'%inputId%': input_name}, 'Admin.Global') }}" /> </div> </div> Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 21 Share Posted April 21 in previous comment, you mentioned different code form dev tools, with lower value like '1000000', try emptying the var/cache folder maybe some code got compiled differently and is not running properly in your setup. Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 21 Author Share Posted April 21 1 hour ago, QuickUpdate.net said: in previous comment, you mentioned different code form dev tools, with lower value like '1000000', try emptying the var/cache folder maybe some code got compiled differently and is not running properly in your setup. I did that, I have deleted the var/cache folder...but the problem persists... So, when I mentioned dev tools, the code that appears is the one I have send...and when I go to the file range_inputs.html.twig the code is different...So somehow there's a script bypassing range_inputs.html.twig... And if you see in previous comments, I'm not the only one having this issue... Link to comment Share on other sites More sharing options...
xnofub Posted April 24 Share Posted April 24 On 4/21/2025 at 3:07 PM, jvicente1971 said: I did that, I have deleted the var/cache folder...but the problem persists... So, when I mentioned dev tools, the code that appears is the one I have send...and when I go to the file range_inputs.html.twig the code is different...So somehow there's a script bypassing range_inputs.html.twig... And if you see in previous comments, I'm not the only one having this issue... same error on on version : 8.1.3 were you able to resolve it? on PrestaShop 1.7.8.10 i modify the src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/products_table.html.twig then run command bin/console cache:clear && chmod -R 777 var/cache and it solved. Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 24 Author Share Posted April 24 4 hours ago, xnofub said: same error on on version : 8.1.3 were you able to resolve it? on PrestaShop 1.7.8.10 i modify the src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/products_table.html.twig then run command bin/console cache:clear && chmod -R 777 var/cache and it solved. Can you please "paste" here the code you have on your products_table.html.twig file? Link to comment Share on other sites More sharing options...
jvicente1971 Posted April 24 Author Share Posted April 24 ok just an update: As I mentioned before I have 2 stores with exactly the same ps version. So, following xnofub post, I went to compare both products_table.html.twig in both stores and the files are exactly equal. So this means that the problem is not in this file. Can any one help on this please? Link to comment Share on other sites More sharing options...
xnofub Posted April 24 Share Posted April 24 (edited) 3 hours ago, jvicente1971 said: ok just an update: As I mentioned before I have 2 stores with exactly the same ps version. So, following xnofub post, I went to compare both products_table.html.twig in both stores and the files are exactly equal. So this means that the problem is not in this file. Can any one help on this please? hello i solved the issue , the problem was a module overriding the view twig. /modules/XXXX/views/PrestaShop/Admin/Product/CatalogPage/Lists/products_table.html.twig then run command bin/console cache:clear && chmod -R 777 var/cache Edited April 24 by xnofub command (see edit history) Link to comment Share on other sites More sharing options...
Nickz Posted April 24 Share Posted April 24 3 hours ago, jvicente1971 said: As I mentioned before I have 2 stores with exactly the same ps version. I wonder: Are those shops on the same server? Have the same php extensions made available? Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 24 Share Posted April 24 (edited) @xnofub can you post where was the file overriding the original twig file? @jvicente1971 try and disable non-standard modules an check if that solves your issue. Edited April 24 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
xnofub Posted April 24 Share Posted April 24 19 minutes ago, QuickUpdate.net said: @xnofub can you post where was the file overriding the original twig file? @jvicente1971 try and disable non-standard modules an check if that solves your issue. At the company I work for, they developed a module that affected the product view (admin) . If there isn't a module that overrides the view, it can be edited in the product manager branch twig Module : modules/(modulename)/views/PrestaShop/Admin/Product/CatalogPage/Lists/products_table.html.twig if no override : src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/products_table.html.twig then clear cache on project folder: bin/console cache:clear && chmod -R 777 var/cache Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted April 24 Share Posted April 24 (edited) @jvicente1971 if @xnofub is correct you should search for the file "products_table.html.twig" or i would add "range_inputs.html.twig" in the modules folder in case any module does an override though, @xnofub i changed some values in the respective files in a fresh install of PS 8.1.7 and they did NOT produce the same error. Edited April 25 by QuickUpdate.net (see edit history) Link to comment Share on other sites More sharing options...
Anthiii Posted April 24 Share Posted April 24 Hey! I ran into the same issue on PrestaShop 1.7.8.10 with version 8.1.3. Modifying the products_table.html.twig file and then running: bash CopyEdit bin/console cache:clear && chmod -R 777 var/cache Did the trick for me too. Here’s the content of my products_table.html.twig file after the fix: twig CopyEdit {# src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/products_table.html.twig #} {% extends '@PrestaShop/Admin/Product/CatalogPage/Lists/blocks/product_list.html.twig' %} {% block product_table %} <table class="table table-striped" id="product_catalog_list"> <thead> <tr> <th>{{ 'ID'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Name'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Reference'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Price'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Quantity'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Status'|trans({}, 'Admin.Global') }}</th> <th>{{ 'Actions'|trans({}, 'Admin.Global') }}</th> </tr> </thead> <tbody> {% for product in products %} <tr> <td>{{ product.id }}</td> <td>{{ product.name }}</td> <td>{{ product.reference }}</td> <td>{{ product.price }}</td> <td>{{ product.quantity }}</td> <td>{{ product.status }}</td> <td> {# Add your custom action buttons here #} {{ product.actions }} </td> </tr> {% endfor %} </tbody> </table> {% endblock %} Let me know if this works for you or if your file looks different! 4o Link to comment Share on other sites More sharing options...
xnofub Posted April 24 Share Posted April 24 3 hours ago, QuickUpdate.net said: @jvicente1971 if @xnofub is correct you should search for the file "products_table.html.twig" or i would add "range_inputs.html.twig" in the modules folder in case any module does an override though, @xnofub i changed some values in the respective files in a fresh install of PS 8.1.7 and they did produce the same error. you run bin/console cache:clear && chmod -R 777 var/cache? 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