SophieB Posted February 13, 2017 Share Posted February 13, 2017 Hello, I have an issue that I try to resolve for a few days and I need your help ... My prestashop version: 1.5.6.1 Php version: 5.6.3 Front Office of the shop is working without any problem. The problem is in backoffice: I have a js bug in the BO of Prestahop when I try to use cart to create an order. When I display carts and orders of a client from the "Create an order" page, I have the following error in js console: Uncaught TypeError: Cannot read property 'toFixed' of undefined at formatCurrency (tools.js:64) at Object.<anonymous> (index.php?controller=AdminOrders&addorder&token=6255b76…:977) at Function.each (jquery-1.7.2.min.js:2) at updateCartProducts (index.php?controller=AdminOrders&addorder&token=6255b76…:969) at displaySummary (index.php?controller=AdminOrders&addorder&token=6255b76…:1049) at Object.success (index.php?controller=AdminOrders&addorder&token=6255b76…:685) at o (jquery-1.7.2.min.js:2) at Object.fireWith [as resolveWith] (jquery-1.7.2.min.js:2) at w (jquery-1.7.2.min.js:4) at d (jquery-1.7.2.min.js:4) I had another error before (couldn't display carts and orders when I chose a client), but I managed to solve in (supressed a Cart.php override)... What I tried to do: - deactivated the most recently installed modules (the "add order" used to work before...) - daectivated all modules hooked in backofficeheader position - deactivated overrides... - no CCC - no cache I have the same problem with other navigators (FF and Edge). I was thinking it could be a module conflict or a jquery conflict, but I tried to deactivate modules, and found no solution... Maybe someone experienced a similar issue and can help me? Thank you very much Sophie Link to comment Share on other sites More sharing options...
SophieB Posted February 13, 2017 Author Share Posted February 13, 2017 Well, I found where the problem was: in AdminCartsController.php in the function getCartSummary(), those two lines where missing: $product['numeric_price'] = $product['price']; $product['numeric_total'] = $product['total']; I added them and now i can get the list of products in the cart... It's a very strange issue, I don't know why they disappeared, since before it had worked well... Hope it could help someone else ;-) 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