Jump to content

"Impossible to add the product to the cart."


Recommended Posts

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?

post-65943-0-32360500-1376094996_thumb.jpg

Link to comment
Share on other sites

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

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

  • 1 year later...

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

  • 1 year later...

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

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 by helge the goat (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

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 undefined
Stack trace:





Link to comment
Share on other sites

×
×
  • Create New...