コード例 #1
0
 public function afterBuyerRegister($customer, $buyerInfo)
 {
     global $cookie;
     // send an email just like in the Prestashop AuthController
     if (!property_exists('Customer', 'is_guest') || !$customer->is_guest) {
         Mail::Send((int) $cookie->id_lang, 'account', CartAPI_Handlers_Helpers::compatibilityMailTranslate('Welcome!', (int) $cookie->id_lang), array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname . ' ' . $customer->lastname);
     }
     // run the Prestashop hook
     if (_PS_VERSION_ < '1.5') {
         Module::hookExec('createAccount', array('_POST' => $_POST, 'newCustomer' => $customer));
     } else {
         Hook::exec('actionCustomerAccountAdd', array('_POST' => $_POST, 'newCustomer' => $customer));
     }
 }