# Magento 2 Associated or Linked Product Stock Update

### <span style="color: #3b82f6;">Installation and User Guide for Magento 2 Associated or Linked Product Stock Update Extension</span>

**Table of Contents**

1. [*Installation* ](#bkmrk-installation)
    - *Installation via app/code*
    - *Installation via Composer*
2. [*Configuration Settings for Associated Product* ](#bkmrk-configuration-settin)
    - *General Settings*
    - *Product Association at Product Level*
    - *Product Association for Simple Product*
    - *Product Association for Configurable/Child Product*
    - *Product Grid at Product Level*
    - *Associated or Linked Product Stock Update*
3. *[Fix Product Associations](#bkmrk-fix-product-associat)*
4. [*Import / Export* ](#bkmrk-import-%2F-export)
    - *Import*
    - *Export*

### <span style="color: #3b82f6;">Installation</span> [](#bkmrk-)

- <span style="color: #f97316;">**Installation via app/code:**</span> Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added. After the successful upload of the package, run below commands on Magento 2 root directory.
    
     ```php
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy
    ```
- <span style="color: #f97316;">**Installation via Composer:**</span> Please follow the guide provided in the below link to complete the installation via composer.

<p class="callout success">[https://docs.scommerce-mage.com/magento-2-extensions/installation-via-composer/installation-via-composer](https://docs.scommerce-mage.com/magento-2-extensions/installation-via-composer/installation-via-composer)</p>

### <span style="color: #3b82f6;">Configuration Settings for Associated Product</span> [](#bkmrk--1)

Go to **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Associated Product**

### <span style="color: #f97316;">General Settings</span> [](#bkmrk--2)

- **Enabled -** Select "Yes" or "No" to enable or disable the module.
- **License Key -** Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. If you require license keys for dev/staging sites then please email us at <support@scommerce-mage.com>.
- **Optimise Stock save** - Select "Yes" or "No". If set to "Yes" then it will optimise stock save for better performance on products with large amounts of associated products.

[![image (25).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/TOJimage-25.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/TOJimage-25.png)

- <span style="color: #f97316;">**Product Association at Product Level –**</span> You can associate products from **Admin &gt; Catalog &gt; Products &gt; Select Product &gt; Product Association &gt; Click "AddProduct".**

### <span style="color: #3b82f6;">Product Association for Simple Product</span> [](#bkmrk--4)

<span style="color: #3b82f6;">[![image (24).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-24.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-24.jpg)</span>

### <span style="color: #3b82f6;">Product Association for Configurable/Child Product</span> [](#bkmrk--6)

<span style="color: #3b82f6;">[![image (25).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-25.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-25.jpg)</span>

- <span style="color: #f97316;">**Product Grid at Product Level –**</span> You can add products from **Admin &gt; Catalog&gt; Products &gt; Select Product &gt; Product Association &gt;** Click **"Add Product" &gt; Product Grid &gt; Select Products &gt; Click "Add Selected Products".**

**[![image (26).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/4drimage-26.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/4drimage-26.png)**

- <span style="color: #f97316;">**Associated or Linked Product Stock Update -**</span> Associated product stock/quantity will be updated based on the main product, which you can see in the below screen grab. It supports multiple linking where one product can have multiple associated products.

[![image (26).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-26.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-26.jpg)

### <span style="color: #3b82f6;">Fix Product Associations</span> [](#bkmrk--11)

Product associations can be fixed to make sure the following criterias are met:-

- Same product is not associated with itself
- One product is associated with only 1 parent

To fix product associations run the command given below:-

```php
php bin/magento scommerce:associatedproducts:fixassociations -f
```

### <span style="color: #3b82f6;">Import / Export</span> [](#bkmrk--11)

#### <span style="color: #f97316;">Import</span> [](#bkmrk--12)

To import associated products go **system &gt; Data transfer &gt; Import**. Then select product association from the drop down list. You will see the importing menu opening on your screen as shown in the image below. Select the import file and add import behavior settings as per your preferences. Lastly click on check data button on the right corner of your screen.

[![image (27).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/8U6image-27.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/8U6image-27.png)

[![image (28).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/1Duimage-28.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/1Duimage-28.png)

- <span style="color: #f97316;">**Export –**</span> Go to **System &gt; Data Transfer &gt; Export**. Select product associated in the entity type dropdown list. You should see the export menu popup on your screen as shown in the image below: -

[![image (17) (1).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-17-1.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-17-1.png)

If you have a question related to this extension please check out our [**FAQ Section**](https://www.scommerce-mage.com/magento-2-associated-or-linked-product-stock-update.html#customfaq) first. If you can't find the answer you are looking for then please contact [**support@scommerce-mage.com**](mailto:core@scommerce-mage.com)**.**