PHPackages                             bdc/module-minventory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bdc/module-minventory

ActiveMagento2-module

bdc/module-minventory
=====================

BDCrops Minventory module for Magento 2 extensions.

011PHP

Since Sep 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bdcrops/module-minventory)[ Packagist](https://packagist.org/packages/bdc/module-minventory)[ RSS](/packages/bdc-module-minventory/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

BDC\_Minventory
===============

[](#bdc_minventory)

This module is used as a resupply for stock BDCrops Magento 2 extensions. Magento 2 Stock / Inventory Management, demonstrating UI grid.

Goal
----

[](#goal)

- Quick Stock / Inventory update from admin
- Easily bump up product stock in certain increments without ever getting access to other areas of the Magento admin.
- Better understanding of the adminhtml developing for the adminhtml area
- Using the listing &amp; form component

How to install &amp; upgrade BDC\_Minventory
--------------------------------------------

[](#how-to-install--upgrade-bdc_minventory)

### 1.1 Copy and paste

[](#11-copy-and-paste)

If you don't want to install via composer, you can use this way.

- Download [the latest version here](https://github.com/bdcrops/module-minventory/archive/master.zip)
- Extract `master.zip` file to `app/code/BDC/Core` ; You should create a folder path `app/code/BDC/Core` if not exist.
- Go to Magento root folder and run upgrade command line to install `BDC_Minventory`:

### 1.2 Install via composer

[](#12-install-via-composer)

We recommend you to install BDC\_Minventory module via composer. It is easy to install, update and maintaince.Run the following command in Magento 2 root folder.

```
composer config repositories.module-minventory git
https://github.com/bdcrops/module-minventory.git

composer require bdc/module-minventory:~1.0.0
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

```

#### 1.2 Upgrade

[](#12-upgrade)

```
composer update bdcrops/module-minventory
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

```

Run compile if your store in Product mode:

```
php bin/magento setup:di:compile

```

Tutorial Module Step By Step (BDCrops)
--------------------------------------

[](#tutorial-module-step-by-step-bdcrops)

- create app/code/BDC/Minventory/registration.php

```

```

- create a app/code/BDC/Minventory/etc/adminhtml/routes.xml

```

```

- create a app/code/BDC/Minventory/Controller/Adminhtml/Product.php

```

```

[![](docs/menuDash.png)](docs/menuDash.png)

- create a app/code/BDC/Minventory/etc/acl.xml

```

```

[![](docs/aclMenu.png)](docs/aclMenu.png)

- create a app/code/BDC/Minventory/view/adminhtml/layout/minventory\_product\_index.xml

```

```

- create a app/code/BDC/Minventory/view/adminhtml/layout/minventory\_product\_resupply.xml

```

```

- create a app/code/BDC/Minventory/view/adminhtml/ui\_component/minventory\_listing.xml

```

            minventory_listing.minventory_listing_data_source

        minventory_columns

            minventory_listing.minventory_listing_data_source

                entity_id

                id
                entity_id

                    All Store Views
                    Store View
                    store_id

                    resupply
                    Resupply

                            resupply_10
                            Resupply +10

                                10

                            resupply_50
                            Resupply +50

                                50

                    minventory_listing.minventory_listing.minventory_columns.actions
                    applyAction

                        resupply
                        ${ $.$data.rowIndex }

                entity_id

                textRange
                ID
                asc

                text
                SKU

                text
                SKU

                true

                select
                select
                Status

                true
                textRange
                Quantity

                entity_id

```

[![](docs/UiComponent.png)](docs/UiComponent.png)

- create a app/code/BDC/Minventory/view/adminhtml/ui\_component/minventory\_resupply\_form.xml

```

            minventory_resupply_form.minventory_resupply_form_data_source
            minventory_resupply_form.minventory_resupply_form_data_source

            tabs

                Magento_Ui/js/form/provider

                id
                entity_id

                General

                    Stock
                    true
                    text
                    input
                    true

                    +Qty
                    true
                    text
                    input
                    true

                        true
                        true

```

[![](docs/resupplyStock.png)](docs/resupplyStock.png)

- create a app/code/BDC/Minventory/Block/Adminhtml/Product/Edit/Button/Back.php

```
