2

I just patched my dev machine with Security Patch 9767. And enabled form key on checkout from backend. Also added the form key to my custom theme. But When I tested the checkout process it freeze on billing step. I tried to log the saveBillingAction() on OnePageController.php the result is 0

Mage::log( ((int) $this->_validateFormKey() ) , null , 'custom.log' );

Any help are much appreciated.

0

2 Answers 2

4

open your below file and add form key into it

 app/design/frontend/YourPackage/YourTheme/template/checkout/onepage/billing.phtml

and add below form key code into it

<?php echo $this->getBlockHtml('formkey') ?>

Solution 2

If you are not able to do this then download below patch

https://gist.github.com/schmengler/c42acc607901a887ef86b4daa7a0445b

and apply this patch as you applied security patch and this patch will add that form key even in your custom theme's phtml file

3
Open following file and add following code just before </form>

<?php echo $this->getBlockHtml('formkey') ?>

/app/design/frontend/YourPackage/YourTheme/template/checkout/onepage/billing.phtml
/app/design/frontend/YourPackage/YourTheme/template/checkout/onepage/shipping.phtml
/app/design/frontend/YourPackage/YourTheme/template/persistent/checkout/onepage/billing.phtml
/app/design/frontend/YourPackage/YourTheme/template/checkout/onepage/payment.phtml

All the checkout steps needs form key after installing security patch 9767 when Enable Form Key Validation On Checkout set to Yes under admin configuration.

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