Magento MSI; add custom attribute to Sources in M2
Question
we want to use multiple sources using Magento Multistock MSI.
2 of our 5 stock locations are called 'virtual'. They have stock that is not readily avilable but can be sold.
OUr idea is to mark these 2 warehouse as 'virtual'. Orders based on items from these locations should inherit the 'virtual' attribute.
question: how can we add a new attribute to Magento Multistock MSI Sources and show it under Sources configuration as a two options element?
thanks, Sean
Solution
On MSI track we are going to add Source Type ExtensionAttribute to the Source entity. So that you could use that attribute when released.
While we did not release that part - you can do it by yourself. Here is Magento documentation to use - https://devdocs.magento.com/guides/v2.3/extension-dev-guide/extension_attributes/adding-attributes.html