[Prestashop] How to fix edit product and delete product in back office order

Test should work for any 1.6.x.x, but only tested on,, and

There is a problem with the token. orders.js is the new file and orders.js.bak is the original js file. You will see the token is pulled from the url/href.

[email protected] [/home/bozzolo/www]# diff js/admin/orders.js js/admin/orders.js.bak
< 				token: window.location.href.split('token=')[1].split("&")[0],
> 				token: token,
< 			query = 'ajax=1&token='+window.location.href.split('token=')[1].split("&")[0]+'&action=editProductOnOrder&id_order='+id_order+'&';
> 			query = 'ajax=1&token='+token+'&action=editProductOnOrder&id_order='+id_order+'&';
< 		var query = 'ajax=1&action=deleteProductLine&token='+window.location.href.split('token=')[1].split("&")[0]+'&id_order_detail='+id_order_detail+'&id_order='+id_order;
> 		var query = 'ajax=1&action=deleteProductLine&token='+token+'&id_order_detail='+id_order_detail+'&id_order='+id_order;


Fix for this: Can’t edit/add ordered products in an order page

Leave a Reply