File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
app/code/Magento/QuoteGraphQl/Model/CartItem Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -165,9 +165,12 @@ private function isStockQtyAvailable(
165
165
float $ requiredQuantity ,
166
166
float $ prevQty
167
167
): bool {
168
- $ storeId = $ this ->storeManager ->getStore ()->getId ();
169
- $ websiteId = $ this ->storeManager ->getStore ($ storeId )->getWebsiteId ();
170
- $ scopeId = $ websiteId ?? $ this ->stockConfiguration ->getDefaultScopeId ();
168
+ try {
169
+ $ storeId = $ this ->storeManager ->getStore ()->getId ();
170
+ $ scopeId = $ this ->storeManager ->getStore ($ storeId )->getWebsiteId ();
171
+ } catch (NoSuchEntityException $ e ) {
172
+ $ scopeId = $ this ->stockConfiguration ->getDefaultScopeId ();
173
+ }
171
174
$ stockStatus = $ this ->stockState ->checkQuoteItemQty (
172
175
$ product ->getId (),
173
176
$ itemQty ,
You can’t perform that action at this time.
0 commit comments