I want form key of product review form in magento 1.9 , Can anyone tell me how to get product wise formkey programatically.

2 Answers 2


You just need put this code:

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

into file template/review/form.phtml

  • I have small doubt, <?php echo $this->getChildHtml('left') ?></div> what is the file 'left', how can i edit that.
    – zus
    Commented Mar 31, 2018 at 10:07
  • I want product review form key in external file not in template/review/form.phtml any idea ?? Commented Apr 2, 2018 at 10:13

Add in your form

<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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