Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 41f16dc

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-72582: Configurable product displays the price of "out of stock" configuration
1 parent b877de3 commit 41f16dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductOutOfStockPage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ protected function getLowestConfigurablePrice()
6161

6262
if (null === $price) {
6363
$configurableOptions = $this->product->getConfigurableAttributesData();
64-
foreach ($configurableOptions['matrix'] as $option) {
65-
if ($option['quantity_and_stock_status']['is_in_stock'] !== 'Out of Stock') {
64+
$products = $this->product->getDataFieldConfig('configurable_attributes_data')['source']->getProducts();
65+
foreach ($configurableOptions['matrix'] as $key => $option) {
66+
if ($products[$key]->getQuantityAndStockStatus()['is_in_stock'] !== 'Out of Stock') {
6667
$price = $price === null ? $option['price'] : $price;
6768
if ($price > $option['price']) {
6869
$price = $option['price'];

0 commit comments

Comments
 (0)