File tree Expand file tree Collapse file tree 4 files changed +12
-18
lines changed
dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api Expand file tree Collapse file tree 4 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 46
46
<type name =" Magento\Customer\Model\ResourceModel\Visitor" >
47
47
<plugin name =" catalogLog" type =" Magento\Catalog\Model\Plugin\Log" />
48
48
</type >
49
- <type name =" Magento\Catalog\Model\Product\Attribute\Repository" >
50
- <plugin name =" filterCustomAttribute" type =" Magento\Catalog\Model\Plugin\FilterCustomAttribute" />
51
- </type >
52
- <type name =" Magento\Catalog\Model\Plugin\FilterCustomAttribute" >
53
- <arguments >
54
- <argument name =" blackList" xsi : type =" array" >
55
- <item name =" quantity_and_stock_status" xsi : type =" string" >quantity_and_stock_status</item >
56
- </argument >
57
- </arguments >
58
- </type >
59
49
<type name =" Magento\Indexer\Model\Indexer\State" >
60
50
<plugin name =" setStatusForIndexer" type =" Magento\Catalog\Model\Indexer\Category\Product\Plugin\IndexerState" />
61
51
</type >
Original file line number Diff line number Diff line change 5
5
* Copyright © 2015 Magento. All rights reserved.
6
6
* See COPYING.txt for license details.
7
7
*/
8
- namespace Magento \Catalog \Model \Plugin ;
8
+ namespace Magento \CatalogInventory \Model \Plugin ;
9
9
10
10
use Magento \Catalog \Model \Product \Attribute \Repository ;
11
11
Original file line number Diff line number Diff line change 32
32
<preference for =" Magento\CatalogInventory\Model\Spi\StockStateProviderInterface" type =" Magento\CatalogInventory\Model\StockStateProvider" />
33
33
34
34
<preference for =" Magento\CatalogInventory\Model\ResourceModel\QtyCounterInterface" type =" \Magento\CatalogInventory\Model\ResourceModel\Stock" />
35
-
35
+ <type name =" Magento\Catalog\Model\Product\Attribute\Repository" >
36
+ <plugin name =" filterCustomAttribute" type =" Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute" />
37
+ </type >
38
+ <type name =" Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute" >
39
+ <arguments >
40
+ <argument name =" blackList" xsi : type =" array" >
41
+ <item name =" quantity_and_stock_status" xsi : type =" string" >quantity_and_stock_status</item >
42
+ </argument >
43
+ </arguments >
44
+ </type >
36
45
<type name =" Magento\CatalogInventory\Observer\UpdateItemsStockUponConfigChangeObserver" >
37
46
<arguments >
38
47
<argument name =" resourceStock" xsi : type =" object" >Magento\CatalogInventory\Model\ResourceModel\Stock\Proxy</argument >
Original file line number Diff line number Diff line change @@ -204,12 +204,7 @@ protected function findCustomAttributeQty($customAttributes)
204
204
{
205
205
$ qty = false ;
206
206
$ qtyAndStockStatus = [];
207
- foreach ($ customAttributes as $ customAttribute ) {
208
- if ($ customAttribute [self ::KEY_ATTRIBUTE_CODE ] == self ::CODE_QUANTITY_AND_STOCK_STATUS ) {
209
- $ qtyAndStockStatus = $ customAttribute ['value ' ];
210
- break ;
211
- }
212
- }
207
+
213
208
if (!empty ($ qtyAndStockStatus ) && is_array ($ qtyAndStockStatus )) {
214
209
215
210
if (array_key_exists ('any_type ' , $ qtyAndStockStatus )) {
You can’t perform that action at this time.
0 commit comments