6

I am having an issue with Magento's onepage checkout.

Everything was working fine, I had tested a few orders with success. However, today I merged css/js from the magento admin and afterwards I noticed that during the onepage checkout process it gets stuck at the billing address.

I "unmerged", cleared magento cache, cleared browser cache and cookies and still the issue remains.

There are no errors in firefox developer tools and I see the following under the network tab when clicking "Continue":

POST https://www.example.com/checkout/onepage/saveBilling/ 200 OK   
POST https://www.example.com/checkout/onepage/getAdditional/ 200 OK

I have randomly tried the solutions of "similar" issues that I found while searching magento stackexchange and nothing has worked or hasn't been relevant to my installation.

The issue does not occur with the default theme so I am assuming it is to do with the custom theme being used.

Any help will be greatly appreciated.

  • 1
    the saveBilling and getAdditional should return a JSON response. IN your case, for some reason it returns an empty response. That's all I could see on a first glance. Try debugging step by step these saveBillingAction and getAdditionalAction methods in the onepageController. – Marius Jun 9 '17 at 14:32
  • Ok thank you Marius. So that could be to do with core magento as it invlolves prototype.js? I am trying to remember whether I had done any test orders after the last security update I installed from magento. I shall look in to that! – Sabe Barker Jun 9 '17 at 15:29
15

This issue ended up being related to the security update supee-9767.

Although, the issue it was causing for me was different than what has been reported in other posts, well the ones I came across in my search anyways.

The temporary solution to see if this is actually the problem:

System => Configuration => Admin => Security

and:

Turning the 'Enable Form Key Validation On Checkout' setting off makes this work again.

As mentioned here:

SUPEE-9767 Patch/CE 1.9.3.3 - One Page Checkout - Customer Registration issue

Unfortunately, the fixes in the answers provided didn't "solve" this specific issue for me without disabling the above option, which I wasn't comfortable with as it is essentially going against the patch itself.

However, knowing that it was an issue with my template it was obvious that it didn't have the formkey added.

This command finally fixed the problem for me:

find -L app/design/frontend -regex '.*\(shipping\|billing\|shipping_method\|payment\).phtml' -exec grep -L formkey {} \; \
  | xargs sed -i 's/<\/form>/<?php echo $this->getBlockHtml("formkey") ?><\/form>/g'

I hope this helps someone else out until an update for the patch is released.

  • 3
    This issue because of formkey is not available in your theme. Please add form key – Rama Chandran M Jun 9 '17 at 17:03
  • 1
    Yes, that's what this answer does :) – Sabe Barker Jun 9 '17 at 17:04
  • @SabeBarker , thanks bro it working awesome just added form key in file. – Sarfaraj Sipai Sep 17 '18 at 13:19

protected by Community Sep 19 '17 at 14:12

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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