Browse Source

Merge branch 'develop'

master
Guillaume 4 years ago
parent
commit
3aebdba915
2 changed files with 5 additions and 3 deletions
  1. +1
    -1
      ShopBundle/Controller/Backend/OrderController.php
  2. +4
    -2
      ShopBundle/Twig/FrontendTwigExtension.php

+ 1
- 1
ShopBundle/Controller/Backend/OrderController.php View File

@@ -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 View File

@@ -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…
Cancel
Save