During the update/installation of Embbeded ERP extension, it can happen that Magento setup:upgrade
get stuck during 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) { //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 of code 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 many products at the same time.
Simply select less products to process and try again.
When the Supplier module is installed, you will find a new “Discontinued” attribute available from products pages.
If the full ERP suite is installed, this attribute will also be available from the “Attributes” tab in the ERP view of each product :
This attribute will be used in a few Supplier screens to filter products to display :
- Supply needs : Products having the discontinued attribute set to “Yes” will not be displayed at all.
- Purchase orders, “Add products” tab : This grid will be filtered by default to not display products having the discontinued attribute set to “Yes”.