Magento - 需要现场"公司"

Biz*_*oss 9 magento

对于B2B Magento站点,在注册新客户端时,我想要使该字段为"公司".

我应该编辑哪个文件?

非常感谢.

hal*_*ush 21

您还应该将它添加到服务器端的属性中.

如果您使用的是Magento Entreprise Edition,则可以通过后端简单地编辑公司属性,并将其设置为"required".

如果您使用的是Community Edition,则必须使用SQL手动更改此值.这是在eav_attribute表中,attribute_codecompany,你只需要设置is_required1.


Bes*_*nik 11

除了haltabush答案(这是正确的),这里是懒惰开发人员的SQL:

UPDATE eav_attribute SET is_required = 1 WHERE attribute_code = 'company';
Run Code Online (Sandbox Code Playgroud)


Oğu*_*mir 5

对于客户地址簿部分(注册客户):

/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)

  • 虽然它有类似的效果,但绝对不是这样做的. (3认同)