0
我想知道如何通过安装/升级脚本更新Magento中的客户地址属性 - 特别是Input Validation
下拉框和Maximum Text Length
字段。通过升级脚本更新Magento中的客户地址属性
我想知道如何通过安装/升级脚本更新Magento中的客户地址属性 - 特别是Input Validation
下拉框和Maximum Text Length
字段。通过升级脚本更新Magento中的客户地址属性
在你3210你必须指示用于您的模块设置的型号:
//inside <global> node
<resources>
<stackoverflow_question_setup>
<setup>
<module>StackOverflow_Question</module>
<class>Mage_Customer_Model_Entity_Setup</class>
</setup>
</stackoverflow_question_setup>
</resources>
安装脚本:
<?php
/* @var $installer Mage_Customer_Model_Entity_Setup */
$installer = $this;
$installer->startSetup();
$data = array(
'input_validation' => 'alpha',//see the values of the input validation dropdown to find out what you can put in here
'max_text_length' => 456
);
$serializedData = serialize($data);
$installer->updateAttribute('customer_address', 'firstname', 'validate_rules', $serializedData);
$installer->endSetup();
你说客户** **地址属性,但在你的屏幕截图中,它是一个客户属性 – OSdave