hal*_*ush 21
您还应该将它添加到服务器端的属性中.
如果您使用的是Magento Entreprise Edition,则可以通过后端简单地编辑公司属性,并将其设置为"required".
如果您使用的是Community Edition,则必须使用SQL手动更改此值.这是在eav_attribute表中,attribute_code是company,你只需要设置is_required到1.
Bes*_*nik 11
除了haltabush答案(这是正确的),这里是懒惰开发人员的SQL:
UPDATE eav_attribute SET is_required = 1 WHERE attribute_code = 'company';
Run Code Online (Sandbox Code Playgroud)
对于客户地址簿部分(注册客户):
/app/design/frontend/base/default/template/customer/address/edit.phtml
对于结帐帐单部分:
/app/design/frontend/base/default/template/checkout/onepage/billing.phtml
结帐运输部分:
/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml
注册部分:
/app/design/frontend/base/default/template/customer/form/register.phtml
/app/design/frontend/base/default/template/customer/form/address.phtml
查找所需字段的以下行:
class="input-text validate-email required-entry"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
26742 次 |
| 最近记录: |