2

我正在尝试在 Magento CE1.7 中强制使用公司名称。我找到了很多前端的地方进行更改,但我无法在后端管理面板中找到要修改的相关文件。

管理控制台中的链接:/admin/customer/edit/id/68/...

以下是我已确定要进行更改的相关前端文件。

 \app\design\frontend\base\default\template\checkout\onepage\billing.phtml
 \app\design\frontend\base\default\template\persistent\checkout\onepage\billing.phtml
 \app\design\frontend\base\default\template\customer\form\address.phtml
 \app\design\frontend\base\default\template\customer\address\edit.phtml
 \app\design\frontend\base\default\template\customer\form\register.phtml
 \app\design\frontend\base\default\template\persistent\customer\form\register.phtml
 \app\design\frontend\base\default\template\checkout\onepage\shipping.phtml

相关链接 - 用于前端... ttp://stackoverflow.com/questions/5456794/magento-make-the-field-company-required

4

1 回答 1

2

您应该通过后端执行此操作 - 特别是数据库。

转到管理 -> 客户 -> 属性 -> 管理客户地址属性将显示公司字段。单击后,您可以看到必填字段,但是由于这是系统属性,因此“必填值”字段已禁用

您可以通过使用开发人员工具栏并从 select 标记中删除disabeld="disabled"属性来覆盖它,或者您可以直接转到数据库并转到表eav_attribute然后在attribute_code下寻找公司,将is_required从0改为1。

于 2013-02-25T05:10:05.673 回答