InventorySales Module
AppendReservations
This model handles the creation of inventory reservations when an order is placed in Magento 2's Multi-Source Inventory (MSI) system. Developers use t...
AreProductsSalable
This class checks whether multiple products are available for sale across a specific stock/inventory source. Developers use this when they need to ver...
AreProductsSalableForRequestedQty
This class checks if multiple products are available for sale in the requested quantities within a specific stock. Developers use this when validating...
CheckItemsQuantity
This class validates whether requested quantities of products are available for sale in a specific stock. Developers use it to check inventory availab...
GetAssignedSalesChannelsForStock
This class retrieves all sales channels (like websites, stores) that are assigned to a specific stock/inventory source in Magento's Multi-Source Inven...
GetBackorder
This class determines if a product can be backordered and calculates the backorder quantity when requested quantity exceeds available stock. Developer...
GetBackorderQty
This class calculates the quantity of items that need to be backordered when a customer orders more than what's currently available in stock. Develope...
GetIsQtySalable
This class determines whether a product with a given SKU can be sold from a specific stock. It checks if the product is assigned to the stock, validat...
GetItemsToCancelFromOrderItem
This class calculates which inventory items and quantities need to be returned to stock when canceling an order item. Developers use this when impleme...
GetProductAvailableQty
This class calculates the total available quantity of a product across all enabled sources assigned to a specific stock. Developers use this service t...
GetProductSalableQty
This class calculates the salable quantity of a product for a specific stock in Magento's Multi-Source Inventory (MSI) system. It retrieves the physic...
GetSalableQty
This class calculates the salable (available for sale) quantity of a product SKU for a specific stock. It considers the physical inventory quantity, a...
GetSkuFromOrderItem
This class retrieves the correct SKU from an order item, handling special cases for different product types like bundles. Developers use this when pro...
GetStockBySalesChannel
This class retrieves the stock entity associated with a specific sales channel (like a website or store). Developers use this when they need to determ...
GetStockBySalesChannelCache
This class acts as a caching layer for retrieving stock information by sales channel in Magento's Multi-Source Inventory (MSI). It stores stock data k...
GetUnassignedSalesChannelsForStock
This class identifies sales channels (websites) that are being removed from a stock. When a stock's sales channel assignments are updated, this servic...
IsProductSalableCondition\BackOrderCondition
This class checks if a product can be sold based on backorder settings. Developers use this condition as part of the product salability check to deter...
IsProductSalableCondition\BackOrderNotifyCustomerCondition
This class checks if a product can be sold when backorders are enabled with customer notification. It validates if the requested quantity exceeds avai...
IsProductSalableCondition\IsAnySourceItemInStockCondition
This class determines if a product is salable by checking if any of its source items are in stock for a given stock ID. Developers use this as a condi...
IsProductSalableCondition\IsProductSalableConditionChain
This class acts as a chain of responsibility pattern for determining if a product can be sold from a specific stock. Developers use this to extend pro...
IsProductSalableCondition\IsSalableWithReservationsCondition
This class determines whether a product is available for sale by checking its quantity including reservations (pending orders) against a specific stoc...
IsProductSalableCondition\IsSetInStockStatusForCompositeProductCondition
This class determines if a composite product (like configurable or bundle products) is salable by checking its stock status. It returns true if source...
IsProductSalableCondition\ManageStockCondition
This class determines if a product should be considered salable based on whether stock management is disabled for it. When stock management is turned...
IsProductSalableForRequestedQtyCondition\BackOrderCondition
This class checks if a product can be sold in the requested quantity when backorders are configured. It validates whether backorders are enabled for a...
IsProductSalableForRequestedQtyCondition\IsAnySourceItemInStockCondition
This class checks if a product has any source items that are in stock for a requested quantity. It's used as a condition in the salability check proce...
IsProductSalableForRequestedQtyCondition\IsCorrectQtyCondition
This class validates whether a requested product quantity meets all configured quantity rules before a product can be added to cart. Developers would...
IsProductSalableForRequestedQtyCondition\IsProductSalableForRequestedQtyConditionChain
This class implements a chain of responsibility pattern to determine if a product can be sold in a requested quantity from a specific stock. Developer...
IsProductSalableForRequestedQtyCondition\IsSalableWithReservationsCondition
This class validates whether a product has sufficient quantity available for purchase by checking stock levels including reservations. Developers use...
IsProductSalableForRequestedQtyCondition\ManageStockCondition
This class validates whether a product can be sold for a requested quantity based on the 'Manage Stock' configuration setting. Developers use this as...
IsProductSalableForRequestedQtyCondition\ProductSalabilityError
This class represents an error object that describes why a product cannot be sold in the requested quantity. Developers use this class when implementi...
IsProductSalableForRequestedQtyCondition\ProductSalableResult
This class represents the result of checking whether a product can be sold for a requested quantity in Magento's Multi-Source Inventory (MSI) system....
IsProductSalableForRequestedQtyRequest
This class is a data transfer object (DTO) that encapsulates a request to check if a specific quantity of a product is available for sale. Developers...
IsProductSalableForRequestedQtyResult
This class represents the result of checking whether a product can be sold in a requested quantity. It encapsulates the product SKU, stock ID, salabil...
IsProductSalableResult
This class represents the result of checking whether a product is salable (available for sale) in Magento's Multi-Source Inventory system. Developers...
ItemToSell
This class represents an item being sold in Magento's Multi-Source Inventory (MSI) system. Developers use it to encapsulate product SKU and quantity i...
PlaceReservationsForSalesEvent
This class creates and places inventory reservations when sales events occur (like order placement). Developers use this to ensure inventory quantitie...
ReservationExecution
This class determines whether inventory reservations should be deferred (delayed) when processing orders. Developers would use this to control when in...
ResourceModel\DeleteReservationsBySkus
This class removes inventory reservations from the database for specified product SKUs. Developers would use this when they need to clean up or cancel...
ResourceModel\DeleteSalesChannelToStockLink
This class removes the link between a sales channel (like a website or store) and an inventory stock in Magento's Multi-Source Inventory system. Devel...
ResourceModel\GetAssignedSalesChannelsDataForStock
This class retrieves all sales channels (e.g., websites, stores) that are assigned to a specific inventory stock in Magento's Multi-Source Inventory (...
ResourceModel\GetAssignedStockIdForWebsite
This class retrieves the assigned stock ID for a given website in Magento's Multi-Source Inventory (MSI) system. Developers use this when they need to...
ResourceModel\GetAssignedStockIdForWebsiteCache
This class provides cached access to stock ID assignments for websites in Magento's Multi-Source Inventory system. It wraps the GetAssignedStockIdForW...
ResourceModel\GetIsAnySourceItemInStock
This class checks if a product (identified by SKU) has any inventory source items that are in stock for a specific stock/sales channel. Developers wou...
ResourceModel\GetStockItemData
This class serves as a placeholder implementation for retrieving stock item data by SKU and stock ID in Magento's Multi-Source Inventory system. Devel...
ResourceModel\GetWebsiteCodeByWebsiteId
This class retrieves a website code from the database using a website ID. Developers would use this when they need to convert a numeric website ID int...
ResourceModel\GetWebsiteIdByWebsiteCode
This class retrieves a website ID from the database using a website code as the lookup parameter. Developers use this when they need to convert a webs...
ResourceModel\IsStockItemSalableCondition\BackordersCondition
This class builds SQL conditions to determine if a product can be sold when backorders are enabled. Developers use this when checking product salabili...
ResourceModel\IsStockItemSalableCondition\IsStockItemSalableConditionChain
This class acts as a chain of responsibility pattern to determine if a stock item is salable by combining multiple conditions. Developers would use th...
ResourceModel\IsStockItemSalableCondition\ManageStockCondition
This class generates SQL conditions to determine if stock management should be considered when checking product salability. It checks both product-lev...
ResourceModel\IsStockItemSalableCondition\MinQtyStockCondition
This class generates a SQL condition to determine if a product has sufficient stock quantity above the configured minimum threshold to be considered s...
ResourceModel\IsStockItemSalableCondition\MinQtyStockWithReservationsCondition
This class implements a salability condition that determines if a product is available for sale by checking if the available quantity (stock minus res...
ResourceModel\IsStockItemSalableCondition\ReservationsCondition
This class generates a SQL condition to check if a product is salable by considering both physical inventory and reservations (pending orders). It ens...
ResourceModel\IsStockItemSalableCondition\SkuIsAbsentInCatalogCondition
This class provides a condition to check if a product SKU is absent from the catalog_product_entity table when building the stock item salability inde...
ResourceModel\ReplaceSalesChannelsDataForStock
This class replaces all sales channel assignments for a given stock in the inventory system. Developers use it when they need to update which sales ch...
ResourceModel\StockIdResolver
This resource model resolves and retrieves the stock ID associated with a specific sales channel (like a website or store). Developers use this class...
ResourceModel\UpdateReservationsBySkus
This class handles updating inventory reservation records when a product's SKU changes in Magento 2. Developers use this when implementing SKU changes...
ResourceModel\UpdateSalesChannelWebsiteCode
This class updates website codes in the inventory stock sales channel table when a website's code is changed in Magento. It's used internally by a plu...
ReturnProcessor\DeductSourceItemQuantityOnRefund
This class handles inventory deduction when processing credit memo refunds in Magento 2's Multi-Source Inventory (MSI) system. When a customer receive...
ReturnProcessor\GetInvoicedItemsPerSourceByPriority
This class determines which inventory source should receive returned products based on source priority when processing order returns or credit memos....
ReturnProcessor\GetSalesChannelForOrder
This class retrieves the sales channel information (website type and code) for a given order, primarily used during return/refund processing. Develope...
ReturnProcessor\GetSourceDeductionRequestFromSourceSelection
This class converts source selection results into source deduction requests during the return/credit memo process in Magento's Multi-Source Inventory...
ReturnProcessor\GetSourceSelectionResultFromCreditMemoItems
This class determines which inventory sources should receive returned products when processing a credit memo in Magento's Multi-Source Inventory (MSI)...
ReturnProcessor\ProcessRefundItems
This class handles the inventory management process when creating credit memos (refunds) in Magento 2. It determines how refunded product quantities s...
ReturnProcessor\Request\ItemsToRefund
This class represents a data transfer object (DTO) for items that need to be refunded during a return process in Magento's Multi-Source Inventory (MSI...
SalesChannel
This class represents a sales channel entity in Magento's Multi-Source Inventory (MSI) system. Developers use it to identify and manage different sale...
SalesEvent
This class represents a sales event in Magento's Multi-Source Inventory (MSI) system. It captures information about inventory-related sales activities...
SalesEventToArrayConverter
This class converts SalesEventInterface objects into array format suitable for JSON serialization. Developers use this when they need to transform sal...
StockByWebsiteIdResolver
This class resolves which inventory stock is assigned to a specific website by its ID. Developers use this when they need to determine the correct sto...
StockResolver
This class resolves which inventory stock is associated with a specific sales channel (like a website or store view). Developers use this when they ne...
Stock\Validator\SalesChannelsValidator
This validator ensures that sales channels assigned to inventory stocks have valid type and code values, and that website-type channels reference exis...