Browse Source

Merge branch 'dev'

prodstable
Guillaume 4 years ago
parent
commit
81a456dc83
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      backend/controllers/CronController.php

+ 10
- 1
backend/controllers/CronController.php View File

@@ -231,7 +231,16 @@ class CronController extends BackendController
}
if($producer->active) {
Yii::error($producer->name.' : Distribution du '.$date.', '.count($arrayOrders).' commande(s) enregistrée(s), '.$countOrders.' commande(s) payée(s), '.($mailOrdersSend ? 'Récapitulatif de commandes envoyé' : 'Aucun email envoyé'), 'cron-process-orders') ;
$messageLog = $producer->name.' : Distribution du '.$date.', '.count($arrayOrders).' commande(s) enregistrée(s), '.$countOrders.' commande(s) payée(s), '.($mailOrdersSend ? 'Récapitulatif de commandes envoyé' : 'Aucun email envoyé') ;

Yii::$app->mailer->compose()
->setFrom('contact@opendistrib.net')
->setTo('contact@opendistrib.net')
->setSubject('[Opendistrib] Log cron')
->setTextBody($messageLog)
->send();

Yii::error($messageLog, 'cron-process-orders') ;
}
}
}

Loading…
Cancel
Save