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

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

+ 4
- 2
ShopBundle/Twig/FrontendTwigExtension.php View File

new TwigFunction('get_form_newsletter', [$this, 'getFormNewsletter']), new TwigFunction('get_form_newsletter', [$this, 'getFormNewsletter']),
new TwigFunction('get_merchants', [$this, 'getMerchants']), new TwigFunction('get_merchants', [$this, 'getMerchants']),
new TwigFunction('get_file_manager_folder', [$this, 'getFileManagerFolder']), new TwigFunction('get_file_manager_folder', [$this, 'getFileManagerFolder']),
new TwigFunction('lc_format_price', [$this, 'formatPrice']),
); );
} }


return $form->createView(); return $form->createView();
} }


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



Loading…
Cancel
Save