File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
app/code/Magento/CatalogInventory Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
use Magento \Customer \Api \GroupManagementInterface ;
10
10
use Magento \Framework \App \ObjectManager ;
11
+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
11
12
use Magento \Framework \Serialize \Serializer \Json ;
12
13
use Magento \Store \Model \Store ;
13
14
14
15
/**
15
16
* MinSaleQty value manipulation helper
16
17
*/
17
- class Minsaleqty
18
+ class Minsaleqty implements ResetAfterRequestInterface
18
19
{
19
20
/**
20
21
* Core store config
@@ -61,6 +62,14 @@ public function __construct(
61
62
$ this ->serializer = $ serializer ?: ObjectManager::getInstance ()->get (Json::class);
62
63
}
63
64
65
+ /**
66
+ * @inheritDoc
67
+ */
68
+ public function _resetState (): void
69
+ {
70
+ $ this ->minSaleQtyCache = [];
71
+ }
72
+
64
73
/**
65
74
* Retrieve fixed qty value
66
75
*
Original file line number Diff line number Diff line change 9
9
use Magento \CatalogInventory \Helper \Minsaleqty as MinsaleqtyHelper ;
10
10
use Magento \Framework \App \Config \ScopeConfigInterface ;
11
11
use Magento \Catalog \Model \ProductTypes \ConfigInterface ;
12
+ use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
12
13
use Magento \Store \Model \ScopeInterface ;
13
14
use Magento \Store \Model \StoreManagerInterface ;
14
15
15
16
/**
16
17
* Class Configuration
17
18
*/
18
- class Configuration implements StockConfigurationInterface
19
+ class Configuration implements StockConfigurationInterface, ResetAfterRequestInterface
19
20
{
20
21
/**
21
22
* Default website id
@@ -122,7 +123,7 @@ class Configuration implements StockConfigurationInterface
122
123
/**
123
124
* All product types registry in scope of quantity availability
124
125
*
125
- * @var array
126
+ * @var array|null
126
127
*/
127
128
protected $ isQtyTypeIds ;
128
129
@@ -151,6 +152,14 @@ public function __construct(
151
152
$ this ->storeManager = $ storeManager ;
152
153
}
153
154
155
+ /**
156
+ * @inheritDoc
157
+ */
158
+ public function _resetState (): void
159
+ {
160
+ $ this ->isQtyTypeIds = null ;
161
+ }
162
+
154
163
/**
155
164
* @inheritdoc
156
165
*/
You can’t perform that action at this time.
0 commit comments