Bladeren bron

Merge branch 'develop'

master
Fab 2 jaren geleden
bovenliggende
commit
897c5874b8
2 gewijzigde bestanden met toevoegingen van 7 en 5 verwijderingen
  1. +5
    -4
      Repository/Product/ProductFamilyStore.php
  2. +2
    -1
      Solver/Price/OrderShopPriceSolver.php

+ 5
- 4
Repository/Product/ProductFamilyStore.php Bestand weergeven



public function isReductionCatalogDisplayed(ProductFamilyInterface $productFamily): bool 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 public function hasReductionCatalog(ProductFamilyInterface $productFamily): bool
$reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant) $reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant)
->getByProductFamily($productFamily); ->getByProductFamily($productFamily);


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


public function getByParentCategory( public function getByParentCategory(

+ 2
- 1
Solver/Price/OrderShopPriceSolver.php Bestand weergeven

{ {
$total = 0; $total = 0;
foreach ($orderProducts as $orderProduct) { 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); return $this->round($total);

Laden…
Annuleren
Opslaan