Kaynağa Gözat

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

packProduct
Fabien Normand 3 yıl önce
ebeveyn
işleme
f7f4060f69
3 değiştirilmiş dosya ile 10 ekleme ve 6 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

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

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


Yükleniyor…
İptal
Kaydet