23

There are 3 options: Option 1 - Disable via module:disable This command will list and disable all the MSI modules. php bin/magento module:status | grep Magento_Inventory | grep -v List | grep -v None | grep -v -e '^$' | xargs php bin/magento module:disable php bin/magento s:upgrade php bin/magento s:s:deploy -f php bin/magento c:flush php bin/magento i:...


20

To disable the MSI it's best to do it from command line by running this command in the magento root: php bin/magento module:disable -f Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales Magento_InventoryCatalogAdminUi ...


12

Magento Sources Sources represent locations storing and shipping available product stock. Any location with available stock and capable of order fulfillment can be added as a source. These locations can include warehouses, brick-and-mortar stores, distribution centers, and drop shippers. All stores begin with a default source that must remain enabled. ...


8

Simple solution if you are not planning to use MSI you can simply disable all modules related to it by using below php bin/magento module:disable -f Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales ...


6

$sourceItemsBySku = $this->getSourceItemsBySku->execute($product->getSku()); $config['stockData'][$productId] = []; foreach ($sourceItemsBySku as $sourceItem) { $source = $sourceItem->getSourceCode(); $quantity = $sourceItem->getQuantity(); $config['stockData'][$productId][$source] = $quantity; }


6

To get instock product collection. include catalogInventory stock helper class protected $stockFilter; public function __construct( \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productsCollectionFactory, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\...


5

Try following way: use Magento\Framework\Api\SearchCriteriaBuilderFactory; use Magento\InventoryApi\Api\SourceRepositoryInterface; /** * @var SourceRepositoryInterface */ private $sourceRepository; /** * @var SearchCriteriaBuilderFactory */ private $searchCriteriaBuilderFactory; /** * Place constructor. * * @param SourceRepositoryInterface $...


4

You're not the only retailer with this issue. After spending some considerable time I've come across quick a few different threads with many others dealing with this issue in some way or another. What we really need is to revert back to a behavior like Magento 2.2 where stock qty is also the saleable qty. There are two issues at play here for stores using an ...


3

you no need to use Product collection for the purposes you mentioned. You can apply filtering on the level of SourceItemRepository (\Magento\InventoryApi\Api\SourceItemRepositoryInterface::getList) https://github.com/magento-engcom/msi/blob/2.3-develop/app/code/Magento/InventoryApi/Api/SourceItemRepositoryInterface.php#L43 In the search criteria which is ...


3

Add an after plugin to \Magento\InventoryApi\Api\SourceItemsSaveInterface::execute API


3

I did below as a solution: use Magento\Inventory\Model\ResourceModel\Source\Collection as InventoryCollection; use Magento\Framework\Api\SortOrderBuilder; use Magento\InventoryApi\Api\GetStockSourceLinksInterface; use Magento\InventoryApi\Api\Data\StockSourceLinkInterface; use Magento\InventoryApi\Api\Data\SourceInterface; use Magento\Framework\App\...


3

Try this code. It worked for me. use Magento\Framework\Api\SearchCriteriaBuilderFactory; use Magento\InventoryApi\Api\SourceRepositoryInterface; /** * @var SourceRepositoryInterface */ private $sourceRepository; /** * @var SearchCriteriaBuilderFactory */ private $searchCriteriaBuilderFactory; /** * Place constructor. * * @param SourceRepositoryInterface $...


3

Try this, it's working for me. global $objectManager; $sourceList = $objectManager->get('\Magento\Inventory\Model\ResourceModel\Source\Collection'); $sourceListArr = $sourceList->load(); $i=1; $sourceList = array(); foreach ($sourceListArr as $sourceItemName) { $sourceCode = $sourceItemName->getSourceCode(); $sourceName = $sourceItemName->...


3

Can you please set stock data this way in Magento 2.3 Also please inject product and productRepository like following $_product->setStockData( [ 'use_config_manage_stock' => 0, 'qty' => $productData['stock'], 'is_qty_decimal' => 0, 'manage_stock' => 1, 'is_in_stock' => $productData['is_in_stock'...


3

2.3 introduced a view table Run this on your db CREATE OR REPLACE VIEW `inventory_stock_1` AS select distinct `legacy_stock_status`.`product_id` AS `product_id`, `legacy_stock_status`.`website_id` AS `website_id`, `legacy_stock_status`.`stock_id` AS `stock_id`, `legacy_stock_status`.`qty` AS `quantity`, `legacy_stock_status`.`...


2

Try to change the search engine value in the admin configuration by following the below steps Choose Stores-> Configuration -> Catalog -> Catalog Search Choose MYSQL value in the Search Engine dropdown Save config and flush cache


2

You need to use Source Item management APIs: https://devdocs.magento.com/guides/v2.3/rest/modules/inventory/manage-source-items.html For example, to retrieve all Quantities among all Sources where SKU = new_product2 located you can do with next REST request: GET /V1/inventory/source-items?searchCriteria[filter_groups][0][filters][0][field]=sku&...


2

Is there some particular reason why do you want to install Magento 2.3 without MSI? Because MSI it's not just Multi-Sourcing, but it's a brand new Inventory mechanism which in 2.4 will fully substitute CatalogInventory, which is already deprecated since 2.3.0


2

I have found after debug and research we need to run query on database. ALTER DEFINER=user@localhost VIEW inventory_stock_1 AS select distinct legacy_stock_status.product_id AS product_id,legacy_stock_status.website_id AS website_id,legacy_stock_status.stock_id AS stock_id,legacy_stock_status.qty AS quantity,legacy_stock_status.stock_status AS is_salable,...


2

As you've already implemented extension_attributes here's how you can save it. You need to observe controller_action_inventory_populate_source_with_data and get value of your field as below: $request = $observer->getEvent()->getRequest(); $requestData = $request->getParam('general', []); $type = $requestData['type']; ...


2

Maybe you had fixed this, if not check the CLI commands to check and resolve reservation inconsistencies. https://github.com/magento/inventory/wiki/CLI-Reference


2

Many of the magento developers want to know how to disable the MSI inventory module from there setup. Please note that the MSI module is newly introduced since version 2.3.0. One can read the below article on it. https://devdocs.magento.com/guides/v2.3/inventory/ But today lets see how to disable this inventory module in Magento version 2.3.0. This can be ...


2

Try to run the below command and check if it works! php bin/magento module:disable -f Magento_Inventory Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales Magento_InventoryCatalogAdminUi Magento_InventoryCatalogApi Magento_InventoryCatalogSearch ...


2

you can use \Magento\InventoryApi\Api\SourceItemRepositoryInterface class with \Magento\Framework\Api\SearchCriteriaBuilder to get source item data by source code and product SKU. Here are the sample model class <?php namespace Mageprince\Testing\Model; class SourceItemModel { private $searchCriteriaBuilder; private $sourceItemRepository; ...


2

You can create an inventory source via an UpgradeData.php script, I'm not sure how familiar you are with upgrade scripts, but there's plenty of documentation and tutorials around that, so I'll just list the upgrade script part. namespace VENDOR\MODULE_NAME\Setup; use Magento\Framework\Setup\UpgradeDataInterface; use Magento\Framework\Setup\...


1

The solution was to disable Magento MSI completely. https://www.mexbs.com/magento-blog/disabling-the-magento-msi/


1

This depends on your seller's logic for fairly simple logic where only 1 source is assigned to each website and no fallback is required try { $orderShipment->getExtensionAttributes() ->setSourceCode( array_reduce( /* @var \Magento\Inventory\Model\Source\Command\...


1

To save this you have to create extension attribute for your entity. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/attributes.html Check above to know how to create those. Than you can use in observer like, setter and getter methods like getDeliveryTime and setDeliveryTime. Hope it will help to solve your issue.


1

You could use my below script to remove Stock sources from all products. It loops through all products, and removes the stock source you enter in the foreach loop. file: pub/RemoveStock.php <?php if(php_sapi_name() !== 'cli') { echo 'You shall not pass!'; } error_reporting(E_ALL); ini_set('display_errors', 1); use Magento\Framework\App\Bootstrap; ...


1

After debug and clearing all test data issue was still there. After that I've disabled 3rd party modules and came to know that it's caused by Premium ERP. :(


Only top voted, non community-wiki answers of a minimum length are eligible