|
|
@@ -146,6 +146,8 @@ class CronController extends BackendController |
|
|
|
public function actionProcessOrders($key = '', $forceDate = '') |
|
|
|
{ |
|
|
|
if ($key == '64ac0bdab7e9f5e48c4d991ec5201d57') { |
|
|
|
ini_set('memory_limit', '-1'); |
|
|
|
set_time_limit(0); |
|
|
|
ini_set('display_errors', 1); |
|
|
|
ini_set('display_startup_errors', 1); |
|
|
|
error_reporting(E_ALL); |
|
|
@@ -264,17 +266,25 @@ class CronController extends BackendController |
|
|
|
} |
|
|
|
|
|
|
|
if ($producer->active) { |
|
|
|
|
|
|
|
$strCountOrders = 0; |
|
|
|
if ($arrayOrders && is_array($arrayOrders)) { |
|
|
|
$strCountOrders = count($arrayOrders); |
|
|
|
} |
|
|
|
$messageLog = $producer->name . ' : Distribution du ' . $date . ', ' . $strCountOrders . ' commande(s) enregistrée(s), ' . $countOrders . ' commande(s) payée(s), ' . ($mailOrdersSend ? 'Récapitulatif de commandes envoyé' : 'Aucun email envoyé'); |
|
|
|
/*Yii::$app->mailer->compose() |
|
|
|
|
|
|
|
$messageLog = |
|
|
|
$producer->name . '<br />' . |
|
|
|
'Distribution du ' . $date . '<br />' . |
|
|
|
$strCountOrders . ' commande(s) enregistrée(s)<br />' . |
|
|
|
$countOrders . ' commande(s) payée(s)<br .>' . |
|
|
|
($mailOrdersSend ? 'Récapitulatif de commandes envoyé' : 'Aucun récapitulatif envoyé'); |
|
|
|
|
|
|
|
Yii::$app->mailer->compose() |
|
|
|
->setFrom('contact@opendistrib.net') |
|
|
|
->setTo('contact@opendistrib.net') |
|
|
|
->setSubject('[Opendistrib] Log '.$producer->name) |
|
|
|
->setTextBody($messageLog) |
|
|
|
->send();*/ |
|
|
|
->send(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |