Browse Source

[Backend] Paramètres : ajout email from purchase order

feature/export_comptable
Guillaume 4 years ago
parent
commit
f37d4d90bd
3 changed files with 5 additions and 1 deletions
  1. +1
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  2. +3
    -0
      ShopBundle/Resources/views/backend/merchant/panel_email.html.twig
  3. +1
    -1
      ShopBundle/Services/MailUtils.php

+ 1
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml View File

@@ -267,6 +267,7 @@ field:
emailFromName: "Email (From) : nom"
emailSubjectPrefix: "Email : préfixe"
emailContact: Email (contact)
emailFromPurchaseOrder: "Email (From) : bons de commande"
order: Commande
subject: Sujet
metaTitle: Meta title

+ 3
- 0
ShopBundle/Resources/views/backend/merchant/panel_email.html.twig View File

@@ -18,6 +18,9 @@
<div class="col-12">
{{ form_row(form.merchantConfigs['email-contact']) }}
</div>
<div class="col-12">
{{ form_row(form.merchantConfigs['email-from-purchase-order']) }}
</div>
{{ macros.card_end() }}
</div>
</div>

+ 1
- 1
ShopBundle/Services/MailUtils.php View File

@@ -41,7 +41,7 @@ class MailUtils
$merchantCurrent = $this->merchantUtils->getMerchantCurrent();

$merchantConfigEmailFrom = $merchantCurrent->getMerchantConfig('email-from');
$emailFrom = isset($params[self::FROM_EMAIL]) ? $params[self::FROM_EMAIL] : $merchantConfigEmailFrom;
$emailFrom = (isset($params[self::FROM_EMAIL]) && $params[self::FROM_EMAIL] && strlen($params[self::FROM_EMAIL])) ? $params[self::FROM_EMAIL] : $merchantConfigEmailFrom;

$merchantConfigEmailFromName = $merchantCurrent->getMerchantConfig('email-from-name');
$emailFromName = isset($params[self::FROM_NAME]) ? $params[self::FROM_NAME] : $merchantConfigEmailFromName;

Loading…
Cancel
Save