Magento 1.9.2.2无法在前端创建帐户并登录

时间:2016-02-16 04:12:48

标签: magento firefox frontend magento-1.9

我正在使用Firefox ,我开始遇到问题。我无法在前端的Magento 1.9.2.2中创建新用户,也无法使用注册用户登录。在后端,我可以毫无问题地创建用户。

前一段时间没有发生这种情况。

我尝试了这些解决方案并且无法正常工作:

  • <?php echo $this->getBlockHtml('formkey') ?>添加到我模板的某些文件中。
  • 删除var/cachevar/session
  • 更改Cookie的生命周期。
  • 更改Cookie的域名。

有什么想法吗? :(

1 个答案:

答案 0 :(得分:0)

如果在应用补丁程序SUPEE-6788或升级到Magento 1.9.2.2或更高版本后无法创建客户或登录,则可能是由于缺少表单密钥而引起的。

确保将表单密钥添加到所有(自定义)模板文件中:

app/design/frontend/[package]/[theme]/template/customer/form/register.phtmlapp/design/frontend/[package]/[theme]/template/persistent/customer/form/register.phtml

添加

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

<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />