소스 검색

Merge branch 'develop'

master
Fab 2 년 전
부모
커밋
897c5874b8
2개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제
  1. +5
    -4
      Repository/Product/ProductFamilyStore.php
  2. +2
    -1
      Solver/Price/OrderShopPriceSolver.php

+ 5
- 4
Repository/Product/ProductFamilyStore.php 파일 보기

@@ -54,10 +54,11 @@ class ProductFamilyStore extends AbstractStore

public function isReductionCatalogDisplayed(ProductFamilyInterface $productFamily): bool
{
$reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant)
->getByProductFamily($productFamily);
//TODO à discuter
// $reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant)
// ->getByProductFamily($productFamily);

return $this->hasReductionCatalog($productFamily) && $reductionCatalog->isDisplayed();
return $this->hasReductionCatalog($productFamily) && $productFamily->getReductionCatalog()->isDisplayed();
}

public function hasReductionCatalog(ProductFamilyInterface $productFamily): bool
@@ -65,7 +66,7 @@ class ProductFamilyStore extends AbstractStore
$reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant)
->getByProductFamily($productFamily);

return (bool)$reductionCatalog;
return (bool)$productFamily->getReductionCatalog();
}

public function getByParentCategory(

+ 2
- 1
Solver/Price/OrderShopPriceSolver.php 파일 보기

@@ -145,7 +145,8 @@ class OrderShopPriceSolver
{
$total = 0;
foreach ($orderProducts as $orderProduct) {
$total += $this->orderProductPriceResolver->getTotalWithTaxAndReduction($orderProduct, false);
//TODO : ici c'est pas possibble d'arrondir sinon ça fou une merde du tonnerre de de dieu !!!!
$total += $this->orderProductPriceResolver->getTotalWithTaxAndReduction($orderProduct);
}

return $this->round($total);

Loading…
취소
저장