Dan*_*Dan 10 php forms controller magento
任何人都可以提供虚拟指南\代码片段,了解如何在Magento中创建将数据发布到控制器操作的前端表单.
我试着写一个联系我们的变种.(我知道它很容易修改与我们联系表单,如概述在这里).我正在尝试创建一个包含其他字段的反馈表单.
鉴于这种基本形式:
<form action="<?php echo $this->getFormAction(); ?>" id="feedbackForm" method="post">
<div class="input-box">
<label for="name"><?php echo Mage::helper('contacts')->__('Name') ?> <span class="required">*</span></label><br />
<input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="required-entry input-text" type="text" />
</div>
<div class="button-set">
<p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>
<button class="form-button" type="submit"><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></button>
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
将输入的名称输入控制器动作进行处理需要采取的基本步骤是什么?
Dan*_*Dan 13
如果有人感兴趣,我通过构建我自己的模块来解决这个问题,该模块基于Magento_Contacts
模块.
以下是一些帮助我解决问题的链接.
http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table
http://inchoo.net/ecommerce/magento/magento-custom-emails/
归档时间: |
|
查看次数: |
38600 次 |
最近记录: |