소스 검색

[Administration] Communiquer > envoyer un email : ajout du lien vers la boutique du producteur dans le footer #1492

feature/souke
Guillaume Bourgeois 11 달 전
부모
커밋
3efbaadfed
1개의 변경된 파일11개의 추가작업 그리고 7개의 파일을 삭제
  1. +11
    -7
      backend/models/MailForm.php

+ 11
- 7
backend/models/MailForm.php 파일 보기

@@ -174,15 +174,19 @@ Produits disponibles :
$fromEmail = $producerModule->getEmailOpendistrib($producer) ;
$fromName = $producer->name ;

$linkProducer = 'https://'.$producer->slug.'.opendistrib.net';
$linkUnsubscribe = Yii::$app->urlManagerProducer->createAbsoluteUrl(['newsletter/unsubscribe', 'slug_producer' => $producer->slug]);

// Message inscription newsletter
$messageAutoText .= "

--
Boutique : ".$linkProducer."
Me désinscrire : ".$linkUnsubscribe;

Me désinscrire de ce bulletin d'information :
".Yii::$app->urlManagerProducer->createAbsoluteUrl(['newsletter/index', 'slug_producer' => $producer->slug]);

$messageAutoHtml .= "<br /><br />--<br /><br /><a href=\"".Yii::$app->urlManagerProducer->createAbsoluteUrl(['newsletter/unsubscribe', 'slug_producer' => $producer->slug])."\">Me désinscrire</a> de ce bulletin d'information";
$messageAutoHtml .= "<br /><br />--<br>";
$messageAutoHtml .= "Boutique : <a href=\"".$linkProducer."\">".$linkProducer."</a><br>";
$messageAutoHtml .= "Me désinscrire : <a href=\"".$linkUnsubscribe."\">".$linkUnsubscribe."</a>";
}
else {
$fromEmail = 'contact@opendistrib.net' ;
@@ -190,9 +194,9 @@ Me désinscrire de ce bulletin d'information :
}

// Tests
/*$usersArray = [
['email' => '', 'name' => '', 'lastname' => '']
];*/
$usersArray = [
['email' => 'contact@guillaumebourgeois.fr', 'name' => '', 'lastname' => '']
];

foreach($usersArray as $user) {
$body['Messages'][] = [

Loading…
취소
저장