PHPackages                             in-session/module-accessory-link-qty - 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. in-session/module-accessory-link-qty

ActiveMagento2-module

in-session/module-accessory-link-qty
====================================

Magento 2 custom product link type: Partlists (accessory-style) with qty attribute

1.0.4(6mo ago)001OSL-3.0PHPPHP ^8.1 || ^8.2 || ^8.3 || ^8.4

Since Aug 19Pushed 6mo agoCompare

[ Source](https://github.com/in-session/magento2-accessory-link-qty)[ Packagist](https://packagist.org/packages/in-session/module-accessory-link-qty)[ Docs](https://github.com/in-session/module-accessory-link-qty)[ RSS](/packages/in-session-module-accessory-link-qty/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (4)Used By (0)

Magento 2.4+ Accessory Link with Qty relation
=============================================

[](#magento-24-accessory-link-with-qty-relation)

Magento 2 module: Adds a custom **product link type** `partlists`, including **quantity (qty)** and **position**.
This allows you to link spare parts or accessories to a main product with the required quantity.

[![image](https://private-user-images.githubusercontent.com/16542619/479587128-239288ad-fa58-475a-8f34-693eac5802a0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUxNDk3OTksIm5iZiI6MTc3NTE0OTQ5OSwicGF0aCI6Ii8xNjU0MjYxOS80Nzk1ODcxMjgtMjM5Mjg4YWQtZmE1OC00NzVhLThmMzQtNjkzZWFjNTgwMmEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDAyVDE3MDQ1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjODFlZDM2Nzg2MjQ1NTNhZTMyMjIwY2YwMTlhZDBjYjNlNDUxZTE0N2U4NzQ2ZjIzNjE2NDQ3NTcyMjMyNjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.lO7wFzTyCgRsbpAUaBVvQGOJ3dz5adGgkGyGUzV7vKw)](https://private-user-images.githubusercontent.com/16542619/479587128-239288ad-fa58-475a-8f34-693eac5802a0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUxNDk3OTksIm5iZiI6MTc3NTE0OTQ5OSwicGF0aCI6Ii8xNjU0MjYxOS80Nzk1ODcxMjgtMjM5Mjg4YWQtZmE1OC00NzVhLThmMzQtNjkzZWFjNTgwMmEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDAyVDE3MDQ1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjODFlZDM2Nzg2MjQ1NTNhZTMyMjIwY2YwMTlhZDBjYjNlNDUxZTE0N2U4NzQ2ZjIzNjE2NDQ3NTcyMjMyNjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.lO7wFzTyCgRsbpAUaBVvQGOJ3dz5adGgkGyGUzV7vKw)---

Why would you need this module?
-------------------------------

[](#why-would-you-need-this-module)

By default, Magento only supports related, upsell, cross-sell and grouped product links.
This module adds a new link type **`partlists`** that can be used to model a *production bill of materials* (BOM).

**Example use cases:**

- You want to sell a **set** as a simple product with its own SKU and stock management,
    but still link and display the required **components** (e.g. jug, glass, spoon).
- You need a way to reflect an **ERP production bill of materials** inside Magento,
    so that each component can be managed individually while the parent product is still sold as a simple SKU.
- You want to show end customers which parts are included in a set, including required **quantities**.

---

Features
--------

[](#features)

- New product link type: `partlists`
- Quantity (`qty`) and position for each link
- Admin UI integration (tab in the product form Related Products, Up-Sells, Cross-Sells and Partlists )
- Import/Export support via CSV (`_partlists_` column)
- GraphQL support
- REST API support out of the box

---

Frontend Example (optional)
---------------------------

[](#frontend-example-optional)

The module ships with a **sample `.phtml` template** for rendering linked `partlists` products.
This is provided as a **demonstration only** and is **not intended for production use**.

- The sample block is defined in `view/frontend/layout/catalog_product_view.xml`.
- By default, it is **commented out**.
- If you want to use it, copy the block and template into your **custom theme** and adjust as needed.

**Recommendation:**
Implement your own block or UI component in your theme that consumes the `partlists` data (via GraphQL, REST API, or the Partlists domain model) and renders it in your desired design.

---

Installation
------------

[](#installation)

### Composer Installation

[](#composer-installation)

```
composer require in-session/module-accessory-link-qty
```

### Manual Installation

[](#manual-installation)

1. Create the directory: ```
    mkdir -p app/code/InSession/AccessoryLinkQty
    ```
2. Download the module code and place it in: ```
    app/code/InSession/AccessoryLinkQty

    ```

### Enable the module

[](#enable-the-module)

```
bin/magento module:enable InSession_AccessoryLinkQty
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean
```

---

Import / Export
---------------

[](#import--export)

### CSV Import

[](#csv-import)

Column name: `_partlists_`

Format per row:

```
SKU|QTY|POSITION

```

Multiple links are separated by commas:

```
sku,_partlists_
BASE-123,"MILK-JUG|2|10,LATTE-GLASS|0.2|20"

```

### CSV Export

[](#csv-export)

The export automatically writes the `_partlists_` column in the same format.

---

GraphQL Example
---------------

[](#graphql-example)

```
query {
  products(filter: { sku: { eq: "BASE-123" } }) {
    items {
      sku
      partlists {
        items {
          qty
          position
          product {
            sku
            name
            small_image { url }
          }
        }
      }
    }
  }
}
```

---

REST API
--------

[](#rest-api)

This module is fully compatible with Magento's REST API.
You can read and write `partlists` links using the standard `/V1/products/:sku/links` endpoints.

### Read partlists

[](#read-partlists)

```
GET /rest/V1/products/BASE-123/links
```

Example response excerpt:

```
[
  {
    "sku": "BASE-123",
    "link_type": "partlists",
    "linked_product_sku": "MILK-JUG",
    "position": 10,
    "extension_attributes": {
      "qty": 2
    }
  },
  {
    "sku": "BASE-123",
    "link_type": "partlists",
    "linked_product_sku": "LATTE-GLASS",
    "position": 20,
    "extension_attributes": {
      "qty": 0.2
    }
  }
]
```

### Create or update partlists

[](#create-or-update-partlists)

```
POST /rest/V1/products/BASE-123/links
```

Payload example:

```
{
  "entity": {
    "sku": "BASE-123",
    "link_type": "partlists",
    "linked_product_sku": "MILK-JUG",
    "position": 10,
    "extension_attributes": {
      "qty": 2
    }
  }
}
```

---

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance67

Regular maintenance activity

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Total

3

Last Release

191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/04a78fbd6306c19c9830740239765d3befa84583935c08a71ce242cc0267fb7c?d=identicon)[in-session](/maintainers/in-session)

---

Top Contributors

[![in-session](https://avatars.githubusercontent.com/u/16542619?v=4)](https://github.com/in-session "in-session (37 commits)")

### Embed Badge

![Health badge](/badges/in-session-module-accessory-link-qty/health.svg)

```
[![Health](https://phpackages.com/badges/in-session-module-accessory-link-qty/health.svg)](https://phpackages.com/packages/in-session-module-accessory-link-qty)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

119.1k](/packages/opengento-module-category-import-export)[loki/magento2-admin-components

N/A

151.6k5](/packages/loki-magento2-admin-components)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
