Categories: How To

How to Fix Magento Form Key Auto Disable Issue at Checkout Page

Regularly updating your Magento stores brings not only the newest features, but also provides security fixes, which is highly important for your Magento store’s safety. Not updating your Magento stores can result in not only a bad performance, but it makes your shop an easy target for hackers. That’s we always recommended store owners to keep their Magento stores up to date with new security patches and using MageComp Upgrade Service will help you to install latest Magento patch without zero data loss and zero downtime. Meanwhile upgrading one Magento store to Magento CE 1.9.3.x along with SUPEE-9767, we came across an issue of Checkout is not working due to Form Key Validation enabled from admin backend.

Go to System > Configuration > Advanced > Security > Enable Form Key Validation on Checkout

On checkout page, when we select any payment method, we are unable to move further to complete the checkout process or even it doesn’t display any error or response just because enable the form key feature but when we have disabled Form Key Validation at Checkout, the checkout process functions as expected.


While working on the issue in developer console, we found that CSS is adding the disabled selector to the form_key. it means a form_key value is not getting submitted to checkout controller causing the controller to return null. That’s why we need to pass form_key to checkout controller using following line.


To resolve the issue, need to add a small script to payment.phtml file available on below location.
app\design\frontend\[YOUR THEME]\template\checkout\onepage\payment.phtml


That’s it, now your form_key is passed to checkout controller each and every time you proceed to order product. So, what else needed for the store owner, if their store works smoothly without any issue.
Get in touch with us for more update and comment down below if you are looking for any help regarding this code.

Happy Fixing !

Click to rate this post!
[Total: 3 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate ?️ Certified Magento Developer?‍?. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.?

Recent Posts

How to Add Tooltip in Checkout Shipping Field in Magento 2?

Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…

3 days ago

How to Integrate and Use MongoDB with Laravel?

MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…

4 days ago

NodeJS | Callback Function

In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…

5 days ago

How to Show SKU in Order Summary in Magento 2?

Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…

7 days ago

Best Colors to Use for CTA Buttons

The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…

1 week ago

Magento 2: How to Save Custom Field Value to quote_address for Multi-Shipping Orders

Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…

1 week ago