In order to show and use **is_active** field of the table **customer_entity**
шаг 1) вставьте этот код в app / code / core / Mage / Customer / Model / Resource / Setup.php
'is_active' => array(
'label' => 'MyActive',
'type' => 'static',
'input' => 'text',
'visible' => true,
'required' => false,
'position' => 65,
),
step 2) run this query in phpmyadmin
select * from core_resource;
find the version of customer_setup
for example if in your store this is 1.6.2.0.5 so make a file by this name:
upgrade-1.6.2.0.5-1.6.2.0.6.php
this means from version 1.6.2.0.5 will be upgrade to 1.6.2.0.6
copy this file in this path:
app/code/core/Mage/Customer/sql/customer_setup/
copy this code in it:
$installer = $this;
$middlenameAttributeCode = 'is_active';
$installer->addAttribute('customer', $middlenameAttributeCode, array(
'type' => 'static',
'label' => 'MyActive',
'input' => 'text',
'required' => 0,
'sort_order' => 50,
'is_visible' => 1,
'visible' => 1,
'position' => 65,
));
$middlenameAttribute = Mage::getSingleton('eav/config')
->getAttribute('customer', $middlenameAttributeCode);
$middlenameAttribute->setData('used_in_forms', array(
'customer_account_create',
'customer_account_edit',
'checkout_register',
'adminhtml_customer',
'adminhtml_checkout'
));
$middlenameAttribute->save();
step3) перейдите по этому пути: app / code / core / Mage / Customer / etc / config.xml, выше кода в теге <version>1.6.2.0.4</version>
, замените новую версию
очистить все кэши
Выйти из системы, затем войти
Перейти к управлению клиентами