DefaultStockLocationStrategy
The DefaultStockLocationStrategy was the default implementation of the StockLocationStrategy prior to the introduction of the MultiChannelStockLocationStrategy. It assumes only a single StockLocation and that all stock is allocated from that location. When more than one StockLocation or Channel is used, it will not behave as expected.
- Extends: BaseStockLocationStrategy
init
method
(injector: Injector) => getAvailableStock
method
(ctx: RequestContext, productVariantId: ID, stockLevels: StockLevel[]) => AvailableStockforAllocation
method
(ctx: RequestContext, stockLocations: StockLocation[], orderLine: OrderLine, quantity: number) => LocationWithQuantity[] | Promise<LocationWithQuantity[]>Was this chapter helpful?