Jump to content

Error changing quantities


Recommended Posts

Hi experts,

 

I have Prestashop 1.6.1.0 installed in a shared server. When I change the Quantity field in Categories/Products/Quantities, I get this strange behavior:

 

- While the buttons "Save and stay" and "Save" are disabled (this lasts just a few seconds while the page is loading), we can change the Quantity field and that triggers an ajax request that updates the quantity correctly. I also returns a green message confirming the operation was successful.

 

post-1007338-0-95021200-1438259281_thumb.jpg

 

- Once the "Save and stay" and "Save" are enabled, any change in the Quantity field fail returning a red error with this message: "parseerror: SyntaxError Unexpected token <".

 

post-1007338-0-23567200-1438259283_thumb.jpg

 

I have tracked the ajax request with Fiddlers and here they are:

 

(Successful ajax request)

POST /ps_admin/ajax-tab.php HTTP/1.1

With these parameters:

actionQty=set_qty&id_product_attribute=0&value=2&ajaxProductQuantity=1&id_product=11&token=a6eb7614acdc9d3f1ac650987a915a8c&ajax=1&controller=AdminProducts&action=productQuantity

 

(Wrong ajax request)

POST /ps_admin/ajax-tab.php HTTP/1.1

And it sends these parameters: 

actionQty=set_qty&id_product_attribute=0&value=3&ajaxProductQuantity=1&id_product=11&token=7036c2bbb7d0677d29ee5f1b81b04c27&ajax=1&controller=AdminProducts&action=productQuantity

 

The difference being in the token parameter. The offending request returns an HTML like this one:

ne6h4x.jpg

 

Any help would be highly appreciated.

 

Vicente Almagro

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...