【发布时间】:2025-12-15 16:40:01
【问题描述】:
magento 的时事通讯表带有名字和姓氏字段,但在默认设置中只保存电子邮件地址。我想使用名字字段,但是在定位记录的保存位置时遇到了一些麻烦。
这就是我的表单现在的样子:
<form action="<?php echo $this->getFormActionUrl() ?>" method="post" id="newsletter-validate-detail">
<div class="block-content">
<table>
<tr>
<td><label for="firstname"><?php echo $this->__('Name:') ?></label></td>
<td>
<div class="input-box">
<input type="text" name="firstname" id="firstname" title="<?php echo $this->__('Name') ?>" class="input-text" />
</div>
</td>
</tr>
<tr>
<td> <label for="newsletter"><?php echo $this->__('Email:') ?></label></td>
<td>
<div class="input-box">
<input type="text" name="email" id="newsletter" title="<?php echo $this->__('Sign up for our newsletter') ?>" class="input-text required-entry validate-email" />
</div>
</td>
</tr>
<tr>
<td></td>
<td>
<div class="actions">
<button type="submit" title="<?php echo $this->__('Subscribe') ?>" class="button"><?php echo $this->__('Sign Up') ?></button>
</div>
</td>
</tr>
</table>
</div>
</form>
有一个类似的post,但我认为它现在已经过时了,因为我似乎找不到 _prepareSave 函数。
有人可以在正确的方向上提供帮助吗?
谢谢, 比利
【问题讨论】: