瀏覽代碼

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…
取消
儲存