Skip to content

Commit 1fc17af

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.2-develop
Accepted Community Pull Requests: - #23328: [Backport] Remove fotorama.min.js (by @ihor-sviziev) - #23277: [Backport] Fixed #22396 config:set fails with JSON values (by @shikhamis11) - #23252: [Backport] Fixed Issue #22087 (by @krishprakash) Fixed GitHub Issues: - #22396: config:set fails with JSON values (reported by @MichaelThessel) has been fixed in #23277 by @shikhamis11 in 2.2-develop branch Related commits: 1. 6c46ed0 - #22087: Products Ordered Report - Not grouped by product (reported by @nicholasscottfish) has been fixed in #23252 by @krishprakash in 2.2-develop branch Related commits: 1. 446f0c0 2. c60aab5
2 parents 0ea9b21 + e0b70c4 commit 1fc17af

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

app/code/Magento/CatalogInventory/Helper/Minsaleqty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected function serializeValue($value)
9595
}
9696
return $this->serializer->serialize($data);
9797
} else {
98-
return '';
98+
return $value;
9999
}
100100
}
101101

app/code/Magento/CatalogInventory/Test/Unit/Helper/MinsaleqtyTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function testMakeStorableArrayFieldValue($value, $result, $serializeCallC
216216
public function makeStorableArrayFieldValueDataProvider()
217217
{
218218
return [
219-
'invalid bool' => [false, ''],
219+
'invalid bool' => [false, false],
220220
'invalid empty string' => ['', ''],
221221
'valid numeric' => ['22', '22'],
222222
'valid empty array' => [[], '[]', 1],
@@ -240,7 +240,8 @@ public function makeStorableArrayFieldValueDataProvider()
240240
'[1]',
241241
1,
242242
[0 => 1.0]
243-
]
243+
],
244+
'json value' => ['{"32000":2,"0":1}', '{"32000":2,"0":1}'],
244245
];
245246
}
246247
}

app/code/Magento/Reports/Model/ResourceModel/Product/Sold/Collection.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
use Magento\Framework\DB\Select;
1515

1616
/**
17+
* Data collection.
18+
*
1719
* @SuppressWarnings(PHPMD.DepthOfInheritance)
1820
* @api
1921
* @since 100.0.2
2022
*/
2123
class Collection extends \Magento\Reports\Model\ResourceModel\Order\Collection
2224
{
2325
/**
24-
* Set Date range to collection
26+
* Set Date range to collection.
2527
*
2628
* @param int $from
2729
* @param int $to
@@ -79,6 +81,10 @@ public function addOrderedQty($from = '', $to = '')
7981
)->having(
8082
'order_items.qty_ordered > ?',
8183
0
84+
)->columns(
85+
'SUM(order_items.qty_ordered) as ordered_qty'
86+
)->group(
87+
'order_items.product_id'
8288
);
8389
return $this;
8490
}
@@ -116,6 +122,8 @@ public function setOrder($attribute, $dir = self::SORT_ORDER_DESC)
116122
}
117123

118124
/**
125+
* @inheritdoc
126+
*
119127
* @return Select
120128
* @since 100.2.0
121129
*/

lib/web/fotorama/fotorama.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)