Elgade Posted August 4, 2017 Share Posted August 4, 2017 I ve a problem with the cart update: everything works fine if i refresh page, but if i try to change quantity of products o delete a product, nothing happen (if i don't refresh the page). This is the error of my chrome console: ERROR WHEN I UPDATE QTY core.js:3 Uncaught TypeError: Cannot read property 'cart' of undefined at Object.<anonymous> (core.js:3) at Object.n.emit (theme.js:276) at Object.<anonymous> (theme.js:180) at Object.<anonymous> (core.js:2) at u (core.js:2) at Object.fireWith [as resolveWith] (core.js:2) at r (core.js:3) at XMLHttpRequest.<anonymous> (core.js:3) ERRORE WHEN I TRY TO DELETE A PRODUCT core.js:3 Uncaught TypeError: Cannot read property 'cart' of undefined at Object.<anonymous> (core.js:3) at Object.n.emit (theme.js:276) at Object.<anonymous> (theme.js:180) at Object.<anonymous> (core.js:2) at u (core.js:2) at Object.fireWith [as resolveWith] (core.js:2) at r (core.js:3) at XMLHttpRequest.<anonymous> (core.js:3) Link to comment Share on other sites More sharing options...
Andrej Stas Posted August 8, 2017 Share Posted August 8, 2017 Are you using the default theme? Or did you purchase it from some developer? If it's the second case I would recommend contacting the developer. Link to comment Share on other sites More sharing options...
sandroschlatter Posted October 9, 2017 Share Posted October 9, 2017 Same problem with me. Any solutions? Link to comment Share on other sites More sharing options...
Bill Dalton Posted October 11, 2017 Share Posted October 11, 2017 Are you using the default theme? Or did you purchase it from some developer? If it's the second case I would recommend contacting the developer. Link to comment Share on other sites More sharing options...
Ronald72 Posted October 13, 2017 Share Posted October 13, 2017 Same problème for me V1.7.2.2 even with the default theme, need to "F5" to reactualise but I allready have this problème sinds the V1.7.1 Ronald. Link to comment Share on other sites More sharing options...
kornwaikas Posted October 13, 2017 Share Posted October 13, 2017 I solved this problem changing this files: 1) Copy this folder: themes/classic/assets/js 2) Paste in your theme/assets/ Delete cache 1 3 Link to comment Share on other sites More sharing options...
Ronald72 Posted October 14, 2017 Share Posted October 14, 2017 Sorry but I have the same problème on the Classic Theme so this will not help an i see that i don't have any confirmation that it was put in the basket, the window don't open ... (produit ajouté au panier avec succès ne s'affiche plus) Link to comment Share on other sites More sharing options...
Bill Dalton Posted October 14, 2017 Share Posted October 14, 2017 I can only say it is working find for me on classic theme. I had also tried a third party theme and I could not delete items from the cart. I already have taken down the third party theme so I can't try the solution suggested by kornwaikas Link to comment Share on other sites More sharing options...
Featured Comment Popular Post nawres Posted November 17, 2021 Featured Comment Popular Post Share Posted November 17, 2021 Same problem after upgrade my site , so I'm trying to change the function UpdateCart in the file (/themes/core.js) : before : o.default.cart = e.resp.cart; after o.default.cart = e.reason.cart; it works in my case 8 14 Link to comment Share on other sites More sharing options...
Aircod Posted December 20, 2021 Share Posted December 20, 2021 On 11/17/2021 at 10:00 AM, nawres said: Same problem after upgrade my site , so I'm trying to change the function UpdateCart in the file (/themes/core.js) : before : o.default.cart = e.resp.cart; after o.default.cart = e.reason.cart; it works in my case Thanks, that solved the problem with the delete product in the cart page. jQuery.Deferred exception: Cannot read properties of undefined (reading 'cart') TypeError: Cannot read properties of undefined (reading 'cart') Link to comment Share on other sites More sharing options...
polaije Posted January 25, 2022 Share Posted January 25, 2022 Hello, I have this behaviour on my site https://pharmanovea.com and I have change core.js like you mention but when I debug the file in devlopement tools is not changed. Cache is disabled and smartcache for js also. The strange thing is when I try with a clone https://presta17.pharmanovea.com the problem of ajax refresh disapears when I disable the javascript smartcache but this is not working in my production version. Thanks helping me with this. Jean-Marie Link to comment Share on other sites More sharing options...
RensR Posted February 19, 2022 Share Posted February 19, 2022 try executing this line in javascript after deleting a product or updating it: prestashop.emit('updateCart', {resp: 'test'}) in case it says "e.anyWord is undefined". You have to change "resp" to "anyWord" for example: prestashop.emit('updateCart', {anyWord: 'test'}) 1 Link to comment Share on other sites More sharing options...
CarloCasciaro Posted March 14, 2022 Share Posted March 14, 2022 I have the same problem prestashop version 1.7.8.3 Theme Classic 1.0.0 Link to comment Share on other sites More sharing options...
jmac00 Posted April 20, 2022 Share Posted April 20, 2022 On 8/4/2017 at 11:08 AM, Elgade said: core.js:3 Uncaught TypeError: Cannot read property 'cart' of undefined at Object.<anonymous> (core.js:3) at Object.n.emit (theme.js:276) at Object.<anonymous> (theme.js:180) at Object.<anonymous> (core.js:2) at u (core.js:2) at Object.fireWith [as resolveWith] (core.js:2) at r (core.js:3) at XMLHttpRequest.<anonymous> (core.js:3) I was seeing this error when adding a product to the cart from any button, or deleting the product in cart page or side cart. The cart was updated, but page was loaded most of the times for ever, so yu had to manually reload the page to see the updated cart. On 11/17/2021 at 10:00 AM, nawres said: Same problem after upgrade my site , so I'm trying to change the function UpdateCart in the file (/themes/core.js) : before : o.default.cart = e.resp.cart; after o.default.cart = e.reason.cart; it works in my case This solved my problem. Problem appeared after upgrading to 1.7.8.5 from 1.7.6.5. Custom theme. How did you find this solution if easy to explain? Thank you!! Link to comment Share on other sites More sharing options...
fredericomarinho.com Posted June 25, 2022 Share Posted June 25, 2022 (edited) To solve this, I had to copy the theme/classic/assets/js folder to my current theme and also, replace the theme/cores.js with the original file from the same version as my store. I had to download the Prestashop in the same version as replace the file. Thanks @kornwaikas Edited June 25, 2022 by fredericomarinho.com wrong word (see edit history) 1 Link to comment Share on other sites More sharing options...
kirianjahiem Posted July 18, 2022 Share Posted July 18, 2022 (edited) Sorry but I have the same problème on the Classic Theme so this will not help Showbox jiofi.local.html tplinklogin Edited July 18, 2022 by kirianjahiem (see edit history) Link to comment Share on other sites More sharing options...
HaCos Posted September 22, 2022 Share Posted September 22, 2022 On 11/17/2021 at 11:00 AM, nawres said: Same problem after upgrade my site , so I'm trying to change the function UpdateCart in the file (/themes/core.js) : before : o.default.cart = e.resp.cart; after o.default.cart = e.reason.cart; it works in my case Worked in ps 1787 Link to comment Share on other sites More sharing options...
Pig3onMort Posted August 2, 2023 Share Posted August 2, 2023 On 11/17/2021 at 10:00 AM, nawres said: Same problem after upgrade my site , so I'm trying to change the function UpdateCart in the file (/themes/core.js) : before : o.default.cart = e.resp.cart; after o.default.cart = e.reason.cart; it works in my case Worked on 1.7.8 also... and it was so easy to fix thanks to this perfectly explained solution!!! Link to comment Share on other sites More sharing options...
escri2 Posted January 18 Share Posted January 18 On 11/17/2021 at 10:00 AM, nawres said: Same problem after upgrade my site , so I'm trying to change the function UpdateCart in the file (/themes/core.js) : before : o.default.cart = e.resp.cart; after o.default.cart = e.reason.cart; it works in my case Yes!, this solved the problem :):) Link to comment Share on other sites More sharing options...
najib elazoui Posted May 31 Share Posted May 31 On 6/25/2022 at 3:17 PM, fredericomarinho.com said: To solve this, I had to copy the theme/classic/assets/js folder to my current theme and also, replace the theme/cores.js with the original file from the same version as my store. I had to download the Prestashop in the same version as replace the file. Thanks @kornwaikas bro thanks a lot for people how upgrade the prestashop core on 178.x to 178.y do this methode Link to comment Share on other sites More sharing options...
Recommended Posts
Posted by nawres,
This solution works
Recommended by Mehrshad Zakerian
22 reactions
Go to this post
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