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

emailFromName: "Email (From) : nom" emailFromName: "Email (From) : nom"
emailSubjectPrefix: "Email : préfixe" emailSubjectPrefix: "Email : préfixe"
emailContact: Email (contact) emailContact: Email (contact)
emailFromPurchaseOrder: "Email (From) : bons de commande"
order: Commande order: Commande
subject: Sujet subject: Sujet
metaTitle: Meta title metaTitle: Meta title

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

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

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

$merchantCurrent = $this->merchantUtils->getMerchantCurrent(); $merchantCurrent = $this->merchantUtils->getMerchantCurrent();


$merchantConfigEmailFrom = $merchantCurrent->getMerchantConfig('email-from'); $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'); $merchantConfigEmailFromName = $merchantCurrent->getMerchantConfig('email-from-name');
$emailFromName = isset($params[self::FROM_NAME]) ? $params[self::FROM_NAME] : $merchantConfigEmailFromName; $emailFromName = isset($params[self::FROM_NAME]) ? $params[self::FROM_NAME] : $merchantConfigEmailFromName;

Loading…
Cancel
Save