erp magento2 - boost my shopdocumentation.boostmyshop.com/erp_magento2.pdf · from magento version...

16
erp_magento2 version BoostMyShop février 14, 2020

Upload: others

Post on 14-Mar-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

erp_magento2

version

BoostMyShop

février 14, 2020

Page 2: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded
Page 3: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded
Page 4: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

ContentsEmbedded ERP for Magento2 1

1. Overview 1

2. Installation 1

Installation & Upgrade 2

Installation 2

Upgrade 3

Uninstallation 3

Disable modules 3

Delete tables in database 4

Reset ERP data 4

3. Initialization - Base configuration 5

1. Stock initialization & correction 5

2. Inventory Management & Warehouses 5

3. Procurement 5

4. Order preparation 5

5. Product availability status & Front End 6

4. Inventory 6

5. Order Preparation 6

6. Procurement 6

7. Product Availability Status 6

Configuration 7

General 7

In stock 7

Label 7

Css class 7

Back order 7

Use expected PO ETA 7

Expected PO label 7

Use supplier lead time 7

Ranges for lead time 8

Label 8

Out of stock 8

Label 8

Use expected PO ETA 8

Expected PO label 8

Css class 8

8. Organizer 8

99. FAQ 10

1. Incompatibility with Magento version 2.3.x 10

2. Some tabs disappeared in ERP products view and orders view 10

Page 5: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

3. Check the installed version of ERP 10

4. Translate ERP modules 11

5. ERP Dashboard is empty 11

6. Magento setup:upgrade command doesn’t complete 11

Page 6: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded
Page 7: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

Embedded ERP for Magento2

1. Overview

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.

Embedded ERP Magento 2 brings to e Commerce website a unique and efficient management tool for inventorymanagement, suppliers management and order preparation.

Access all features directly from the Magento 2 management console. No Sync, no call to an external software orthird party service is required.

All functions are embedded in Embedded ERP Magento 2 offering the merchant a valuable time for effectivemanagement of all of its data and its flow.

2. Installation

Embedded ERP for Magento2

1

Page 8: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

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 & Upgrade

Installation

To install correctly ERP 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, then all ERP modules folders should be visible in directoryapp/code/BoostMyShop/.

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

php bin/magento module:enable BoostMyShop_AdvancedStockphp bin/magento module:enable BoostMyShop_OrderPreparationphp bin/magento module:enable BoostMyShop_Supplierphp bin/magento module:enable BoostMyShop_AvailabilityStatusphp bin/magento module:enable BoostMyShop_UltimateReportphp bin/magento module:enable BoostMyShop_Organizerphp bin/magento module:enable BoostMyShop_Marginphp bin/magento module:enable BoostMyShop_Erp

php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deployphp bin/magento bms_advancedstock:flush_stock_indexphp bin/magento indexer:reindexphp bin/magento cache:flush

Note

These commands will install the module in Magento.

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

Embedded ERP for Magento2

2

Page 9: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

php bin/magento bms_advancedstock:refresh_quantity_to_shipphp bin/magento bms_advancedstock:refresh_sales_historyphp bin/magento bms_advancedstock:refresh_sellable_quantityphp bin/magento bms_advancedstock:check_stock_discrepencies --fixphp bin/magento bms_advancedstock:check_stock_discrepenciesphp bin/magento bms_advancedstock:flush_stock_indexphp bin/magento indexer:reindex cataloginventory_stock

Note

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

Warning

Once ERP is installed, two Magento configuration options need to be set to “No” to ensure good stockmanagement 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.

Simply upload the new version files on your server, then run all the installation command lines, except the ones usedto enable all ERP modules as they will be already enabled.

UninstallationERP uninstallation will be processed in a few steps.

First, you will have to disable all its modules and restore 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_AdvancedStockphp bin/magento module:disable BoostMyShop_OrderPreparationphp bin/magento module:disable BoostMyShop_Supplierphp bin/magento module:disable BoostMyShop_AvailabilityStatusphp bin/magento module:disable BoostMyShop_UltimateReportphp bin/magento module:disable BoostMyShop_Organizerphp bin/magento module:disable BoostMyShop_Marginphp bin/magento module:disable BoostMyShop_Erp

Embedded ERP for Magento2

3

Page 10: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

Warning

Once ERP has been uninstalled, two Magento configuration options need to be set back to “Yes” to ensure goodMagento 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

Delete tables in 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 dataIn order to reset all ERP 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 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;

Embedded ERP for Magento2

4

Page 11: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

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_quantityphp bin/magento bms_advancedstock:check_stock_discrepencies --fix

3. Initialization - Base configuration

1. Stock initialization & correction

• Inventory Management command lines

• Stock discrepancies

2. Inventory Management & Warehouses

• Attributes configuration

• Pending orders configuration

• Warehouses general configuration

• Warehouses routing

3. Procurement

• Attributes : Stores > Configuration > Procurement > General > Attributes

• Supply needs :ERP > Warehouses > [Edit each warehouse] > [Check "supply needs" options]

• PDF adjustement : Stores > Configuration > Procurement > General > PDF

• Purchase orders : Stores > Configuration > Procurement > General > Purchase Orders

• Suppliers configuration

• Product/Supplier association

4. Order preparation

• Attributes

• Preparation steps

3. Initialization - Base configuration

5

Page 12: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

• Order statuses mapping

• Picking

5. Product availability status & Front End

• General configuration :Stores > Configuration > Procurement > General > Product availability status

• Front end configuration : Stores > Configuration > Inventory Management > Front end

4. InventoryThe Inventory Management documentation is available here : InventoryManagement

5. Order PreparationThe Order Preparation documentation is available here : OrderPreparation

6. ProcurementThe Procurement documentation is available here : Procurement

7. Product Availability StatusThe Product Availability Status module is part of the Embedded ERP package and provides features to display someadvanced availability messages on the website front end.

It’s compatible with all simple, virtual and configurable products.

Note

You can apply custom CSS styles to customize the look & feel of availability messages displayed.

The module CSS stylesheet can be found at :app/code/BoostMyShop/AvailabilityStatus/view/frontend/web/css/style.css

Here’s an availability message example :

4. Inventory

6

Page 13: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

ConfigurationThe configuration is available from menu Stores > Configuration > Product Availability Status.

General

From this section you can enable or disable the display of the availability message on each product front end page.

Warning

It’s also recommended to disable Magento option “Store > Configuration > Catalog > Inventory > DisplayProducts Availability in Stock on Storefront”, else you’ll have two availability messages displayed on the websitefrontend : Magento & ERP ones.

In stock

Here you control what message is displayed when the product is AVAILABLE in one of the warehouse available forsales for the current website :

Label

Contains the text to display (you can configure this text by store view to handle translations)

Css class

You can use custom css class to control the look and feel of the message

Back order

This message is displayed when the product is NOT AVAILABLE in one of the warehouse available for sales ANDthe backorder is enabled for the product.

Depending of the context, several options are available :

Use expected PO ETA

If you enable this option and a Purchase Order is expected for the product, then the system displays the messageconfigured in the next setting

Expected PO label

Here you can customize the message displayed when a purchase order is expected for the product. You can usecodes m / d / y to include the month / day / year in your message. For instance, if the PO ETA is 2017-05-23, thenusing pattern “Back in stock at {m}/{y}” will print message “Back in stock at 05/2017”

Use supplier lead time

If you don’t want to use puchase orders ETA or if no PO is expected for the product, you can use the lead timedefined at supplier level to calculate the availability message.

Note

Lead time for supplier can be edited in the Supplier view > Settings > Shipping delay

To calculate the lead time for a product, ERP collects all suppliers associated to the product and then selects theprimary one (or first one if there is no primary supplier).

4. Inventory

7

Page 14: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

Ranges for lead time

Once the lead time is known for the product, you can display different messages based on the lead time, usingranges.

For instance, the following configurations will display:

• “Available under 1 week” if the lead time is between 1 and 7

• “Available under 1 month” if the lead time is between 8 and 30

Label

The default label is used if there is no PO expected for the product AND no range for lead time.

Out of stock

Here you control what message is displayed when the product is out of stock (not sellable) for the current website :

Label

Contains the text to display (you can configure this text by store view to handle translations)

Use expected PO ETA

If you enable this option and if there is a Purchase Order with the ‘expected’ status for the product, then the systemdisplays the message configured in the ‘Expected PO label’ settings

Expected PO label

Here you can customize the message displayed when a purchase order is expected for the product. You can usecodes m / d / y to include the month / day / year in your message. For instance, if the PO ETA is 2017-05-23, thenusing pattern “Back in stock at {m}/{y}” will print message “Back in stock at 05/2017”

Css class

You can use custom css class to control the look and feel of the message

8. OrganizerThe Organizer is a task / note manager.

The main screen is available at Embedded ERP > Organizer

8. Organizer

8

Page 15: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

From this screen, you can add a new “organizer” using the “Add New” button, and you can also edit an existing oneby clicking on the “pen” icon from the Action column.

An organizer can be associated to different Magento and ERP objects:

• Orders (Sales > Orders)

• Suppliers (ERP > Suppliers)

• Purchase Orders (ERP > Purchase Orders)

• Supplier Invoices (ERP > Supplier Invoices)

• Stock transfer (ERP > Stock Transfer)

• Stock Take (ERP > Stock Take)

If an organizer is associated with one of these objects. You’ll find an “info” icon on the dedicated grid.

In our example, the organizer is associated to the Magento order #000000006.

8. Organizer

9

Page 16: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

Note

If you place your mouse cursor on the “info” icon, the organizer comment is displayed in a tooltip

Note

An organizer associated to a Magento order will also be displayed in the “Prepare orders” screen during the“Packing” step

99. FAQ

1. Incompatibility with Magento version 2.3.xERP is compatible with Magento version 2.3.0 since its version 1.3.4.

If you’ve got a lower version, please update it to the last one available.

Also, Magento released their own inventory management system through version 2.3.0.

This system called ‘MSI’ is not compatible with our ERP stock management system.

That means if you want to make ERP work on version 2.3.0, you will have to disable all modules part of the MSIsystem.

You can find a way to disable them all through CLI command lines in the Magento developer documentation, pleasecheck the following link : Disable Inventory Management

2. Some tabs disappeared in ERP products view and orders view

Note

This has been fixed in ERP, since version 1.4.2.

Due to a know bug of the new versions of Magento 2, some tabs added by ERP will not be visible anymore after aMagento upgrade.

The solution to solve it is the following :

• Open the file : /vendor/magento/module-backend/Block/Widget/Tabs.php

• Change the following line (should be around line 302, in function applyTabsCorrectOrder) :

$positionFactor = 1;

• By this one :

$positionFactor += 1;

3. Check the installed version of ERPIf you want to check which ERP version is currently installed on your server, there is a simple way to do it :

• Edit the file app/code/BoostMyShop/Erp/composer.json

• Check line 5 : "version": XXX, where “XXX” will be the version currently installed.

99. FAQ

10

Page 17: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

4. Translate ERP modulesYou can translate any Magento 2 module creating the appropriate CSV file, where all translations will be written.

By default, we provide French translations for each module of ERP.

Depending of the module, here are locations of CSV file containing translations :

• Advanced Stock : app/code/BoostMyShop/AdvancedStock/i18n/

• Availability Status : not translated yet

• Erp : app/code/BoostMyShop/Erp/i18n/

• Order Preparation : app/code/BoostMyShop/OrderPreparation/i18n/

• Organizer : app/code/BoostMyShop/Organizer/i18n/

• Supplier : app/code/BoostMyShop/Supplier/i18n/

• Ultimate Report : not translated yet

You can add translations for your own language by adding a CSV file intoapp/code/BoostMyShop/MODULE_NAME/i18n/ folder, naming the file with the abraviation corresponding to yourlanguage (ex : for French language, files have to be named fr_FR.csv).

5. ERP Dashboard is emptyIt can happen that when you go into menu Embedded ERP > Dashboard, the screen displayed contains emptydashboards, even if you should have data displayed in it.

In this case, if you open your internet browser console, you should see the following error displayed :

To correct it, you will need to disable the option “Minify Javascript files” which is not compatible with our ERPdashboards.

This option is available from Stores > Configuration > Advanced > Developer > JavaScript Settings > Minify JavaScript Files.

6. Magento setup:upgrade command doesn’t completeDuring the update/installation of Embbeded ERP extension, it can happen that Magento setup:upgrade get stuckduring the Supplier module update.

You can resolve this situation modifying this file :app/code/BoostMyShop/Supplier/Setup/UpgradeData.php

Then, comment this part of the code, located between line 88 and line 107 :

if (version_compare($context->getVersion(), '0.0.32') < 0){ try { $this->_state->setAreaCode('adminhtml'); } catch(\Exception $ex)

99. FAQ

11

Page 18: erp magento2 - Boost My Shopdocumentation.boostmyshop.com/erp_magento2.pdf · From Magento version 2.3, Magento Multi-Sources Inventory modules are installed and enabled. Our Embedded

{ //nothing, just mean that area code is already set }

//init default value for supply_discontinued $productIds = $this->_productCollectionFactory->create()->getAllIds(); $arrays = array_chunk($productIds, 200); foreach($arrays as $array) { $this->_productAction->updateAttributes($array, ['supply_discontinued' => 0], 0); }

}

This should resolve the issue and helps the setup:upgrade command to complete correctly.

Then, once the module has been correctly updated, installed, you’ll have to execute manually what this section ofcode was supposed to do.

To do it, go into grid ERP > Products.

Then, select all your products, and use massaction “Set product as not discontinued” :

Note

If you get a timeout error doing this, that means you are trying to update the discontinued attribute on too manyproducts at the same time.

Simply select less products to process and try again.

99. FAQ

12