我正在使用Firefox ,我开始遇到问题。我无法在前端的Magento 1.9.2.2中创建新用户,也无法使用注册用户登录。在后端,我可以毫无问题地创建用户。
前一段时间没有发生这种情况。
我尝试了这些解决方案并且无法正常工作:
<?php echo $this->getBlockHtml('formkey') ?>
添加到我模板的某些文件中。var/cache
和var/session
。有什么想法吗? :(
答案 0 :(得分:0)
如果在应用补丁程序SUPEE-6788或升级到Magento 1.9.2.2或更高版本后无法创建客户或登录,则可能是由于缺少表单密钥而引起的。
确保将表单密钥添加到所有(自定义)模板文件中:
app/design/frontend/[package]/[theme]/template/customer/form/register.phtml
和app/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() ?>" />