Error “Your session has expired” when click on add to cart in magento 2.3
-
14-04-2021 - |
Question
I am new in magento, I am creating website in magento 2.3 and I have installed FreeGo
theme in my magento website. But
when i click on product's
add to cart
then it's giving me error-->Your session has expired
.
I have google it a lot but didn't find any solution.
Here is the screenshot:
How can i get rid of this and product can add to cart? Please help me
Solution
use 127.0.0.1 instead of localhost.
UPDATE `core_config_data` SET `value` = 'http://127.0.0.1/zain/accessories/' WHERE `core_config_data`.`path` = 'web/unsecure/base_url';
UPDATE `core_config_data` SET `value` = 'http://127.0.0.1/zain/accessories/' WHERE `core_config_data`.`path` = 'web/secure/base_url';
http://127.0.0.1/zain/accessories/ in this write your frontend url (home page url) what you have
after that run command in your terminal
php bin/magento cache:clean
OTHER TIPS
You also can try to set correct domain in path web/cookie/cookie_domain
in core_config_data
table. (it's domain name, so no http(s)://
and no /
at end)
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange