helloworld2012 Posted August 12, 2012 Share Posted August 12, 2012 Hi, Can somebody please tell me what hook should I use if I want to send an email to the customer when his account gets enabled? I already tried the docs but I can seem to find the right one. Thanks in advance. Link to comment Share on other sites More sharing options...
helloworld2012 Posted August 13, 2012 Author Share Posted August 13, 2012 bump Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2012 Share Posted August 13, 2012 My understanding is there is no specific hook for 'post' enabling a customer's account. You would then need to either add a new hook or modify the code to send an email post enable. 1 Link to comment Share on other sites More sharing options...
helloworld2012 Posted August 13, 2012 Author Share Posted August 13, 2012 Thanks for the reply. I really hoped there was a hook. I'm already searching where I can modify the code to make the functionality but I seem to have trouble finding that too. Is it a controller? Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2012 Share Posted August 13, 2012 Class Customer.php public function toggleStatus() { parent::toggleStatus(); /* Change status to active/inactive */ return Db::getInstance()->Execute(' UPDATE `'.pSQL(_DB_PREFIX_.$this->table).'` SET `date_upd` = NOW() WHERE `'.pSQL($this->identifier).'` = '.(int)($this->id)); } 1 Link to comment Share on other sites More sharing options...
helloworld2012 Posted August 13, 2012 Author Share Posted August 13, 2012 Thanks! Found it. I'll try to work it out now. Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2012 Share Posted August 13, 2012 Best of luck! Link to comment Share on other sites More sharing options...
benjamin utterback Posted August 13, 2012 Share Posted August 13, 2012 Thank you elpatron for your support! Congrats on the 1000th+ posts We are happy to have you here. Thanks for choosing PrestaShop! Link to comment Share on other sites More sharing options...
El Patron Posted August 13, 2012 Share Posted August 13, 2012 Thank you elpatron for your support! Congrats on the 1000th+ posts We are happy to have you here. Thanks for choosing PrestaShop! Thank you!...PrestaShop has been very very good to me. 1 Link to comment Share on other sites More sharing options...
Recommended Posts