Bladeren bron

[Reduction] Ajustement suite à changement de structure section > merchant

packProduct
Guillaume 3 jaren geleden
bovenliggende
commit
938073d6a2
3 gewijzigde bestanden met toevoegingen van 10 en 6 verwijderingen
  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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

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

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


Laden…
Annuleren
Opslaan