marekklusak Posted October 29, 2013 Share Posted October 29, 2013 Hi, I am using Prestashop 1.5.5.0 and I have encountered this fatal problem - when changing some product combination quantities, it mostly fails. It shows "Loading" and "Saving data ..." messages, but they are there forever and no changes are made. I found this related issue, but I am not using mentioned module, so there is another problem. Well ... when I change some quantity, my Chrome console screams "Uncaught HierarchyRequestError: A Node was inserted somewhere it doesn't belong." It is connected to ... <div class="error" id="available_quantity_ajax_error_msg" style="display: none;"></div> ... DIV and showAjaxError() function in admin-products.js file. DIV itself is removed from DOM, because ... $('#available_quantity_ajax_error_msg').html(msg); ... fails. "msg" is not string, but some JS function. "msg" content is: function (){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this} Well,... it is returned by AJAX call of "ajax-tab.php" file ... and jQuery is expecting regular JSON response. When the response is not valid JSON, it passes some JS function as seen above. So ... there is obviously problem with ajax-tab.php response. For example, this URL admin/ajax-tab.php?actionQty=set_qty&id_product_attribute=2&value=55&ajaxProductQuantity=1&id_product=8&token=b6b6f15a9547c274e9eeb14838837331&ajax=1&controller=AdminProducts&action=productQuantity ... does not return JSON response, but regular HTML page with "Invalid secure token" informations! I can click "I undestand the risk ..." and than the quantity change makes it to the database. I undestand it that AJAX quantity change call is done with already invalid security token. Sometimes. In one of ten cases it works for a while (with page reloading etc.). Well, I am done here. This is prestashop core business ... Link to comment Share on other sites More sharing options...
marekklusak Posted November 1, 2013 Author Share Posted November 1, 2013 No one care? Link to comment Share on other sites More sharing options...
vekia Posted November 1, 2013 Share Posted November 1, 2013 it will be much easier to say something more when you will share url to your store i suppose that this is why here is no replies Link to comment Share on other sites More sharing options...
marekklusak Posted November 1, 2013 Author Share Posted November 1, 2013 Hi! Well, I don't think it can help - it's "live" site and I can't give anyone back-office access. It is www.fcczech.cz, anyway. It was clean prestashop 1.5.5. instalation with PopShop theme and standard modules ... I only added some modules for "national" delivery and payment support. Everything else works. Is there any issue that can cause security token invalidation when doing AJAX stock quantity change? And the weird thing - it is a random behaviour, one times is everything "green", second times it fails. Link to comment Share on other sites More sharing options...
kfedorov Posted November 3, 2013 Share Posted November 3, 2013 QTY update looks broken in 1.5.6 Official demo: http://demo-store.prestashop.com/en/quick-order Try to add any product → go to cart → change QTY to 10 by click typing "10" manualy, then click again and type 8. As you will see you'll get 1+10+8=19, not 8 as you expect.. 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