Ver código fonte

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

packProduct
Fabien Normand 3 anos atrás
pai
commit
f7f4060f69
3 arquivos alterados com 10 adições e 6 exclusões
  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 Ver arquivo

@@ -478,8 +478,9 @@ class OrderShopBuilder

$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->flush();


+ 6
- 3
Controller/Order/CartController.php Ver arquivo

@@ -11,6 +11,9 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

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

/**
* @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
{
@@ -102,7 +105,7 @@ class CartController extends AbstractController
}

/**
* @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
{
@@ -133,7 +136,7 @@ class CartController extends AbstractController
}

/**
* @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
{

+ 1
- 1
Repository/Credit/CreditHistoryStore.php Ver arquivo

@@ -21,7 +21,7 @@ class CreditHistoryStore extends AbstractStore

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


Carregando…
Cancelar
Salvar