Showing results for 
Search instead for 
Did you mean: 

add to cart button not working

add to cart button not working

Dear all,

I installed Magento 2 on localhost via XAMPP.

After installing Magento 2 on localhost,
I may encounter some crashing layout errors.
Follow this URL helped me.

But add to cart button not working
There is no reaction even if the button is pushed
The display of the button changes from "add to cart" to "adding", and not in the cart

So by this post I am hoping that someone spots where our problem is? :-)


Re: add to cart button not working

Hi @Masanori58,


Can you check your browser console? Maybe some Javascript error?

Re: add to cart button not working

Hi @Damian Culotta


Thank you for replying.


Browser is google chrome.
Even if you push the button, it is still written "JQMIGRATE: Logging is active".
Console error probably has not happened.

Re: add to cart button not working

@Masanori58 Probably you have keep your url name in localhost as localhost. For chrome localhost is not working as url so you need to keep your url as instead of localhost.


Go to database, Find core_config_data table,


web/unsecure/base_url as{projectname}
web/secure/base_url as{projectname}

Remove var folder from root clear cache and check again.

if issue solved, Click kudos/accept as solutions.

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial