To change a Customer group from general to something special during a special event, like when purchase a particluar total amount , special product or any date etc…

$sessionĀ  = Mage::getSingleton('customer/session');
$customer = $session->getCustomer();
if($customer->getId()) {
 $customer->setEmail($customer->getData('email'));
 $customer->setGroupId('5'); // custom group id
 $customer->save();
 Mage::getSingleton('customer/session')->loginById($customer->getId());
 }

Please suggest is there any other good methods….

 Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2014 Developers Corner Suffusion theme by Sayontan Sinha