The "Add to cart" button changes to "adding" and stays like that. It does nothing after that.It doesn't work from anywhere not even product details page.
Magento 2 products not being added to cart
4.8k Views Asked by Ali Rehman At
2
The "Add to cart" button changes to "adding" and stays like that. It does nothing after that.It doesn't work from anywhere not even product details page.
Change your base URL from
localhostto127.0.0.1.Using
localhostas the domain in your base URL causes problems in Magento 2.Magento's base URL configuration is located in the
core_config_datatable. The followingvalues may need to be changed:web/unsecure/base_urlweb/secure/base_urlFor example, if you previously had
http://localhost/yourproject/, you should change it tohttp://127.0.0.1/yourproject/After changing the url, flush the cache (
bin/magento cache:flush). You might also need to clear out your var directories.