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.

Magento products not going in cart

Ali Rehman
  • 43
  • 1
  • 6

2 Answers2

3

Change your base URL from localhost to 127.0.0.1.

Using localhost as the domain in your base URL causes problems in Magento 2.

Magento's base URL configuration is located in the core_config_data table. The following values may need to be changed:

  • web/unsecure/base_url
  • web/secure/base_url

For example, if you previously had http://localhost/yourproject/, you should change it to http://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.

P S
  • 435
  • 1
  • 8
  • 26
1

go to PHPMyAdmin coreconfigdata

change URL localhost/project to 127.0.0.1/project

arvind jha
  • 71
  • 7