Skip to content

Product always out of stock if "default" source = 0 #3405

Open
@vseager

Description

@vseager

Basic MSI is not working with multiple sources assigned to a single website.

Scenario
A merchant with a single online stock wished to sell products which are shipping from two warehouses or suppliers.

Preconditions (*)

  1. Magento 2.4.6-p3
  2. Singe website
  3. Multiple inventory sources
  4. Custom "Stock" contains multiple "Source" assigned to website

Steps to reproduce (*)

Set up inventory:
  1. Create two "Sources" in Stores > Inventory > Sources (eg. "Supplier 1" and "Supplier 2")
  2. Create a new "Stock" in Stores > Inventory > Stocks (eg. "Suppliers")
    1. Assign "Supplier 1" and "Supplier 2" to the new "Suppliers" stock
    2. Assign the new "Suppliers" stock to Main Website (base)

(the "default" stock is now effectively redundant)

manage_stock

Add stock for product
  1. Go to a product, assigned the sources and add stock levels for both suppliers

The "Saleable Quantity" will now show a positive amount for the "Supplier" stock group, in the below example, the available quantity is 24:

product_grid

Expected result (*)

  1. The product should be available for purchase on the frontend

Actual result (*)

  1. The product shows as out of stock:

product_page

Additional notes

  1. Adding quantty to the "Default" source enabled the product to be In Stock on the frontend (only for the amount in the default source) despite the "Default" source and stock not being associated to the website.
  2. The website was reindexed and cache flushed at various points during the above steps.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions