Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-inventory-catalog
Plugin
CatalogInventory
Model
Spi
StockStateProvider
AdaptVerifyStockToNegativeMinQtyPlugin.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryCatalog\Plugin\CatalogInventory\Model\Spi\StockStateProvider
;
9
10
use
Magento\CatalogInventory\Api\Data\StockItemInterface
;
11
use
Magento\CatalogInventory\Model\Spi\StockStateProviderInterface
;
12
13
class
AdaptVerifyStockToNegativeMinQtyPlugin
14
{
22
public
function
afterVerifyStock
(
StockStateProviderInterface
$subject,
bool
$result
,
StockItemInterface
$stockItem
)
23
{
24
if
(
$stockItem
->getBackorders() !==
StockItemInterface::BACKORDERS_NO
25
&&
$stockItem
->getMinQty() < 0
26
&&
$stockItem
->getQty() <
$stockItem
->getMinQty()
27
) {
28
return
false
;
29
}
30
return
$result
;
31
}
32
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\CatalogInventory\Api\Data\StockItemInterface
Definition:
StockItemInterface.php:19
Magento\InventoryCatalog\Plugin\CatalogInventory\Model\Spi\StockStateProvider\AdaptVerifyStockToNegativeMinQtyPlugin\afterVerifyStock
afterVerifyStock(StockStateProviderInterface $subject, bool $result, StockItemInterface $stockItem)
Definition:
AdaptVerifyStockToNegativeMinQtyPlugin.php:22
$stockItem
$stockItem
Definition:
configurable_options_advanced_inventory.php:24
Magento\InventoryCatalog\Plugin\CatalogInventory\Model\Spi\StockStateProvider
Definition:
AdaptVerifyStockToNegativeMinQtyPlugin.php:8
Magento\InventoryCatalog\Plugin\CatalogInventory\Model\Spi\StockStateProvider\AdaptVerifyStockToNegativeMinQtyPlugin
Definition:
AdaptVerifyStockToNegativeMinQtyPlugin.php:13
Magento\CatalogInventory\Model\Spi\StockStateProviderInterface
Definition:
StockStateProviderInterface.php:13
Magento\CatalogInventory\Api\Data\StockItemInterface\BACKORDERS_NO
const BACKORDERS_NO
Definition:
StockItemInterface.php:21