PHPackages                             skidev/order-item-attributes - 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. skidev/order-item-attributes

ActiveMagento2-module

skidev/order-item-attributes
============================

Skidev Order Item Attributes Module

1.0.0(1y ago)131MITPHPPHP &gt;=7.0.0

Since Sep 11Pushed 1y ago2 watchersCompare

[ Source](https://github.com/KarolPuczkowski/OrderItemAttributes)[ Packagist](https://packagist.org/packages/skidev/order-item-attributes)[ RSS](/packages/skidev-order-item-attributes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

SkiDev Order Item Attributes
============================

[](#skidev-order-item-attributes)

Overview
--------

[](#overview)

The SkiDev\_OrderItemAttributes Magento 2 module allows you to specify certain product attributes that should be transferred to the `sales_order_item` table when a quote is converted into an order. This enables the storage of selected product attribute values along with each order item for future reference.

Features
--------

[](#features)

- Adds a new option to the **EAV attribute model** that determines whether the attribute value should be transferred to the order item.
- Transfers specified product attributes from the **quote item** to the **order item** in JSON format.
- Supports various product attribute types such as:
    - Text attributes
    - Dropdown attributes (stores label values)
    - Multiselect attributes (stores selected option labels)

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

[](#installation)

- **1.** Clone or download this repository and place it in the app/code/SkiDev/OrderItemAttributes directory of your Magento 2 installation.
- **2.** Run the following commands to enable the module and set up the database schema:

```
bin/magento module:enable SkiDev_OrderItemAttributes
bin/magento setup:upgrade
bin/magento cache:flush

```

Schema Changes
--------------

[](#schema-changes)

This module introduces two new database columns:

- **1.** `transfer_to_order_item` in the `catalog_eav_attribute` table:
    - Type: `SMALLINT`
    - Description: Determines whether this attribute should be transferred to the order item.
- **2.** `product_attributes` in the `sales_order_item` table:
    - Type: `TEXT`
    - Description: Stores the product attributes (in JSON format) transferred from the quote item.

Functionality
-------------

[](#functionality)

### Adding Transfer-to-Order Option to Attributes

[](#adding-transfer-to-order-option-to-attributes)

In the Magento admin panel, a new option is added to the attribute creation/edit form to mark an attribute for transfer to the order item:

- When an attribute is edited in the admin, you will see a field labeled Transfer to Order Item. Selecting "Yes" will ensure that the attribute's value is transferred when the quote is converted to an order.

### Observer: Save Product Attributes to Order Item

[](#observer-save-product-attributes-to-order-item)

The module uses an observer that listens to the `sales_convert_quote_item_to_order_item` event. During the conversion from quote to order, this observer:

- **1.** Iterates through all quote items.
- **2.** For each quote item:
    - Retrieves the associated product and its attributes.
    - If an attribute has the `transfer_to_order_item` flag set to 1, its value is processed.
    - Depending on the attribute type:
        - **Text, Textarea, Date** attributes: The value is saved directly.
        - **Dropdown** attributes: The label of the selected option is saved.
        - **Multiselect** attributes: The labels of the selected options are saved as an array.
- **3.** All relevant attributes are encoded into a JSON string and stored in the `product_attributes` field in the `sales_order_item` table.

Example JSON Data Stored in Order Item
--------------------------------------

[](#example-json-data-stored-in-order-item)

The `product_attributes` field stores data in JSON format. For example:

```
{
  "color": "Red",
  "size": "Large",
  "custom_options": ["Option 1", "Option 2"]
}
```

Author
------

[](#author)

**Author Name**: Karol Puczkowski
**Email**:
**github**: [github.com/KarolPuczkowski](https://github.com/KarolPuczkowski)
You can reach out for any questions or contributions to the module.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

605d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d8c9e027ead4c8d012a8df6fa72c1672279b663fec342c2d0ff60733033f49d?d=identicon)[Karol.skidev](/maintainers/Karol.skidev)

---

Top Contributors

[![KarolPuczkowski](https://avatars.githubusercontent.com/u/61535882?v=4)](https://github.com/KarolPuczkowski "KarolPuczkowski (6 commits)")

---

Tags

magento2magento2-extensionmagento2-module

### Embed Badge

![Health badge](/badges/skidev-order-item-attributes/health.svg)

```
[![Health](https://phpackages.com/badges/skidev-order-item-attributes/health.svg)](https://phpackages.com/packages/skidev-order-item-attributes)
```

PHPackages © 2026

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