Magento1 – Onepage Checkout Returns Error 500

javascriptmagento-1onepage-checkout

I installed a theme in Magento 1 that is just working with onepage checkout. In general that is fine, but somehow it is not working. First, I type in my billing address/shipping address, but it stops and then it redirects me to the cart page.

However, if I debug the javascript in chrome, I get

500 (Internal Server Error)

POST

http://127.0.0.1/magento/index.php/checkout/onepage/saveBilling/

So, I was searching for the saveBilling Method in /app/code/core/Mage/Checkout/Type/onepage.php. But this function works fine and returns no error.

Any idea what next steps I could do to find that error? is it possible to extend that Method maybe? If yes, how can I look up for it?

Best Answer

Your shop fails while doing the ajax request, presumably there is something wrong with the quote-object that causes an exception, and if this happens, you are redirected to the cart. I have debugged such errors in the past by doing this:

  • turn on the Magento developer mode and error_reporting
  • check that [magento]/var/log/ is writable by the webserver, sometimes this means they need permissions "777"
  • I use Google Chrome, so I open the developer tools and change to the "Network" tab
  • walk through the checkout; as soon as you notice the site reloading, hit "ESC" and inspect the ajax-request you now see in the "Network"-tab. It should display an error with a stacktrace.
Related Topic