From dc7900a3c3fa5fb826ca779099a46d9eaa4759a6 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 2 Jun 2016 11:05:55 +0300 Subject: [PATCH] 01.06.16 --- common/widgets/Mailer.php | 8 +++++--- common/widgets/views/registration.php | 2 +- frontend/controllers/RegController.php | 10 +++++++++- frontend/views/basket/success.php | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/common/widgets/Mailer.php b/common/widgets/Mailer.php index aa61ff7..d692775 100755 --- a/common/widgets/Mailer.php +++ b/common/widgets/Mailer.php @@ -10,6 +10,8 @@ class Mailer extends Widget{ public $text; public $subject; public $type; + public $params; + public function init(){ @@ -24,11 +26,11 @@ class Mailer extends Widget{ $mail->IsSMTP(); $mail->CharSet = 'UTF-8'; - $mail->Username = "dockdep@gmail.com"; - $mail->Password = "k0l0b04eg@"; + $mail->Username = "adwords@artweb.ua"; + $mail->Password = "eks,ybcm5hfp"; $mail->SetFrom('dockdep@gmail.com'); $mail->Subject = $this->subject; - $mail->MsgHTML($this->render('test')); + $mail->MsgHTML($this->render($this->type, ['params' => $this->params])); $address = "dockdep@gmail.com"; $mail->AddAddress($address); // $mail->AddAddress($this->email); diff --git a/common/widgets/views/registration.php b/common/widgets/views/registration.php index 66bf353..a658a29 100644 --- a/common/widgets/views/registration.php +++ b/common/widgets/views/registration.php @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/controllers/RegController.php b/frontend/controllers/RegController.php index eafd7ba..a7afedb 100755 --- a/frontend/controllers/RegController.php +++ b/frontend/controllers/RegController.php @@ -58,7 +58,15 @@ class RegController extends Controller $modelLogin->username = $model->username; $modelLogin->password = $model->password; $modelLogin->login(); - //Mailer::widget(['type' => 'registration', 'subject'=> 'Спасибо за регистрацию', 'email' => $model->username ]); + Mailer::widget( + ['type' => 'registration', + 'subject'=> 'Спасибо за регистрацию', + 'email' => $model->username, + 'params' => [ + 'name' => $model->username, + 'pass' => $model->password, + ] + ]); $this->redirect(['/iam']); } diff --git a/frontend/views/basket/success.php b/frontend/views/basket/success.php index c0b4463..e7bc09b 100755 --- a/frontend/views/basket/success.php +++ b/frontend/views/basket/success.php @@ -26,7 +26,7 @@ if(isset($variants) && isset($order)){ });"; } - $orderData = "ga('ecommerce:send');"; + $orderData .= "ga('ecommerce:send');"; $this->registerJs ($orderData, View::POS_BEGIN); } -- libgit2 0.21.4