Magento 1.7验证码模块 [英] Magento 1.7 Captcha module
问题描述
在新的Magento版本中,系统"->配置"->客户配置"->"Captcha"中的验证码选项创建了一个名为"Signmeup"的新表格...但是它似乎无法正常工作.我无法显示它:
In the new Magento release the captcha options in "System->Configurations->Customer Configuration->Captcha" I created a new form called "Signmeup"... but it does not seem to be working. I am having trouble getting it to show:
<?php echo Mage::getSingleton('core/layout')
->createBlock('captcha/captcha_zend')
->setFormId('signmeup')
->setImgWidth(230)
->setImgHeight(50)
->setTemplate('captcha/zend.phtml')
->toHtml();?>
现在该块未显示在页面上. (不是动态页面...带有核心Mage Bootup的静态页面) 这是我在说什么的屏幕截图:
Right now that block is not being displayed on the page. (Not a dynamic page... static page with core Mage Bootup) Here is a screen shot of what I am talking about:
推荐答案
在线找到captcha.xml代码(由于某种原因不在我的企业内)之后,我创建了captcha.xml
并将该代码粘贴到布局文件夹中
After finding the captcha.xml code online (which for some reason was not in my enterprise), I created captcha.xml
and pasted that code in the layout folder.
接下来,我确保已在admin > Config > Customer config..
我确实必须添加希望验证码显示的phtml文件:
I did have to add the the phtml files which I wanted the Captcha to show:
echo $this->getChildHtml('form.additional.info'); (in php brackets.)
一旦我做完,一切都会显示并且可以正常工作.
Once i did that everything was shown and functional.
这篇关于Magento 1.7验证码模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!