cancel
Showing results for 
Search instead for 
Did you mean: 

All products 'Out of Stock' since moving host and changing store domain

SOLVED

All products 'Out of Stock' since moving host and changing store domain

Hi everyone,

 

I recently moved a development site from a test server and changed the domain name but now all of the products are showing up as out of stock.

 

What would cause this and how can I fix it?

 

The rest of the website seems to work absolutely fine.

 

Thanks,

Dan

1 ACCEPTED SOLUTION

Accepted Solutions

Re: All products 'Out of Stock' since moving host and changing store domain

Hi There

 

I am running Magento 2.3.2 and I have moved the site domain and I am facing the same issue you describe. 

 

The products are showing in stock along with the quantity in the admin side, but the front end product pages display the products as OUT OF STOCK.

 

The products were working fine before changing domains so this is not a reindex issue or a change to any setting in the magento admin confirguration.

 

To fix the issue I done the following...

 

I ran the following command to disable MSI which I found on (https://magento.stackexchange.com/questions/273156/how-to-disable-the-msi-in-magento-2-3

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 Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventoryIndexer Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryReservations Magento_InventoryReservationsApi Magento_InventoryCache Magento_InventorySalesAdminUi Magento_InventorySalesApi Magento_InventorySalesFrontendUi Magento_InventoryShipping Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventorySourceSelectionApi Magento_InventoryShippingAdminUi Magento_InventoryDistanceBasedSourceSelectionAdminUi Magento_InventoryDistanceBasedSourceSelectionApi Magento_InventoryElasticsearch Magento_InventoryExportStockApi Magento_InventoryReservationCli Magento_InventoryExportStock Magento_CatalogInventoryGraphQl Magento_InventorySetupFixtureGenerator
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex

This fixed the issue and now all my products are back in stock. Im guessing they have some new bugs in the Magento 2.3 MSI.

View solution in original post

3 REPLIES 3

Re: All products 'Out of Stock' since moving host and changing store domain

Hi @DAWS96,

 

I have no idea but I guess I could start by checking these things:

  1. Are the cronjobs running?
  2. Did you perform a full reindex?
  3. Are you using ElasticSearch?
  4. What happens if you set a bunch of products as "In stock"?

Re: All products 'Out of Stock' since moving host and changing store domain

Hi There

 

I am running Magento 2.3.2 and I have moved the site domain and I am facing the same issue you describe. 

 

The products are showing in stock along with the quantity in the admin side, but the front end product pages display the products as OUT OF STOCK.

 

The products were working fine before changing domains so this is not a reindex issue or a change to any setting in the magento admin confirguration.

 

To fix the issue I done the following...

 

I ran the following command to disable MSI which I found on (https://magento.stackexchange.com/questions/273156/how-to-disable-the-msi-in-magento-2-3

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 Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventoryIndexer Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryReservations Magento_InventoryReservationsApi Magento_InventoryCache Magento_InventorySalesAdminUi Magento_InventorySalesApi Magento_InventorySalesFrontendUi Magento_InventoryShipping Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventorySourceSelectionApi Magento_InventoryShippingAdminUi Magento_InventoryDistanceBasedSourceSelectionAdminUi Magento_InventoryDistanceBasedSourceSelectionApi Magento_InventoryElasticsearch Magento_InventoryExportStockApi Magento_InventoryReservationCli Magento_InventoryExportStock Magento_CatalogInventoryGraphQl Magento_InventorySetupFixtureGenerator
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex

This fixed the issue and now all my products are back in stock. Im guessing they have some new bugs in the Magento 2.3 MSI.

Re: All products 'Out of Stock' since moving host and changing store domain

After Disable MSI i faced this error in Product Page

 

Fatal error: Uncaught Error: Cannot instantiate interface Magento\InventorySalesApi\Api\GetProductSalableQtyInterface in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121 Stack trace: #0 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Invento...', Array) #1 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Invento...') #2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Invento...') #3 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Invento...') #4 /var/www/html/app/code/Rokanthemes/RokanBase/Helper/Data.php(57): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Invento...') #5 /var/www in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121