Skip to content

Commit b314b42

Browse files
committed
Revert "#35881: Final Price for grouped products does not include tax in the Recently Viewed Widget and Meta price"
This reverts commit e751432.
1 parent 25652bc commit b314b42

File tree

2 files changed

+35
-37
lines changed
  • app/code/Magento/Catalog

2 files changed

+35
-37
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Listing/Collector/Price.php

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -82,42 +82,40 @@ public function collect(ProductInterface $product, ProductRenderInterface $produ
8282
->getMinProduct();
8383
}
8484

85-
if ($product !== null) {
86-
$priceInfo->setFinalPrice(
87-
$product
88-
->getPriceInfo()
89-
->getPrice(FinalPrice::PRICE_CODE)
90-
->getAmount()
91-
->getValue()
92-
);
93-
$priceInfo->setMinimalPrice(
94-
$product
95-
->getPriceInfo()
96-
->getPrice(FinalPrice::PRICE_CODE)
97-
->getMinimalPrice()
98-
->getValue()
99-
);
100-
$priceInfo->setRegularPrice(
101-
$product
102-
->getPriceInfo()
103-
->getPrice(RegularPrice::PRICE_CODE)
104-
->getAmount()
105-
->getValue()
106-
);
107-
$priceInfo->setMaxPrice(
108-
$product
109-
->getPriceInfo()
110-
->getPrice(FinalPrice::PRICE_CODE)
111-
->getMaximalPrice()
112-
->getValue()
113-
);
85+
$priceInfo->setFinalPrice(
86+
$product
87+
->getPriceInfo()
88+
->getPrice(FinalPrice::PRICE_CODE)
89+
->getAmount()
90+
->getValue()
91+
);
92+
$priceInfo->setMinimalPrice(
93+
$product
94+
->getPriceInfo()
95+
->getPrice(FinalPrice::PRICE_CODE)
96+
->getMinimalPrice()
97+
->getValue()
98+
);
99+
$priceInfo->setRegularPrice(
100+
$product
101+
->getPriceInfo()
102+
->getPrice(RegularPrice::PRICE_CODE)
103+
->getAmount()
104+
->getValue()
105+
);
106+
$priceInfo->setMaxPrice(
107+
$product
108+
->getPriceInfo()
109+
->getPrice(FinalPrice::PRICE_CODE)
110+
->getMaximalPrice()
111+
->getValue()
112+
);
114113

115-
$this->formattedPriceInfoBuilder->build(
116-
$priceInfo,
117-
$productRender->getStoreId(),
118-
$productRender->getCurrencyCode()
119-
);
120-
}
114+
$this->formattedPriceInfoBuilder->build(
115+
$priceInfo,
116+
$productRender->getStoreId(),
117+
$productRender->getCurrencyCode()
118+
);
121119

122120
$productRender->setPriceInfo($priceInfo);
123121
}

app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ if ($block->getProduct()->getTypeId() === Grouped::TYPE_CODE):
3333
->getPrice(FinalPrice::PRICE_CODE)
3434
->getMinProduct();
3535

36-
$priceAmount = ($minProduct !== null) ? $minProduct->getPriceInfo()
36+
$priceAmount = $minProduct->getPriceInfo()
3737
->getPrice(FinalPrice::PRICE_CODE)
38-
->getAmount() : $minProduct;
38+
->getAmount();
3939
else:
4040
$priceAmount = $block->getProduct()
4141
->getPriceInfo()

0 commit comments

Comments
 (0)