1

I imported over 3000 customers in magento, I need to set them all as confirmed. How can I do?

1

Basically you just have to remove the value of the attribute confirmation for each of this customer. If a customer has a confirmation attribute value set that means that confirmation is required. Without that value a customer is considered confirmed.

You can do that either with the following code for a given $id (for example you can loop through all ids if you now them):

$customer = Mage::getModel('customer/customer')->load($id);
$customer->setConfirmation(null);
$customer->save();

or by running a SQL statement

delete from customer_entity_varchar 
where attribute_id = ( 
       select attribute_id from eav_attribute 
         where entity_type_id = 1 and attribute_code = 'confirmation'
)
and entity_id = [YOUR CUSTOMER ID TO CONFIRM];

If you now the ids of the customer you can specify the range in SQL and delete all (I assume all imported ids are coherently):

delete from customer_entity_varchar 
where attribute_id = ( 
    select attribute_id from eav_attribute 
       where entity_type_id = 1 and attribute_code = 'confirmation'
)
and entity_id >= [YOUR SMALLEST CUSTOMER ID TO CONFIRM]
and entity_id <= [YOUR LARGEST CUSTOMER ID TO CONFIRM];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.