PHPackages                             patrick-blom/article-limit-per-order - 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. patrick-blom/article-limit-per-order

ActiveOxideshop-module

patrick-blom/article-limit-per-order
====================================

This module extends the article structure with the maximum order amount of a single article. This amount can not be exceeded per order.

1.0.0(5y ago)19GPL-3.0-onlyPHPPHP &gt;=7.1

Since Jun 29Pushed 5y ago2 watchersCompare

[ Source](https://github.com/patrick-blom/article-limit-per-order)[ Packagist](https://packagist.org/packages/patrick-blom/article-limit-per-order)[ Docs](https://www.patrick-blom.de/)[ RSS](/packages/patrick-blom-article-limit-per-order/feed)WikiDiscussions master Synced 4w ago

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

[![PHP Version](https://camo.githubusercontent.com/65c2dd08b1f15530f4c0fe6783b59aed867e32d6d38cde98ab1e2a232a49e5c4/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f7068702f7061747269636b2d626c6f6d2f61727469636c652d6c696d69742d7065722d6f726465722f3f63616368653d333030267363616c653d312e31)](https://github.com/patrick-blom/article-limit-per-order)[![Stable Version](https://camo.githubusercontent.com/36700cf91eefd5e3434e6737f697b3e763d51ef9dfee1ce215b2d4ed74837a85/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f7061747269636b2d626c6f6d2f61727469636c652d6c696d69742d7065722d6f726465722f6c61746573742f3f6c6162656c3d6c61746573742663616368653d333030267363616c653d312e31)](https://packagist.org/packages/patrick-blom/article-limit-per-order)[![Package Name](https://camo.githubusercontent.com/232e6871df0896ed2351f628c20a6122587b3a6624d448169b1829755eff4a06/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f6e616d652f7061747269636b2d626c6f6d2f61727469636c652d6c696d69742d7065722d6f726465722f3f6c6162656c3d7061636b61676973742663616368653d333030267363616c653d312e31)](https://packagist.org/packages/patrick-blom/article-limit-per-order)[![License](https://camo.githubusercontent.com/2916703f4381b950b573eed2bde119c3afa901a066250d2fc15e0595a1d415d8/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f6c6963656e73652f7061747269636b2d626c6f6d2f61727469636c652d6c696d69742d7065722d6f726465722f3f6c6162656c3d6c6963656e73652663616368653d333030267363616c653d312e31)](https://github.com/patrick-blom/article-limit-per-order/blob/master/LICENSE)[![Follow me on twitter](https://camo.githubusercontent.com/5b7e2d292b0ed651de293485cd9638af1b810b733ca259dcb5cebd8ba3cbc405/68747470733a2f2f666c61742e62616467656e2e6e65742f747769747465722f666f6c6c6f772f70626c306d2f3f6c6162656c3d4070626c306d2663616368653d333030267363616c653d312e31)](https://twitter.com/pbl0m)

Article Limit Per Order
=======================

[](#article-limit-per-order)

This module extends the article structure with the maximum order amount of a single article. This amount can not be exceeded per order.

### About the module

[](#about-the-module)

Hamster buying is not only a problem in retail stores. Many shops have the problem that people buying articles in a huge amount, especially in days of sale. To avoid that, this module adds the functionality to add a limit of maximum amounts per order process. With that functionality you can stop people from buying more items than they should. e.g. Toilette paper. This module was inspired by the COVID-19 problems retailers had, because of people started buying toilette paper like mad.

[![Image alt="preview of the module"](module-preview.png)](module-preview.png)

### Compatibility

[](#compatibility)

- The module is OXID eShop 6.2 and higher only
- The module was built and will work on the OXID eShop Community Edition
- The module should work on OXID eShop Professional Edition and OXID eShop Enterprise Edition
- The module was tested on the OXID eShop Community Edition
- The module was **not tested** on OXID eShop Professional Edition and OXID eShop Enterprise Edition

### Requirements

[](#requirements)

- OXID eShop 6.2 Community Edition (or higher)
- PHP 7.1 (or higher)

### Module installation via composer

[](#module-installation-via-composer)

#### Default installation via packagist (recommend)

[](#default-installation-via-packagist-recommend)

- add the module to your shop composer.json
    - `cd `
    - `composer require patrick-blom/article-limit-per-order`

#### Alternative installation via GitHub (manual)

[](#alternative-installation-via-github-manual)

- create a new folder called "thirdparty" with the subfolder "pb" at the shop root level (same level as the composer.json)
    - `cd `
    - `mkdir -p thirdparty/pb`
- clone the repository to the new folder
    - `git clone git@github.com:patrick-blom/article-limit-per-order.git thirdparty/pb/ArticleLimitPerOrder`
- navigate back to the shop root level and add the repository to composer.json
    - `composer config repositories.patrick-blom/article-limit-per-order path thirdparty/pb/ArticleLimitPerOrder`
- add the module to your shop composer.json
    - `composer require patrick-blom/article-limit-per-order`

#### OXID eShop module activation (identical for default &amp;&amp; alternative installation)

[](#oxid-eshop-module-activation-identical-for-default--alternative-installation)

- prepare the module configuration for eShop 6.2
    - `vendor/bin/oe-console oe:module:install-configuration source/modules/pb/ArticleLimitPerOrder/`
    - `vendor/bin/oe-console oe:module:apply-configuration`
- activate the module
    - `vendor/bin/oe-console oe:module:activate articlelimitperorder`
- regenerate the unified namespace and the views, because the module adds new database fields
    - `vendor/bin/oe-eshop-unified_namespace_generator`
    - `vendor/bin/oe-eshop-db_views_regenerate`

### Usage

[](#usage)

- After the installation and activation you will find a field called `Maximum amount per order` under:
    - `Administer Products -> Procducts -> [select a Product e.g: 1505] -> Stock (tab)`
- Add the Amount of maximum articles per order (e.g. 2 - for max two of these articles per order) and save the article
- If you want have no limit for the article enter the number 0 to the field and save the article

### Testing

[](#testing)

#### !Attention!

[](#attention)

The testing process should only be done in a development environment or CI pipeline.

#### Preparing

[](#preparing)

- Install the module as described
- Prepare the [OXID Testing Library](https://github.com/OXID-eSales/testing_library) likes described in their repository or use the [oxvm\_eshop](https://github.com/OXID-eSales/oxvm_eshop) / [docker-eshop-sdk](https://github.com/OXID-eSales/docker-eshop-sdk)
- Add `pb/ArticleAlert` to the partial module paths in your test\_config.yml (e.g: `partial_module_paths: 'pb/ArticleLimitPerOrder'`)
- Copy the `config.inc.TEST.php.dist` from the vendor module directory to your shop root and rename it to `config.inc.TEST.php`
- Adjust the settings in the `config.inc.TEST.php` to your needs (test database name, error reporting, etc)
- Modify your `config.inc.php` and ensure that the `config.inc.TEST.php` will be loaded during the tests

```
    // bottom of config.inc.php
    if (defined('OXID_PHP_UNIT')) {
        include "config.inc.TEST.php";
    }
```

#### Run tests

[](#run-tests)

- Navigate to the shop root
- Run the test using the following command: `php vendor/bin/runtests /source/modules/pb/ArticleLimitPerOrder/Tests`
- Run the coverage using the following command: `php vendor/bin/runtests-coverage /source/modules/pb/ArticleLimitPerOrder/Tests`

#### Run static analysis

[](#run-static-analysis)

- Install phpstan using `composer require --dev phpstan/phpstan`
- Run the static analysis using the following commands
    - Navigate to the ``
    - Run phpstan with arguments `vendor/bin/phpstan analyze -c source/modules/pb/ArticleLimitPerOrder/phpstan.neon`

### License

[](#license)

The module is released under GPL-3.0. For a full overview check the [LICENSE](LICENSE) file.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2139d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43344843?v=4)[elBlommo](/maintainers/patrickblom)[@PatrickBlom](https://github.com/PatrickBlom)

---

Top Contributors

[![patrick-blom](https://avatars.githubusercontent.com/u/4736591?v=4)](https://github.com/patrick-blom "patrick-blom (17 commits)")

---

Tags

OXIDmoduleslimitarticleeshoporder

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/patrick-blom-article-limit-per-order/health.svg)

```
[![Health](https://phpackages.com/badges/patrick-blom-article-limit-per-order/health.svg)](https://phpackages.com/packages/patrick-blom-article-limit-per-order)
```

PHPackages © 2026

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