Esempio n. 1
0
 public function sendOrderEmail()
 {
     $app = Yii::$app;
     if ($this->validate()) {
         $service = Service::items()[$this->subject];
         $email = empty($this->email) ? $app->params['contactEmail'] : $this->email;
         $app->mailer->compose()->setTo($app->params['contactEmail'])->setFrom([$email => $this->name])->setSubject($service)->setTextBody(Yii::t('app/models', "Order for {service} received.\n\n" . "Contacts:\n\t name: {name}\n\t email: {email}\n\t phone: {phone}\n Comment: {body}", ['name' => $this->name, 'email' => $this->email, 'phone' => $this->phone, 'service' => $service, 'body' => $this->body]))->send();
         return true;
     } else {
         return false;
     }
 }
Esempio n. 2
0
      <?php 
Pjax::end();
?>
      </div>
      <div class="modal-footer text-center color-scheme-6">
          Возникли вопросы? <strong> Позвоните: <?php 
echo Yii::$app->params['contactPhone'];
?>
 </strong>
      </div>
    </div>
  </div>
</div>

<?php 
$services = array_keys(Service::items());
?>
<article id="services" class="services page-block page-block_height_auto">
    <div class="container">
        <div class="row">
            <div class="col-xs-12 text-center underscored-title">
                <h2 class="page-block__title">
                    <div class="underscored-title__title underscored-title__title_highlight">
                        Наши
                        <div class="underscored-title__underscore underscored-title__underscore_highlight"></div>
                    </div><div class="underscored-title__title">
                        услуги
                        <div class="underscored-title__underscore"></div>
                    </div>
                </h2>
                <p class="services__description">