cancel
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.
https://www.magestore.com/magento-2-tutorial/common-error-when-installing-localhost-xampp/

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? :-)

3 REPLIES 3

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 http://127.0.0.1 instead of localhost.

 

Go to database, Find core_config_data table,

set,

web/unsecure/base_url as http://127.0.0.1/{projectname}
web/secure/base_url as http://127.0.0.1/{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