0

谁可以帮助取消对 Telefone 字段的要求?

我尝试了解决方案:

http://www.magentocommerce.com/boards/viewthread/10948/P0/

http://www.magentocommerce.com/boards/viewthread/199287/

但没有运气...

PS 我使用 Magento 版本。1.7.0.2

4

1 回答 1

0

尝试

在您的数据库表名称中:eav_attribute

寻找attribute_code=电话

设置is_required= 0

您也可以通过创建扩展的自定义模块来完成此操作Mage_Customer_Model_Form

<customer>
     <rewrite>
          <form>MageIgniter_RemoveRequiredField_Model_Customer_Form</form>
      </rewrite>
</customer>

class MageIgniter_RemoveRequiredField_Model_Customer_Form extends Mage_Customer_Model_Form {

    protected function _getFormAttributeCollection() {

        $collection = parent::_getFormAttributeCollection()
                        ->addFieldToFilter('attribute_code', array('neq' => 'created_at'));
        // look for the 'telephone' field here and change 'is_required'
于 2013-01-10T16:18:13.240 回答