- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All
When I press "Add to Cart", there is error message
"We can't add this item to your shopping cart right now."
Any idea for the issue?
Please help
Regards
Andy
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Thanks for your help first. Actually, I am no programmer and I have limited knowledge the trace the program. I check the log file below
/var/log/debug.log and found below message, do you have any idea?
Regards
Andy
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
Hi @andykfwoo,
That is a generic error message but it's not really providing the required information in order to debug the issue.
I suggest to enable 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.
Best regards.
Gabriel
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
"We can't add this item to your shopping cart right now" is a generic message which hides some internal exteption.
Please see the exception log in the var/log directory or set a breakpoint in the code point where the message is generated.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Thanks for your help first. Actually, I am no programmer and I have limited knowledge the trace the program. I check the log file below
/var/log/debug.log and found below message, do you have any idea?
Regards
Andy
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
This isn't solution, its a trick which good programmers hate the most.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
I too have the same problem and I am not able to resolve the same. The same code works fine on the staging environment but not on production. Find extract from exception.log
#44 /<magento dir>vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#45 /<magento dir>vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#46 /<magento dir>vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#47 /<magento dir>vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(68): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#48 /<magento dir>vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#49 /<magento dir>var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#50 /<magento dir>vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#51 /<magento dir>vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#52 /<magento dir>pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#53 {main} [] []
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
Moppelfett, this good solution, thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
Moppelfett, Please do not advise to edit the core files. This can be handled with config when setting the cache backend to file in app/etc/env.php
This class is also being deprecated in favor of Magento\Framework\Cache\Core
See reference
https://devdocs.magento.com/guides/v2.0/config-guide/cache/cache-types.html
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error when "Add to Cart" - Error message "We can't add this item to your shoppin
Hi,
We are using the Redis cache. So please suggest me what can I add here.