Skip to content

Commit 3ba2b4e

Browse files
author
Viktor Paladiychuk
committed
MAGETWO-63014: Configurable shows lowest price after product was assigned to another website
1 parent a7f0425 commit 3ba2b4e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByBasePrice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ public function build($productId)
101101
if (!$this->catalogHelper->isPriceGlobal()) {
102102
$priceSelectStore = clone $priceSelect;
103103
$priceSelectStore->where('t.store_id = ?', $this->storeManager->getStore()->getId());
104-
$select[] = $priceSelectStore;
104+
$selects[] = $priceSelectStore;
105105
}
106106

107107
$priceSelect->where('t.store_id = ?', Store::DEFAULT_STORE_ID);
108-
$select[] = $priceSelect;
108+
$selects[] = $priceSelect;
109109

110-
return $select;
110+
return $selects;
111111
}
112112
}

app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderBySpecialPrice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ public function build($productId)
145145
if (!$this->catalogHelper->isPriceGlobal()) {
146146
$priceSelectStore = clone $specialPrice;
147147
$priceSelectStore->where('t.store_id = ?', $this->storeManager->getStore()->getId());
148-
$select[] = $priceSelectStore;
148+
$selects[] = $priceSelectStore;
149149
}
150150

151151
$specialPrice->where('t.store_id = ?', Store::DEFAULT_STORE_ID);
152-
$select[] = $specialPrice;
152+
$selects[] = $specialPrice;
153153

154-
return $select;
154+
return $selects;
155155
}
156156
}

app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderByTierPrice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ public function build($productId)
103103
if (!$this->catalogHelper->isPriceGlobal()) {
104104
$priceSelectStore = clone $priceSelect;
105105
$priceSelectStore->where('t.website_id = ?', $this->storeManager->getStore()->getWebsiteId());
106-
$select[] = $priceSelectStore;
106+
$selects[] = $priceSelectStore;
107107
}
108108

109109
$priceSelect->where('t.website_id = ?', self::DEFAULT_WEBSITE_ID);
110-
$select[] = $priceSelect;
110+
$selects[] = $priceSelect;
111111

112-
return $select;
112+
return $selects;
113113
}
114114
}

app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderComposite.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ public function __construct($linkedProductSelectBuilder)
2626
*/
2727
public function build($productId)
2828
{
29-
$select = [];
29+
$selects = [];
3030
foreach ($this->linkedProductSelectBuilder as $productSelectBuilder) {
31-
$select = array_merge($select, $productSelectBuilder->build($productId));
31+
$selects = array_merge($selects, $productSelectBuilder->build($productId));
3232
}
3333

34-
return $select;
34+
return $selects;
3535
}
3636
}

0 commit comments

Comments
 (0)