I have moved a Magento website to a new server.
When an anonymous user adds products to their cart, it works.
When a registered and logged in user adds a product to the cart, the message "We cannot add this item to the cart at this time" is displayed.
I have tried all the suggestions read on the forums about it, without success. All the articles read concerned a cache issue.
But why can an anonymous user add products to the cart and a registered user cannot?
Please have any suggestions?
This issue accrues because those customers have the product in the cart when your site is in the old server.
To solve this please remove all products from your customer's cart.
If my answer is helpful full then please set the accept solution flag and kudos flag so other members can take the same reference.
Is there any error in the error log?
If the error log looks like "Zend_Cache_Exception" then use the below solution:
Go to /vendor/magento/zendframework1/library/Zend/Cache/Backend and edit the file.php
'cache_dir' => null,
and replace it with
'cache_dir' => 'var/cache',
Or it might be possible that the issue is arriving because of any third party module related to cart, checkout or customer.
Thanks for the reply, it was certainly useful.
there was an additional problem causing the issue, it was due to the malfunctioning include_path in plesk.
, now everything works.
Thanks so much
Thanks for the reply, but I don't want to change the core file "File.php"
That is a generic error message but it's not really providing the required information in order to debug the issue.
I suggest enabling developer mode using the Magento command-line tool to log errors:
bin/magento deploy:mode:set developer
Then, you should check the var/log folder to see the error message or add a breakpoint before that exception is generated to debug.