PHPackages                             magekwik/attribute-set-limit - 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. magekwik/attribute-set-limit

ActiveMagento2-module

magekwik/attribute-set-limit
============================

A Magento 2 module to enforce a maximum limit of 500 attributes per product attribute set, preventing additions via admin or API when the limit is reached.

1.0.0(9mo ago)211OSL-3.0PHPPHP &gt;=7.4

Since Aug 16Pushed 9mo agoCompare

[ Source](https://github.com/kmyprojects/Magento-2-Attribute-Set-Limit)[ Packagist](https://packagist.org/packages/magekwik/attribute-set-limit)[ RSS](/packages/magekwik-attribute-set-limit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Magekwik Attribute Set Limit for Magento 2
==========================================

[](#magekwik-attribute-set-limit-for-magento-2)

[![Module](https://camo.githubusercontent.com/7f0e8a6baecb909b9f947b74e4f89aaa25cf5b2d5273686747ff45d8b83bf8dd/68747470733a2f2f736b696c6c69636f6e732e6465762f69636f6e733f693d676974687562)](https://github.com/kmyprojects/Magento-2-Attribute-Set-Limit)

[![License](https://camo.githubusercontent.com/9bef8d8f5339553b3ab5e6c81d6f870f893e47354f2e515b9e55c9bcba0d5dea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f534c2d2d332e302d79656c6c6f773f7374796c653d666f722d7468652d6261646765)](https://opensource.org/licenses/OSL-3.0)

Overview
--------

[](#overview)

The **Magekwik Attribute Set Limit** module for Magento 2 enforces a maximum limit of 500 attributes per product attribute set. It prevents additional attributes from being assigned via the admin panel or API once the limit is reached, ensuring optimal performance and maintainability of attribute sets in large-scale Magento installations.

This module is designed for Magento 2 certified developers and store administrators who need to enforce strict governance over product attribute sets to prevent excessive complexity.

Features
--------

[](#features)

- Enforces a configurable limit of 500 attributes per product attribute set.
- Blocks attribute additions via admin panel (Stores &gt; Attributes &gt; Attribute Set) and API calls.
- Provides clear error messages when the limit is exceeded.
- Compatible with Magento Open Source and Adobe Commerce (2.4.x and later).

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

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

1. Add the module to your Magento project:

    ```
    composer require magekwik/attribute-set-limit
    ```
2. Enable the module and update the Magento setup:

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

### Manual Installation

[](#manual-installation)

1. Clone or download the repository to `app/code/Magekwik/AttributeSetLimit`.
2. Run the following commands: ```
    bin/magento module:enable Magekwik_AttributeSetLimit
    bin/magento setup:upgrade
    bin/magento cache:flush
    ```

Usage
-----

[](#usage)

Once installed, the module automatically enforces a limit of 500 attributes per product attribute set. When attempting to add attributes beyond this limit via the admin panel or API, an error message will be displayed:

> The attribute set cannot exceed 500 attributes.

### Admin Panel

[](#admin-panel)

Navigate to **Stores &gt; Attributes &gt; Attribute Set** and edit an attribute set. The module checks the total number of attributes during save operations and prevents saving if the limit is exceeded. (in example we have used 60 as limit in Configuration Section)

[![Admin Panel Screenshot](docs/ss/magento2-attribute-limit.png)](docs/ss/magento2-attribute-limit.png)

### API

[](#api)

When using the Magento API to assign attributes to a product attribute set (e.g., via `Magento\Eav\Api\AttributeManagementInterface`), the module will throw a `LocalizedException` if the limit is reached.

Configuration
-------------

[](#configuration)

The attribute limit is set to 500 by default and can be modified by updating the `MAX_ATTRIBUTES_PER_SET` constant in the following files:

- `Plugin/AttributeManagementPlugin.php`
- `Plugin/AttributeSetPlugin.php`

Ensure both constants are updated to maintain consistency.

Debugging
---------

[](#debugging)

To verify the number of attributes in an attribute set:

- **Database Query**: Run `SELECT COUNT(*) FROM eav_entity_attribute WHERE attribute_set_id = ;`.
- **Admin Panel**: Manually count attributes in the attribute set edit page.
- **Logging**: Enable logging in `Plugin/AttributeSetPlugin.php` by injecting `\Psr\Log\LoggerInterface` and logging `$totalAttributes`.

Compatibility
-------------

[](#compatibility)

- Magento Open Source: 2.4.x
- Adobe Commerce: 2.4.x
- PHP: 7.4, 8.0, 8.1

Support
-------

[](#support)

For issues, feature requests, or contributions, please visit the [GitHub repository](https://github.com/kmyprojects/Magento-2-Attribute-Set-Limit) or create an issue.

License
-------

[](#license)

This module is licensed under the [Open Software License 3.0 (OSL-3.0)](https://opensource.org/licenses/OSL-3.0).

Author
------

[](#author)

Developed by Kanaka Kishore Kandregula, a Magento 2 Certified Developer with over 10 years of experience in e-commerce solutions.

---

*Built for performance, reliability, and scalability.*

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance58

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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

275d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ac5a78170e25cd9dbe924459d0977db9a1cf2f7c958901a78906fdc6001b589?d=identicon)[support\_magekwik](/maintainers/support_magekwik)

---

Top Contributors

[![kmyprojects](https://avatars.githubusercontent.com/u/2907889?v=4)](https://github.com/kmyprojects "kmyprojects (3 commits)")

---

Tags

limitcatalogmagento2eavattribute-set

### Embed Badge

![Health badge](/badges/magekwik-attribute-set-limit/health.svg)

```
[![Health](https://phpackages.com/badges/magekwik-attribute-set-limit/health.svg)](https://phpackages.com/packages/magekwik-attribute-set-limit)
```

###  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)[swissup/module-search-mysql-legacy

Legacy mysql search for magento 2.4

10483.0k](/packages/swissup-module-search-mysql-legacy)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

69344.4k](/packages/run-as-root-magento2-prometheus-exporter)[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)

PHPackages © 2026

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