瀏覽代碼

Merge branch 'develop'

master
Guillaume 4 年之前
父節點
當前提交
3aebdba915
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. +1
    -1
      ShopBundle/Controller/Backend/OrderController.php
  2. +4
    -2
      ShopBundle/Twig/FrontendTwigExtension.php

+ 1
- 1
ShopBundle/Controller/Backend/OrderController.php 查看文件

@@ -408,7 +408,7 @@ class OrderController extends AdminController
$this->em->persist($orderShop);
$this->em->flush();
$this->mailUtils->send([
MailUtils::SUBJECT => 'Régler votre commande',
MailUtils::SUBJECT => 'Réglement de votre commande',
MailUtils::TO_EMAIL => $orderShop->getUser()->getEmail(),
MailUtils::TO_NAME => $orderShop->getUser()->getName(),
MailUtils::CONTENT_TEMPLATE => 'mail/order-payment-link',

+ 4
- 2
ShopBundle/Twig/FrontendTwigExtension.php 查看文件

@@ -58,6 +58,7 @@ class FrontendTwigExtension extends AbstractExtension
new TwigFunction('get_form_newsletter', [$this, 'getFormNewsletter']),
new TwigFunction('get_merchants', [$this, 'getMerchants']),
new TwigFunction('get_file_manager_folder', [$this, 'getFileManagerFolder']),
new TwigFunction('lc_format_price', [$this, 'formatPrice']),
);
}

@@ -91,10 +92,11 @@ class FrontendTwigExtension extends AbstractExtension
return $form->createView();
}

public function formatPrice($price)
public function formatPrice($price, $unbreakableSpace = true)
{
$price = number_format($price, 2, ',', ' ');
$price = $price . ' €';
$price .= $unbreakableSpace ? ' ' : ' ' ;
$price .= '€' ;
return $price;
}


Loading…
取消
儲存