Browse Source

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Fabien Normand 3 years ago
parent
commit
f7f4060f69
3 changed files with 10 additions and 6 deletions
  1. +3
    -2
      Builder/Order/OrderShopBuilder.php
  2. +6
    -3
      Controller/Order/CartController.php
  3. +1
    -1
      Repository/Credit/CreditHistoryStore.php

+ 3
- 2
Builder/Order/OrderShopBuilder.php View File



$orderShop->addOrderReductionCredit($orderReductionCredit); $orderShop->addOrderReductionCredit($orderReductionCredit);


if ($this->isOrderShopPositiveAmount($orderShop)
&& $this->isOrderShopPositiveAmountRemainingToBePaid($orderShop)) {
if ($this->orderShopResolver->isPositiveAmount($orderShop)
&& $this->orderShopResolver->isPositiveAmountRemainingToBePaid($orderShop)) {

$this->entityManager->create($orderReductionCredit); $this->entityManager->create($orderReductionCredit);
$this->entityManager->flush(); $this->entityManager->flush();



+ 6
- 3
Controller/Order/CartController.php View File

use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;


/**
* @Route("/{section}/panier", name="frontend_cart_")
*/
class CartController extends AbstractController class CartController extends AbstractController
{ {
protected ProductFamilyInterface $productFamily; protected ProductFamilyInterface $productFamily;
} }


/** /**
* @Route("/order-reduction-cart/delete/{id}", name="frontend_cart_delete_reduction_cart")
* @Route("/order-reduction-cart/delete/{id}", name="delete_reduction_cart")
*/ */
public function deleteReductionCart(Request $request): RedirectResponse public function deleteReductionCart(Request $request): RedirectResponse
{ {
} }


/** /**
* @Route("/reduction-credit/add/{id}", name="frontend_order_cart_reduction_credit")
* @Route("/reduction-credit/add/{id}", name="order_reduction_credit")
*/ */
public function addReductionCredit(Request $request): RedirectResponse public function addReductionCredit(Request $request): RedirectResponse
{ {
} }


/** /**
* @Route("/order-reduction-credit/delete/{id}", name="frontend_cart_delete_reduction_credit")
* @Route("/order-reduction-credit/delete/{id}", name="delete_reduction_credit")
*/ */
public function deleteReductionCredit(Request $request): RedirectResponse public function deleteReductionCredit(Request $request): RedirectResponse
{ {

+ 1
- 1
Repository/Credit/CreditHistoryStore.php View File



public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{ {
$query->orderBy('createdAt');
//$query->orderBy('createdAt');
return $query; return $query;
} }



Loading…
Cancel
Save