Skip to content

Commit bb41a99

Browse files
author
Andrey Konosov
committed
Merge commit 'refs/pull/1567/head' of github.com:magento/magento2ce into 2.2-develop
2 parents 85ccf4b + 9793f5a commit bb41a99

File tree

6 files changed

+24441
-6518
lines changed

6 files changed

+24441
-6518
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/GroupPrice/AbstractGroupPrice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ protected function modifyPriceData($object, $data)
360360
{
361361
/** @var array $priceItem */
362362
foreach ($data as $key => $priceItem) {
363-
if (isset($priceItem['price']) && $priceItem['price'] > 0) {
363+
if (array_key_exists('price', $priceItem)) {
364364
$data[$key]['website_price'] = $priceItem['price'];
365365
}
366366
if ($priceItem['all_groups']) {

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/IndexTableRowSizeEstimator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class IndexTableRowSizeEstimator implements \Magento\Framework\Indexer\IndexTabl
1515
/**
1616
* Calculated memory size for one record in catalog_product_index_price table
1717
*/
18-
const MEMORY_SIZE_FOR_ONE_ROW = 120;
18+
const MEMORY_SIZE_FOR_ONE_ROW = 200;
1919

2020
/**
2121
* @var \Magento\Store\Api\WebsiteManagementInterface

app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/Backend/TierpriceTest.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ public function testSetPriceData()
141141
{
142142
$attributeName = 'tier_price';
143143
$tierPrices = [
144+
[
145+
'price' => 0,
146+
'all_groups' => 1,
147+
],
144148
[
145149
'price' => 10,
146150
'all_groups' => 1,
@@ -153,6 +157,12 @@ public function testSetPriceData()
153157
$productPrice = 20;
154158
$allCustomersGroupId = 32000;
155159
$finalTierPrices = [
160+
[
161+
'price' => 0,
162+
'all_groups' => 1,
163+
'website_price' => 0,
164+
'cust_group' => 32000,
165+
],
156166
[
157167
'price' => 10,
158168
'all_groups' => 1,
@@ -170,8 +180,11 @@ public function testSetPriceData()
170180
->disableOriginalConstructor()->getMock();
171181
$allCustomersGroup = $this->getMockBuilder(\Magento\Customer\Api\Data\GroupInterface::class)
172182
->disableOriginalConstructor()->getMock();
173-
$this->groupManagement->expects($this->once())->method('getAllCustomersGroup')->willReturn($allCustomersGroup);
174-
$allCustomersGroup->expects($this->once())->method('getId')->willReturn($allCustomersGroupId);
183+
$this->groupManagement
184+
->expects($this->exactly(2))
185+
->method('getAllCustomersGroup')
186+
->willReturn($allCustomersGroup);
187+
$allCustomersGroup->expects($this->exactly(2))->method('getId')->willReturn($allCustomersGroupId);
175188
$object->expects($this->once())->method('getPrice')->willReturn($productPrice);
176189
$this->attribute->expects($this->atLeastOnce())->method('isScopeGlobal')->willReturn(true);
177190
$object->expects($this->once())->method('getStoreId')->willReturn(null);

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/Indexer/Price/IndexTableRowSizeEstimatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function setUp()
3838

3939
public function testEstimateRowSize()
4040
{
41-
$expectedValue = 2400000;
41+
$expectedValue = 4000000;
4242

4343
$this->websiteManagementMock->expects($this->once())->method('getCount')->willReturn(100);
4444
$collectionMock = $this->createMock(\Magento\Customer\Model\ResourceModel\Group\Collection::class);

0 commit comments

Comments
 (0)