my add to cart not working, its showing nothing in cart for 2 stores and for 1 store adding a default product everytime, doesn't matter which product we added, its showing this exception....

We can't add above item to cart.Please contact administratorThe product wasn't found. Verify the product and try again.

i have checked my code is fine, its working on local setup and dev server, just issue is on production,

i have tried with cookie lifetime increase and permission settings on directories but none worked.. do it need some more cookie or session changes which can be done ?

can any body share any idea or solution with some details ??

  • try this solution /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'... May 29, 2020 at 18:05
  • i have already tried this but not worked May 29, 2020 at 18:08
  • after you are this link --- magento.stackexchange.com/a/235485/85907 ??? May 29, 2020 at 18:10
  • opposite to this link issue, mine is working on product detail page, but not working on List page. and regarding ownership: all directories already have www:data ownership May 29, 2020 at 20:00

1 Answer 1


This happens due to change in the domain as Magento 2 stores root URL in the third path without affecting the first version.

To resolve the issue, try to run additional SQL query:

UPDATE core_config_data
SET value = REPLACE(value, '<old root URL or domain>', '<new root URL or domain>')
WHERE path = 'design/head/includes';

and then clear the cache by using this command:

rm -rf var/cache/*

Hope it works for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.