cancel
Showing results for 
Search instead for 
Did you mean: 

Can not add product to cart in product page - We can't add this item to your shopping cart right now

Can not add product to cart in product page - We can't add this item to your shopping cart right now

Hi All,

 

Wish all of you can help. I installed CE Magento 2.1.0 and 2.1.2 and both have problem when add product in cart

 

In product page, there is error message

We can't add this item to your shopping cart right now

 

however, when in catalog page and press the add to cart for the product, the product can be added to cart successfully

 

checked the /var/log/debug.log

[2016-10-19 01:06:52] main.DEBUG: cache_invalidate: {"method":"POST","url":"http://www.testing212.com/admin_r1r4dx/admin/cache/massDisable/key/93be4134db252686a8097653e1baadb109d851dc057cd04296bd18a34e4d93c2/","invalidateInfo":{"tags":["WEBSERVICE"],"mode":"matchingTag"},"is_exception":false} []

 

My current server setting

Apache 2.4

PHP5.6 / PHP7

MySQL 5.7.14

 

 

Please help!

 

Andy 

8 REPLIES

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

I got the exact same error when trying to add a product to the shopping cart in a product page. For some reasons it's working in the category list view. I tried it on some different versions of Magento ce, like 2.1.0 / 2.1.2 and the 2.2.x developer versions. I thought that maybe it's the hosters fault, as for example a wrong or an outdated apache version. I'm still looking for a fix, but not many people seem to have that error.

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

same problem here. How do you fixed it?

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

Same problem here.
MAGENTO 2 is soooo buggy and no one here got the skills to help.

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

I found the solution Go to /vendor/magento/zendframework1/library/Zend/Cache/Backend and edit the file.php Search for 'cache_dir' => null, and replace it with 'cache_dir' => 'var/cache', DONE! For us it worked well.

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

It did not work for us... error seems to be something to do with the server configuration as the same code is working on our staging setup while the same is not working on production server. We are still facing the same error.

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

When I checked exception.log I found that, insert query is getting failed due to integration violation error in two tables - quote_item and quote_item_option.

To solve this, I had to make auto increment on for primary key column of both the table. This is how I fixed it. 

Hope this helps. 

 

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

That didn't work for me. When I click the add button it does nothing. It just says adding and is greyed out and never adds to cart. modifying the File.php file changing it to the specified cache location changed nothing.

Re: Can not add product to cart in product page - We can't add this item to your shopping cart right

Hi all,

I'm the same problem

when I add to cart a product, but the cart is empty

when I sign in  with account enable, sign in not working

and nothing  error is displayed

 

new installation  magento 2.2.2 with sample products

cento 7.0

Apache/2.4.6 (CentOS)

PHP 7.0.27

plesk panel 12.5

 

thanks for help

Albina