Vosteen Posted February 22, 2016 Share Posted February 22, 2016 Hello, I was told our shop has some kind of Java error. It says: Uncaught ReferenceError: hasDeliveryAddress is not defined But to be true I have no idea how to detect stuff like that. And even more (or less): how to solve this? So can anyone please help me? (: Link to comment Share on other sites More sharing options...
tuk66 Posted February 22, 2016 Share Posted February 22, 2016 Can we see it online? Link to comment Share on other sites More sharing options...
Vosteen Posted February 22, 2016 Author Share Posted February 22, 2016 Yes you can. At least I think so: 1a-trendshop.eu Link to comment Share on other sites More sharing options...
tuk66 Posted February 22, 2016 Share Posted February 22, 2016 Thanks, but there is no such error on the home page. Anyway, I like the theme. Link to comment Share on other sites More sharing options...
Vosteen Posted February 23, 2016 Author Share Posted February 23, 2016 Thanks for the compliment (: Hmm, it's supposed on this product-page: http://1a-trendshop.eu/index.php?id_product=255&controller=product&id_lang=2 They also gave me this screenshot: https://www.dropbox.com/s/e0pyitrpmeaog0h/Screen%20Shot%2002-22-16%20at%2004.06%20PM.PNG?dl=0 Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2016 Share Posted February 23, 2016 It looks like a bug. Change the /themes/default-bootstrap/js/modules/blockcart/ajax-cart.js file this way: updateCartEverywhere : function(jsonData){ $('.ajax_cart_total').text($.trim(jsonData.productTotal)); if (typeof hasDeliveryAddress == 'undefined') hasDeliveryAddress = false; if (parseFloat(jsonData.shippingCostFloat) > 0) Link to comment Share on other sites More sharing options...
Vosteen Posted February 23, 2016 Author Share Posted February 23, 2016 Do you really mean the default theme? Because the file already looks like your changes. I edited this file in the actuall active theme. There the line if (typeof hasDeliveryAddress == 'undefined') hasDeliveryAddress = false; was missing. Sooo...does it work? :S Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2016 Share Posted February 23, 2016 My example is from the default-theme and it was missing in your theme. So yes, I think you shoud add that snippet. Link to comment Share on other sites More sharing options...
Vosteen Posted February 23, 2016 Author Share Posted February 23, 2016 And so I did. Can you see if it works? My console doesn't show any error... Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2016 Share Posted February 23, 2016 ReferenceError: toBeDetermined is not defined Compare your file with the 1.6.1.4 version. It seems there are more errors in your version. 1 Link to comment Share on other sites More sharing options...
Vosteen Posted February 23, 2016 Author Share Posted February 23, 2016 Can I just copy and past everything from one file to the other? Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2016 Share Posted February 23, 2016 Try it. Nobody knows what can happen. Link to comment Share on other sites More sharing options...
Vosteen Posted February 23, 2016 Author Share Posted February 23, 2016 Okay, I tried. At least everything seems to run as before. Can you still detect any errors? Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2016 Share Posted February 23, 2016 Great! All errors are gone. Link to comment Share on other sites More sharing options...
Vosteen Posted February 23, 2016 Author Share Posted February 23, 2016 Nice - thank you for your support! But what's the reason for all this? I recently updatet to the latest Prestashop version. Could it be I have to redo this everytime there is a new release? Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2016 Share Posted February 23, 2016 Your theme wasn't updated and the ajax-cart.js file is a part of the theme. 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