Closed brazzil closed 9 years ago
If you load the global events area in the script then it the regular event observer will be triggered and the emails sent automatically. However, if you prefer you can send the notification email to a customer using
Mage::helper('customeractivation')->sendCustomerNotificationEmail($customer);
To activate the accounts I use the following script and works properly. How I can send the customer notification email using this script? thx
$customers = Mage::getResourceModel('customer/customer_collection')->addAttributeToSelect('*')->addAttributeToFilter('customer_activated', array('neq' => 1)); foreach($customers as $customer) { $customer->load($customer->getId()); $customer->setCustomerActivated(1); $customer->save(); };