2. Installation
From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled.
Our Embedded ERP modules are not compatible with these modules.
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)
- Magestore POS extension (module code: Magestore_Webpos)
Installation & Upgrade
Installation
To install correctly ERP in your Magento 2, here are the steps to follow :
- Download the extension (provided as a ZIP archive) from your BoostMyShop account, My Downloads section.
- Unzip the downloaded archive, then upload extracted files to your server, into the Magento root folder.
If file upload has been done correctly, then all ERP modules folders should be visible in the directory app/code/BoostMyShop/.
3. Connect to your server via SSH, and run the following command lines :
php bin/magento module:enable BoostMyShop_AdvancedStock
php bin/magento module:enable BoostMyShop_OrderPreparation
php bin/magento module:enable BoostMyShop_Supplier
php bin/magento module:enable BoostMyShop_AvailabilityStatus
php bin/magento module:enable BoostMyShop_UltimateReport
php bin/magento module:enable BoostMyShop_Organizer
php bin/magento module:enable BoostMyShop_Margin
php bin/magento module:enable BoostMyShop_ErpMagentoFix
php bin/magento module:enable BoostMyShop_Erp
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
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: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
Once ERP is installed, two Magento configuration options need to be set to “No” to ensure a good stock management workflow.
These options are the following:
- 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.
Simply upload the new version files on your server, then run all the installation command lines, except the ones used to enable all ERP modules as they will be already enabled.
Uninstallation
ERP uninstallation will be processed in a few steps.
First, you will have to disable all its modules and restore the Magento default configuration.
Then, you will be able to delete all the tables related to ERP in your database.
Disable modules
To disable all ERP modules, connect to your server via SSH, and run the following command lines :
php bin/magento module:disable BoostMyShop_AdvancedStock
php bin/magento module:disable BoostMyShop_OrderPreparation
php bin/magento module:disable BoostMyShop_Supplier
php bin/magento module:disable BoostMyShop_AvailabilityStatus
php bin/magento module:disable BoostMyShop_UltimateReport
php bin/magento module:disable BoostMyShop_Organizer
php bin/magento module:disable BoostMyShop_Margin
php bin/magento module:disable BoostMyShop_Erp
php bin/magento module:disable
BoostMyShop_ErpMagentoFix
Once ERP 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:
- 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
Delete tables in the database
In order to delete all ERP tables from your database, please run these SQL commands.
-- Remove ERP tables
DROP bms_advancedstock_extended_sales_flat_order_item;
DROP bms_advancedstock_routing_store;
DROP bms_advancedstock_routing_store_warehouse;
DROP bms_advancedstock_sales_history;
DROP bms_advancedstock_stock_movement;
DROP bms_advancedstock_transfer;
DROP bms_advancedstock_transfer_item;
DROP bms_advancedstock_warehouse;
DROP bms_advancedstock_warehouse_item;
DROP bms_orderpreparation_carrier_template;
DROP bms_orderpreparation_inprogress;
DROP bms_orderpreparation_inprogress_item;
DROP bms_supplier;
DROP bms_supplier_product;
DROP bms_purchase_order;
DROP bms_purchase_order_product;
DROP bms_purchase_order_reception;
DROP bms_purchase_order_reception_item;
Reset ERP data
In order to reset all ERP data, please run these SQL commands in your database.
Following this script execution, all product stocks will be reset to 0.
UPDATE cataloginventory_stock_item SET qty = 0;
-- Clean ERP 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;
TRUNCATE bms_orderpreparation_carrier_template;
TRUNCATE bms_orderpreparation_inprogress;
TRUNCATE bms_orderpreparation_inprogress_item;
TRUNCATE bms_supplier;
TRUNCATE bms_supplier_product;
TRUNCATE bms_purchase_order;
TRUNCATE bms_purchase_order_product;
TRUNCATE bms_purchase_order_reception;
TRUNCATE bms_purchase_order_reception_item;
Once all the SQL requests have been run, please run the following command lines via SSH :
php bin/magento bms_advancedstock:refresh_sellable_quantity
php bin/magento bms_advancedstock:check_stock_discrepencies --fix