2. Installation

Warning

From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled.

Our Embedded ERP modules are not compatible with these modules.

To make it work correctly, you will need to disable them all, following Magento 2 official documentation.

Also, these modules have to be disabled to ensure a good working of Inventory Management :

  • Amasty Improved Sorting (module code : Amasty_Sorting)
  • Firebear Configurable Products (module code : Firebear_ConfigurableProducts)
  • LanthopusX List View (module code : LanthopusX_ListView)

Installation

To install correctly Inventory Management in your Magento 2, here are the steps to follow :

  1. Download the extension (provided as a ZIP archive) from your BoostMyShop account, My Downloads section.

  2. Unzip the downloaded archive, then upload extracted files to your server, into the Magento root folder.

    Note

    If files upload have been done correctly, a module folder named “AdvancedStock” should be visible in directory app/code/BoostMyShop/.

  3. Connect to your server via SSH, then run the following command lines :

    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy
    php bin/magento bms_advancedstock:flush_stock_index
    php bin/magento indexer:reindex
    php bin/magento cache:flush
    

    Note

    These commands will install the module in Magento.

  4. Once done, run these additional commands to initialize module data :

    php bin/magento bms_advancedstock:refresh_quantity_to_ship
    php bin/magento bms_advancedstock:refresh_sales_history
    php bin/magento bms_advancedstock:refresh_sellable_quantity
    php bin/magento bms_advancedstock:fix_reservation
    php bin/magento bms_advancedstock:check_stock_discrepencies --fix
    php bin/magento bms_advancedstock:check_stock_discrepencies
    php bin/magento bms_advancedstock:flush_stock_index
    php bin/magento indexer:reindex cataloginventory_stock
    

    Note

    More informations on the stock discrepencies command line : Stock Discrepancies.

Warning

Once Inventory Management has been installed, two Magento configuration options need to be set to “No” to ensure good stock management workflow.

These options are the following one :

  • Stores > Configuration > Catalog > Inventory > Stock Options > Decrease Stock When Order is Placed
  • Stores > Configuration > Catalog > Inventory > Product Stock Options > Automatically Return Credit Memo Item to Stock

Upgrade

The upgrade process is exactly the same as the installation process.

Uninstallation

Disable module

You can disable the Advanced Stock module using Magento module:disable command line via SSH :

php bin/magento module:disable BoostMyShop_AdvancedStock

Warning

Once Inventory Management has been uninstalled, two Magento configuration options need to be set back to “Yes” to ensure good Magento stock management workflow.

These options are the following one :

  • Stores > Configuration > Catalog > Inventory > Stock Options > Decrease Stock When Order is Placed
  • Stores > Configuration > Catalog > Inventory > Product Stock Options > Automatically Return Credit Memo Item to Stock

Reset data

In order to reset all Inventory Management data, please run these SQL commands in your database.

Note

Following this script execution, all product stocks will be reset to 0.

UPDATE cataloginventory_stock_item SET qty = 0;

-- Clean Inventory Management tables

TRUNCATE bms_advancedstock_extended_sales_flat_order_item;
TRUNCATE bms_advancedstock_routing_store;
TRUNCATE bms_advancedstock_routing_store_warehouse;
TRUNCATE bms_advancedstock_sales_history;
TRUNCATE bms_advancedstock_stock_movement;
TRUNCATE bms_advancedstock_transfer;
TRUNCATE bms_advancedstock_transfer_item;
TRUNCATE bms_advancedstock_warehouse;
TRUNCATE bms_advancedstock_warehouse_item;