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. [Utility &amp; Helpers](/categories/utility)
4. /
5. in-session/module-accessory-link-qty

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

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

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

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

Since Aug 19Pushed 8mo 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 today

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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI4OTY1NDIsIm5iZiI6MTc4Mjg5NjI0MiwicGF0aCI6Ii8xNjU0MjYxOS80Nzk1ODcxMjgtMjM5Mjg4YWQtZmE1OC00NzVhLThmMzQtNjkzZWFjNTgwMmEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUx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lc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.9EdMn63xh2l4FBKJvC-Ru0WXr7HMM2c0UNJGmH7B-l8)---

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

33

—

LowBetter than 72% of packages

Maintenance61

Regular maintenance activity

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

245d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16542619?v=4)[in-session](/maintainers/in-session)[@in-session](https://github.com/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

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[baldwin/magento2-module-url-data-integrity-checker

Magento 2 module which can find potential url related problems in your catalog data

282822.9k](/packages/baldwin-magento2-module-url-data-integrity-checker)[opengento/module-category-import-export

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

1310.9k2](/packages/opengento-module-category-import-export)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

245.0k2](/packages/zwernemann-module-withdrawal)[angeo/module-llms-txt

Magento 2 module for AI Engine Optimization (AEO). Generates spec-compliant llms.txt and llms-full.txt per llmstxt.org standard, plus streaming JSONL for vector indexing. Multi-store, multi-website, CLI, cron, async admin UI, Page Builder-aware sanitization, customer-group pricing, atomic writes, ETag/Cache-Control, .md mirrors.

111.1k](/packages/angeo-module-llms-txt)

PHPackages © 2026

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