5

I am facing some problem regarding product add to cart. Whenever i am trying to add any configurable of simple product to my cart. It is not getting added to cart. Also When i checked in console, I saw an ajax problem in that. Ajax giving 302 error. When I am adding any product to cart.

Please anyone help me to resolve it.

  • Check magento log file for error. – Dhiren Vasoya Dec 29 '16 at 12:08
3

Seem that you tried to use localhost as Top Level Domain (TLD). Try to use other domains like magen.loc, magen2.loc, etc.

Read more: https://magento.stackexchange.com/a/145192/33057

  • I don't think that its a domain problem. Because I setup the magento on my test server also. And again the problem not resolved. If the problem cause by Localhost , then it should work on my test server. But its not working there also. – Yudi Jan 2 '17 at 5:07
  • I am getting ajax response 302 Found while add to cart. This is the main problem. Otherwise customer login and other functions are working well. Please tell me why i am getting 302 response and how to resolve this. – Yudi Jan 2 '17 at 5:14
  • Try to clear your Magento cache, Browser cache and cookie! – Khoa TruongDinh Jan 2 '17 at 23:36
  • Tried to deploy static content, cache clean . Still not working. :( – Yudi Jan 3 '17 at 6:36
  • It just miiiight be that you can have to put a tld (an 'extension', a .com, .io, .ru, .whatever ) in your URL. So localhost won't work, and magento2 didn't work for me. But magento2.io did. – Cedric Feb 16 '18 at 9:29
3

I have changed unsecure and secure url localhost to 127.0.0.1 in table core_config_data and its working fine

Hope this will help someone!

  • You've saved my life man. Tks! – medina Dec 4 '18 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.