Poldream Posted April 12, 2017 Share Posted April 12, 2017 (edited) Hi everyone, I have a problem with adding to cart. After clicking on the button "add to cart" products are not added to the cart. It looks like ajax on the site did not work. When the ajax shopping cart is off, it's ok but you can not remove the products from cart. Developer tools in chrome shows the following message when clicked in the add button: Uncaught ReferenceError: baseUri is not defined at Object.remove (v_8_c591123e018a26baee4fc92ce2a9c6c9.js:441) at HTMLAnchorElement.<anonymous> (v_8_c591123e018a26baee4fc92ce2a9c6c9.js:396) at HTMLDocument.dispatch (v_8_c591123e018a26baee4fc92ce2a9c6c9.js:3) at HTMLDocument.r.handle (v_8_c591123e018a26baee4fc92ce2a9c6c9.js:3) Prestashop 1.6.1.6 site: http://sklep.poldream.pl/ Can anybody help mi with this problem? Edited April 12, 2017 by Poldream (see edit history) Link to comment Share on other sites More sharing options...
Sharak Posted April 12, 2017 Share Posted April 12, 2017 Did you upgraded this shop to v. 1.6.1.6? I recently tried to upgrade from 1.6.1.10 to 1.6.1.12 and cart also stopped working properly, no products added. Add to cart button just opened empty cart. That's why I never upgrade my shops, cause it's a good way to mess everything up. If I need to upgrade I just install new shop and try to import old data (there's few modules for that) or add everything again one by one. Link to comment Share on other sites More sharing options...
Poldream Posted April 12, 2017 Author Share Posted April 12, 2017 (edited) Did you upgraded this shop to v. 1.6.1.6? I recently tried to upgrade from 1.6.1.10 to 1.6.1.12 and cart also stopped working properly, no products added. Add to cart button just opened empty cart. That's why I never upgrade my shops, cause it's a good way to mess everything up. If I need to upgrade I just install new shop and try to import old data (there's few modules for that) or add everything again one by one. Thanks for the response. I did not update prestashop. I tried adding google remarketing tag to footer and header (footer is not displaying now..). I deleted google tag from these files already. I tried to reinstall the module, replace the backup files, but it still does not work. Edited April 12, 2017 by Poldream (see edit history) Link to comment Share on other sites More sharing options...
jetway Posted April 12, 2017 Share Posted April 12, 2017 (edited) I have updated my store tons of times and never had a problem with the cart, however, i do agree sometimes its absolutely unclear what gets updated. So I've been in the situation where somethings were overwritten. Sometimes its something you do not expect and it takes awhile until you find out. In the latest updates this has not occured anymore. Did you upgraded this shop to v. 1.6.1.6? I recently tried to upgrade from 1.6.1.10 to 1.6.1.12 and cart also stopped working properly, no products added. Add to cart button just opened empty cart. That's why I never upgrade my shops, cause it's a good way to mess everything up. If I need to upgrade I just install new shop and try to import old data (there's few modules for that) or add everything again one by one. Edited April 12, 2017 by jetway (see edit history) Link to comment Share on other sites More sharing options...
Poldream Posted April 13, 2017 Author Share Posted April 13, 2017 In the meantime, the smarty cache has been disabled in smarty settings. Maybe it somehow guided someone to solve the problem? Link to comment Share on other sites More sharing options...
Poldream Posted April 13, 2017 Author Share Posted April 13, 2017 I turned off the cache and developer tools in Chrome shows the following error when clicked in the add button now: Uncaught ReferenceError: baseUri is not defined at Object.add (ajax-cart.js:324) at HTMLAnchorElement.<anonymous> (ajax-cart.js:139) at HTMLDocument.dispatch (jquery-1.11.0.min.js:3) at HTMLDocument.r.handle (jquery-1.11.0.min.js:3) Link to comment Share on other sites More sharing options...
Poldream Posted April 13, 2017 Author Share Posted April 13, 2017 Can somebody help? Maybe updating to the new version will fix the problem? Link to comment Share on other sites More sharing options...
vekia Posted April 13, 2017 Share Posted April 13, 2017 check your theme global.tpl file it must contain these lines: {addJsDef baseDir=$content_dir} {addJsDef baseUri=$base_uri} it looks like it doesnt contain them Link to comment Share on other sites More sharing options...
jeff8899 Posted April 14, 2017 Share Posted April 14, 2017 i also got the similar problem today so i am wondering if this issue due to external problem? Link to comment Share on other sites More sharing options...
Poldream Posted April 14, 2017 Author Share Posted April 14, 2017 check your theme global.tpl file it must contain these lines: {addJsDef baseDir=$content_dir} {addJsDef baseUri=$base_uri} it looks like it doesnt contain them I checked global.tpl It contains this lines. Link to comment Share on other sites More sharing options...
vekia Posted April 14, 2017 Share Posted April 14, 2017 okay, so it looks like the file is not included to the page body at all if you will put simple text to this file like "TEST" at the top of it do you see it in your page header after refresh? Link to comment Share on other sites More sharing options...
Poldream Posted April 18, 2017 Author Share Posted April 18, 2017 okay, so it looks like the file is not included to the page body at all if you will put simple text to this file like "TEST" at the top of it do you see it in your page header after refresh? I put the TEST text in the globalt.tpl file, but it does not show anywhere. Any ideas? Link to comment Share on other sites More sharing options...
Poldream Posted April 18, 2017 Author Share Posted April 18, 2017 I updated prestashop and it works fine. Problem solved. Thanks everyone for help Link to comment Share on other sites More sharing options...
PF22 Posted October 2, 2017 Share Posted October 2, 2017 Hi there. I also got "ReferenceError: baseUri is not defined" when I tried to set HTTPS... I am using Prestashop 1.6.0. Any idea ? thanks. Link to comment Share on other sites More sharing options...
PF22 Posted October 3, 2017 Share Posted October 3, 2017 Actually on Performances page if I enable Move JavaScript to the end, so I have no more JS errors... 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