weekscigar Posted August 10, 2013 Share Posted August 10, 2013 I'm moving the servers for my Prestashop installation. I have the database and all files moved over, and the site is rendering fine using a test domain (I updated the domain in the back office for testing). However, when I try to put an item in the cart (ajax cart is turned on), I'm getting the following error: "Impossible to add the product to the cart." textStatus: 'parsererror' errorThrown: 'SyntaxError: Unexpected token c' responseText: can't open file Please see the attachment for screenshot of above error. Anyone have any idea how to fix? I moved server previously and didn't have this issue. Help? Link to comment Share on other sites More sharing options...
NemoPS Posted August 10, 2013 Share Posted August 10, 2013 Can you show us the live site? 1 Link to comment Share on other sites More sharing options...
weekscigar Posted August 11, 2013 Author Share Posted August 11, 2013 http://outkickgear.onyxlight.net this is the site on the destination server. The live site doesn't have this issue. Link to comment Share on other sites More sharing options...
weekscigar Posted August 11, 2013 Author Share Posted August 11, 2013 Does anyone have any idea about this error? Link to comment Share on other sites More sharing options...
El Patron Posted August 11, 2013 Share Posted August 11, 2013 check this link, seems very similar http://www.prestashop.com/forums/topic/210654-solved-friendly-urls-ajax-cart-impossible-to-add-product/ Link to comment Share on other sites More sharing options...
weekscigar Posted August 12, 2013 Author Share Posted August 12, 2013 It's similar but doesn't seem to related. I don't have an index.html file in my root & even when I turn off Friendly URLs, I'm still getting the error. Link to comment Share on other sites More sharing options...
weekscigar Posted August 12, 2013 Author Share Posted August 12, 2013 If I turn off the Ajax cart, then I get a white page that simply says "Can't Open file". It also stores a cookie with the following info: Name: ffdbd13d96d903c026c4876e97eb63a4 Content: 805XxBae0Ow%3Dj3db89CB6qM%3DO7b%2FLFDkV%2F0%3D0g7D3NPdEWM%3DRJ1Jyodhbmw%3DzLl1uNoaXxQ%3D%2B3gggRWrRAM%3DjYBJVRD1oTI%3D5XQyWsV7pvg%3DvfNY5%2FejTtc%3DFAHq4eBHMDA%3DzdvycetCR7A%3DIv88DaJcLi4%3DVdtsBgUOSXE%3DiRrWfduYiHE%3D4ux0q1Eyg5A%3DrEQFhGzIU3w%3DzfunKo6Ovw0%3DdgSYUQOQ0yI%3Dxage90xb8Bo%3D000153 Domain: .outkickgear.onyxlight.net Path: / Send for: Any kind of connection Accessible to script: No (HttpOnly) Once this cookie is removed, the site renders as normal again. Link to comment Share on other sites More sharing options...
El Patron Posted August 12, 2013 Share Posted August 12, 2013 can you post your seo&urls, Set Shop URL what is in shop and shop ssl fields? Link to comment Share on other sites More sharing options...
weekscigar Posted August 12, 2013 Author Share Posted August 12, 2013 both set to: outkickgear.onyxlight.net Link to comment Share on other sites More sharing options...
El Patron Posted August 12, 2013 Share Posted August 12, 2013 at this point I like to recommend using the default theme to see if error persists. But I always worry a little bit switching themes as this can be a mess...if you can back up your site root files and db...it would be save to do as you would have a back up...I searched for your error...to no obvious solution Link to comment Share on other sites More sharing options...
weekscigar Posted August 12, 2013 Author Share Posted August 12, 2013 I swapped to the default theme and the error persists. I'm thinking its got to be some kind of permission issue since the error indicates that it "Can't open file". Any other thoughts or specific folders or directories that I should check? Link to comment Share on other sites More sharing options...
NemoPS Posted August 12, 2013 Share Posted August 12, 2013 hmm. check that you have a file called cart-json.tpl in your modules' blockcart folder, or your theme's one. Link to comment Share on other sites More sharing options...
weekscigar Posted August 12, 2013 Author Share Posted August 12, 2013 Yes... that file does exist. Link to comment Share on other sites More sharing options...
El Patron Posted August 12, 2013 Share Posted August 12, 2013 ok...lets try this... using ftp, look at the file dates in your modules folder sort by latest updated disable one module at a time (testing after each disable). (specifically disable paypal if you have it) Link to comment Share on other sites More sharing options...
weekscigar Posted August 12, 2013 Author Share Posted August 12, 2013 All of the dates / times are essentially the same, because they were all moved together (via FTP) to this new server. Link to comment Share on other sites More sharing options...
El Patron Posted August 12, 2013 Share Posted August 12, 2013 you may want to try this: before moving to new server, 'always' install native prestsashop to see if the new server is compatible... Link to comment Share on other sites More sharing options...
El Patron Posted August 12, 2013 Share Posted August 12, 2013 another thing, using a good scan program, search your files for the 'can't open file' string... for example see this post http://www.prestashop.com/forums/topic/161426-getting-cant-open-file-message-site-not-opening/ Link to comment Share on other sites More sharing options...
shiggidydog Posted August 18, 2013 Share Posted August 18, 2013 I had the same problem, on a fresh installation. I have no idea what caused this issue, but to solve it, i unzipped the prestashop zip file into a new directory then copied: settings.inc.php img folder the current theme folder and all the modules that came with the theme (in my case was 3 different folders) I had to obviously rename my admin folder and delete the install folder. Lastly, I logged into the backoffice and went to preferences/SEO & URL to change my base_uri to my new directory. In my case I went from www.example.com/shop/ to www.example.com/shop2/ It worked for me, hopefully it helps you out too. I could delete my original shop directory and rename the shop2 to shop but I'm lazy. Link to comment Share on other sites More sharing options...
nanogioia Posted April 25, 2015 Share Posted April 25, 2015 Hi I am facing this same error (impossible to add product to cart through ajax, not the one that cant open a file). The error started when I changed my shop to a different server. Nothing of what is said before solved my problem. Any suggestions? Thanks a lot! Link to comment Share on other sites More sharing options...
NemoPS Posted April 27, 2015 Share Posted April 27, 2015 Can you enable dev mode and share your site's url? Link to comment Share on other sites More sharing options...
helge the goat Posted January 19, 2017 Share Posted January 19, 2017 having the same error as above post after bying SSL certificate.. my host said it has nothing to do with them installing the SSL code, but i can not see how it is not since the problem accured at the same time they did this change from http to https.. my site is www.valhallaclothing.no Link to comment Share on other sites More sharing options...
NemoPS Posted January 20, 2017 Share Posted January 20, 2017 I get error 500 at that url Link to comment Share on other sites More sharing options...
helge the goat Posted January 20, 2017 Share Posted January 20, 2017 (edited) we disabled the shop for a few hours today .. we found so many errors after the SSL instalation and module update that we do not know where to begin. the shop was working good until yesterday when the SSL was installed -- the only other change we did was update a few outdated modules. now the shipping is wrong - there is the number 2222 on top of every page.- customers can not create new accounts.. it is just a mess - the only change we have made today is disable the ajaxcart .. now customers can add product to the cart but get an error when creating an account.. host informes me that all these error can not possible have anything to do with their instalation of the ssl... if anybody have any ideas where to begin i would be a very happy man Edited January 20, 2017 by helge the goat (see edit history) Link to comment Share on other sites More sharing options...
maklenard Posted February 8, 2017 Share Posted February 8, 2017 Hi I have been having the same problem. Our website theskincarecurator.com I've tried different methods which i found on the forums but no luck. So I made a new website hoping it would go away. im not sure but i think as soon as i transferred my database using cart 2 cart to a the new site The problem came with it. the problem is Customers who are logged in cannot add to cart when inside the Individual Product page. (they can only add it throught the tumbnails) I also noticed that when inside the product page the header is logged out Hope you can help me (i wanted to make a new topic but it wont let me) i checked the javascript for errors and this came up :TypeError: tab is undefinedStack trace: Link to comment Share on other sites More sharing options...
Recommended Posts