Jump to content

Impossible to add the product to the cart after upgrading to 1.5.4


Recommended Posts

I was able to upgrade both 1 click and from version 1.5.3.1 to 1.5.4.0 (automated upgrade, on a default theme) all successfully installed. But now testing, I can't even add an item to the shopping cart (while Ajax cart is active). I get the below error. It only works when I deactivate Ajax cart. Anyone help please.

 

Impossible to add the product to the cart.
textStatus: 'error'
errorThrown: ''
responseText:

Edited by dformica (see edit history)
Link to comment
Share on other sites

Same problem here... I'm on a fresh install of 1.5.4.0, seems to have happened since I switched themes. Changing back to the origional theme doesn't resolve the error. It's also been raised in the following Posts:-

 

http://www.prestasho...ut-parsererror/

http://www.prestasho...wn/page__st__20

 

Looks like it's either configure the Cart module to not use Ajax, or disable the Paypal module until the problem has been resolved...

post-535111-0-71437000-1365539301_thumb.png

Edited by MBPaints (see edit history)
Link to comment
Share on other sites

- I've never switched themes so that we can rule out.

- I deleted my Cart rules

- Disabled Paypal

None of the above worked.

 

Testing in Chrome I get an additional piece to the error message:

errorThrown: 'No Transport'

 

Please help!

Link to comment
Share on other sites

I'm pretty sure changing the theme is what caused the problem for me...

 

Apologies, crossed wires I think. I didn't mean to delete the cart rules.. I meant to disable to Ajax functionality... It's what makes the pretty animation across the screen when you add a new product to the cart.

 

In my case either disabling the 'Ajax Cart' or the 'Paypal Module' had an immediate effect on getting things working again.

post-535111-0-75978700-1365581312_thumb.png

Link to comment
Share on other sites

Yes, I failed to describe that I had deactivated Ajax in the Cart Block, it does allow the cart to function. But I need the cart to work as it did in the past with Ajax so that the user doesn't have to add one item then go back to continue shopping.

Link to comment
Share on other sites

I feel your pain my friend, am sharing the same frustration. All I can say is that users will most likely be able to cope fine with the alternative non-ajax checkout experience, in my case it is an Administrative desire that the Ajax cart works in the visually appealing manner that it normally does.

 

Think I'm gonna try to rally together the others that have been affected and try to get on the bug reports when possible.. I know we're not the only affected parties..

 

http://forge.prestashop.com/browse/PSCFV-5675

http://forge.prestashop.com/browse/PSCFV-8701

  • Like 1
Link to comment
Share on other sites

If you are trying to use a theme that was created prior to v1.5.4 was released, then it will not work. The default theme was heavily modified in v1.5.4, and your existing theme will need to be updated to support the new features/changes.

 

You will need to do a file by file comparison to see what has changed in each template, js and css file, and apply those changes to your theme.

Link to comment
Share on other sites

We got the error on a fresh installed 1.5.4 standard theme.

then open a separate forum topic to avoid any confusion. the subject of this topic is "Impossible to add the product to the cart after upgrading to 1.5.4"

 

I do not have this issue using a clean install of v1.5.4 and the default theme.

Link to comment
Share on other sites

We got the error on a fresh installed 1.5.4 standard theme.

Thanks, good to know the issue is not only affecting upgrades to 1.5.4 default theme.

Still waiting for a solution. I ended up deactivating ajax meanwhile we find the solution.

Link to comment
Share on other sites

Thanks, good to know the issue is not only affecting upgrades to 1.5.4 default theme.

Still waiting for a solution. I ended up deactivating ajax meanwhile we find the solution.

 

Are you using Paypal? If so, are you using v3.4.8? If so, then this is your problem. Downgrade the Paypal module to v3.4.6 and it should solve your issue... That is only for clean installs using default theme.

  • Like 1
Link to comment
Share on other sites

Check this: I've been always doing 1-click updates without any issues since it has been released. Yet today I did 1-click update from 1.5.3.1 to 1.5.4 on my local server (I always doing updates etc. on local copy of original shop before I do the same on master online project) and the update went fine, without any issues. And even the ajax cart is working fine (I am using custom template, not the default one, however I select the option to update default template automatically)

 

But... after tests, when I check that everything is fine, I did 1-click update on master installation (exaclty same version, same files, same database etc) and I can't add anything to the basket (if ajax enabled)

 

I checked the PayPal module and it's 3.4.8 on both installations. However, it must have been updated automaticaly during the 1-click update as before update it was 3.4.6. Still - the same prestashop on local server works fine. The website server throws the card issue....

Link to comment
Share on other sites

Hi charlie123, what happens if you disable 3.4.8 on the live store?

 

I disabled the ajax on the live store so customers can add the product to the basket and checkout with PayPal. I don't really want to disable PayPal as this is the most popular payment method for me. However, I disabled it for a while and enabled the ajax cart - everything was working fine. Enable PayPal and leave Ajax Cart - problem (customer can't add to basket as described in the first post here).

 

EDIT !!!!!!!!!!!

 

This might be related to SSL?

 

I've noticed that the SSL is disabled on my local server but live one is enabled. So I disabled SSL on live server, enabled ajax cart and paypal module and everything is working fine (but with SSL disabled)

 

So everything is working fine if either:

 

1. Ajax cart is disabled (ssl and paypal enabled)

2. Paypal is disabled (ajax cart enabled, ssl enabled)

3. SSL disabled (paypal and ajax cart enabled)

  • Like 1
Link to comment
Share on other sites

yes, thank you, know i remember where i dealt with this.

 

In v3.4.8, the hookheader function assumes that an SSL certificate is used. however, even if an SSL cert is being used, not every page uses HTTPS (home page, product page etc...), so you wind up with a cross site scripting error.

$this->context->smarty->assign('base_uri', Tools::getShopDomainSsl(true).__PS_BASE_URI__);

 

The cross site scripting error prevents certain javascript and css files from being loaded.

 

Therefor if you simply comment out that single line, it fixes the issue.

Edited by bellini13 (see edit history)
  • Like 3
Link to comment
Share on other sites

yes, thank you, know i remember where i dealt with this.

 

In v3.4.8, the hookheader function assumes that an SSL certificate is used. however, even if an SSL cert is being used, not every page uses HTTPS (home page, product page etc...), so you wind up with a cross site scripting error.

$this->context->smarty->assign('base_uri', Tools::getShopDomainSsl(true).__PS_BASE_URI__);

 

The cross site scripting error prevents certain javascript and css files from being loaded.

 

Therefor if you simply comment out that single line, it fixes the issue.

 

Thanks, this has fixed the issue for me. Is it the best solution tho?

Link to comment
Share on other sites

Benjamin has a developer on the case to solve the issue more permanently, but this should safely solve the issue in the short term.

 

The alternative is to downgrade the Paypal module to v3.4.5 or v3.4.6

 

The base_uri variable is actually set by the PS framework, and it knows if it needs to be HTTP or HTTPS. The Paypal module was just attempting to force it to HTTPS all the time, which is considered a cross site scripting issue, and blocked by the browser.

Link to comment
Share on other sites

Yeah, actually charlie123 would have the best store to solve this issue on.

Thanks, this has fixed the issue for me. Is it the best solution tho?

 

 

Do you think you could make a temporary FTP for us to fix the module for you. At some point it needs to be fixed anyways and we cannot reproduce the issue. As beliini13 mentioned, there are temporary solutions but we can figure out together how to permanently solve the issue if we had FTP access for a short time.

Link to comment
Share on other sites

I wish I could but unfortunately it's not possible. I can only give you the access to module/paypal folder however, you won't be able to change anything anyway as only the root user can make changes via putty on our server. I can send you the files over if you need any

Link to comment
Share on other sites

HI charlie123, if you could send me the files and database then we could copy the shop locally and test the issue. If that works, then you could E-mail me at [email protected] . Is that possible?

Hi Benjamin

 

I'm also experiencing the same problem. I solved it by applying the fixed proposed by: bellini13, which was commenting a line in the paypal module.

 

If you still need the ftp access or the files, I could either setup a test site with the same database and files or send you my whole compressed prestashop with the database. Just tell me which one is best for you.

 

Best regards

Josef

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I have the same problem after upgrade from 1.4 to 1.5.4.1. Using slightly customized default theme. Paypal module is not installed.

 

The error message I get is :

 

 

Impossible to add the product to the cart.

textStatus: 'parsererror'
errorThrown: 'SyntaxError: JSON Parse error: Unrecognized token '<''
responseText:
<br />
<b>Warning</b>:  Function <b>getDefaultCountryId()</b> is deprecated in <b>/home/www/7d27b991f1dde11d695cab045d520ca4/web/shop/override/classes/Cart.php</b> on line <b>72</b><br /> in <b>/home/www/7d27b991f1dde11d695cab045d520ca4/web/shop/classes/Tools.php</b> on line <b>1845</b><br />
<br />
<b>Warning</b>:  Function <b>getDefaultCountryId()</b> is deprecated in <b>/home/www/7d27b991f1dde11d695cab045d520ca4/web/shop/override/classes/Cart.php</b> on line <b>72</b><br /> in <b>/home/www/7d27b991f1dde11d695cab045d520ca4/web/shop/classes/Tools.php</b> on line <b>1845</b><br />
<br />
<b>Fatal error</b>:  Class 'Carriercateg' not found in <b>/home/www/7d27b991f1dde11d695cab045d520ca4/web/shop/override/classes/Cart.php</b> on line <b>418</b><br />

 

Thanks for your help

Link to comment
Share on other sites

yes, thank you, know i remember where i dealt with this.

 

In v3.4.8, the hookheader function assumes that an SSL certificate is used. however, even if an SSL cert is being used, not every page uses HTTPS (home page, product page etc...), so you wind up with a cross site scripting error.

$this->context->smarty->assign('base_uri', Tools::getShopDomainSsl(true).__PS_BASE_URI__);

 

The cross site scripting error prevents certain javascript and css files from being loaded.

 

Therefor if you simply comment out that single line, it fixes the issue.

 

Another confirmation of success. Thank you very much for sharing the info. For clarification this seems to resolve the error quoted by the Origional Poster:-

 

Impossible to add the product to the cart.
textStatus: 'error'
errorThrown: ''
responseText:

 

This error related specifically to 1.5.4.0 and it seems that it was most noticable to those that had switched themes at some point. If you are having problems with a different version of Prestashop or with a different error message then your post probably belongs in a new thread.

 

Thanks to all who helped to find the resolution.

Link to comment
Share on other sites

I have try'ed to download again now what happen is that in SEO&URLS i have to chose how my adress will work with www or without

Shop domain

if now i type in browser my adress wit www i geting blank page it works just witout www and cart still not working any help please

Thank You

Link to comment
Share on other sites

Then i install'ed it again and now cart still not works and if i entering site without www i geting blank page and errors

[b]Warning[/b]: Cannot modify header information - headers already sent by (output started at /home/content/06/10381506/html/config/config.inc.php:1) in [b]/home/content/06/10381506/html/classes/controller/FrontController.php[/b] on line[b]749[/b]

 

[b]Warning[/b][color=#000000]: Cannot modify header information - headers already sent by (output started at /home/content/06/10381506/html/config/config.inc.php:1) in[/color][b]/home/content/06/10381506/html/classes/controller/FrontController.php[/b][color=#000000] on line [/color][b]633[/b]

[b]Warning[/b][color=#000000]: Cannot modify header information - headers already sent by (output started at /home/content/06/10381506/html/config/config.inc.php:1) in[/color][b]/home/content/06/10381506/html/classes/controller/FrontController.php[/b][color=#000000] on line [/color][b]634[/b]

[b]Warning[/b][color=#000000]: Cannot modify header information - headers already sent by (output started at /home/content/06/10381506/html/config/config.inc.php:1) in [/color][b]/home/content/06/10381506/html/classes/Tools.php[/b][color=#000000] on line [/color][b]130[/b]

Link to comment
Share on other sites

ftp, in back office when I'm uploading after upload reaches 100% and page refreshes i getting blank white page and if i going to shop with www i getting same white blank page and cart dos not work, I trying to fix it all day if you have any thoughts please tell

and its imposible to delete paypal on back office i geting white page and after refresh this error

[color=#000000][PrestaShop] Fatal error in module AdminModulesController:[/color]
[color=#000000]Call to a member function uninstall() on a non-object[/color]

Thanks a lot for helping

 

maybe somebody cud post older version paypal link please

Edited by egis51 (see edit history)
Link to comment
Share on other sites

Hi

 

I ask you again: did you modified the config.inc.php or the defines.inc.php? If yes, please post them here. I would say you added or removed something there that is causing the white page.

 

Anyway, if you still have access to the Back Office, maybe disabling or uninstalling paypal would help. You can also try to see the error messages on the white page by enabling debugging in the defines.inc.php file, by setting this variable:

 

define('_PS_MODE_DEV_', true);

Link to comment
Share on other sites

Hey no i did not change any files, now everything is working perfect just after reintaling prestashop and deleting everything from FTP,

Something was wrong after one click upgrade I had alot erors in back office aswell,,

Thank you everybody for helping (Y)

regards

Link to comment
Share on other sites

sometimes a file can get corrupted during the FTP upload process. that can even hold true for the autoupgrade, which is essentially copying new files from a remote server to your server. if one of those files get corrupted, it would generally cause this type of error.

 

glad its working for you now.

  • Like 1
Link to comment
Share on other sites

Hey no i did not change any files, now everything is working perfect just after reintaling prestashop and deleting everything from FTP,

Something was wrong after one click upgrade I had alot erors in back office aswell,,

Thank you everybody for helping (Y)

regards

 

I only said that because your problem seemed to be more than only the cart, but also the whole PrestaShop. I even didn't know that you had updated PrestaShop. As bellini13 said, corruption of files would explain that.

 

Anyway, I would advise you before doing an update, copy all your files. That's what I usually do. Sometimes that kind of problems may happen. At least you will be able to downgrade if something goes wrong.

 

Best regards

Josef

Edited by jmeile (see edit history)
  • Like 1
Link to comment
Share on other sites

The new upgrade v 1.5.4.1 solved this problem

 

 

This problem is with Ajax only. If we disable ajax in cart block module, then product is add to my cart without problem.

 

Thank you, When I upgrade my site from v 1.5.3 to v.1.5.4.1, the problem is solved. Now I can add my product to cart using ajax.

(Please be careful with your old store details)

Edited by SundarvDev (see edit history)
Link to comment
Share on other sites

Hello,

 

Recently I updated from 1.4.10 to 1.5.4.1 and I have the same problem. Any PayPal module not instaled. I can add products to the cart, but can't see the Ajax effect (it is enabled on module configuration).

 

Any solution to solve this?

 

Best Regards

Link to comment
Share on other sites

  • 1 month later...

you should try to reset the block cart, block currency, block language and permanent link modules. then using modules position, in the "top of pages" hook, order them

  1. language
  2. currency
  3. permanent links
  4. quick search
  5. user info
  6. top horizontal menu
  7. cart block

This should only apply if you upgrade and use the default theme, and your previous theme had these disabled. The upgrade does NOT re-enable any modules that it requires in use of the default theme, and because of that, it breaks the ajax cart

Edited by bellini13 (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Hi!

I have the same problem.

Prestashop version 1.6.0.9

Impossible to add the product to the cart. 

textStatus: 'error' 

errorThrown: '' 

responseText: 

 

No PayPal module is installed.

No SSL is used

Ajax card is disabled now, but I would like to solve this problem with Ajax enabled.

www.inboots.com.ua

Edited by temuchin (see edit history)
  • Like 1
Link to comment
Share on other sites

Same thing is happening to me now. I'm on 1.5.3.1 and I haven't changed or upgraded anything but in last few days this error started to show up. 10 days ago everything was fine. I don't know how that could be related but hosting provider did some changes in my server settings around that time. I disabled Ajax in backoffice and "add to cart" now works but that just isn't it. 

 

If anyone has idea that could help please share it.

Link to comment
Share on other sites

  • 11 months later...
  • 1 month later...

I do not have this issue on a fresh install and the default theme either.

Hello, 

          there's one problem in my site, while adding product to cart. its throw warning message "Product not found" 

          please give me solution of this problem.

 

          Thanks.

Edited by bhshah (see edit history)
Link to comment
Share on other sites

  • 1 month later...

STILL this issue persists in 1.6.1.2 (upgraded). 

 

Prestashop - please do not ignore these problems - has there been any permanent solution to this?

 

EDIT: I ended up disabling Google Analytics and it fixed the problem - now to find out why Analytics is causing the issue...

 

Thanks

Edited by TeapotDan (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...