Ver código fonte

Merge branch 'develop'

master
Fab 2 anos atrás
pai
commit
897c5874b8
2 arquivos alterados com 7 adições e 5 exclusões
  1. +5
    -4
      Repository/Product/ProductFamilyStore.php
  2. +2
    -1
      Solver/Price/OrderShopPriceSolver.php

+ 5
- 4
Repository/Product/ProductFamilyStore.php Ver arquivo

@@ -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 Ver arquivo

@@ -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);

Carregando…
Cancelar
Salvar