PHPackages                             peterbrain/magento2-salable-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. peterbrain/magento2-salable-qty

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

peterbrain/magento2-salable-qty
===============================

Display a custom message about the salable quantity on the product detail page. E.g. Only x items left! Disable the Add to cart button for products without salable quantity.

0.1.4(1y ago)360↓50%1OSL-3.0PHP

Since Feb 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/PeterBrain/magento2-salable-qty)[ Packagist](https://packagist.org/packages/peterbrain/magento2-salable-qty)[ RSS](/packages/peterbrain-magento2-salable-qty/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Magento 2 Module - SalableQty
=============================

[](#magento-2-module---salableqty)

Package name: `peterbrain/magento2-salable-qty`

- [Magento 2 Module - SalableQty](#magento-2-module---salableqty)
    - [Main Functionalities](#main-functionalities)
    - [Installation](#installation)
        - [Method 1: Composer (recommended)](#method-1-composer-recommended)
        - [Method 2: Zip file (not recommended)](#method-2-zip-file-not-recommended)
        - [Enable &amp; deploy](#enable--deploy)
    - [Usage](#usage)

Main Functionalities
--------------------

[](#main-functionalities)

- Display a custom message about the salable quantity on the product detail page.
    - Customizable message: Only x item(s) left!
    - Customizable threshold
- Display custom message for products without salable quantity. This is the case if a product quantity equals 1 and is ordered, but is not yet shipped. The default behavior of Magento 2 is to display an error message that the requested quantity is no longer available after a click on the Add to cart button. Not ideal, because this can cause confusion as the product will continue to be displayed as "in stock" until it is shipped.
    - Option to disable the Add to cart button
    - Option to show a lock symbol on the Add to Cart button
    - Customizable message: This product has been sold recently and is no longer available.

Display custom message for products with salable quantity at or below threshold: [![Display custom message for products with salable quantity at or below threshold.](https://github.com/peterbrain/magento2-salable-qty/raw/media/salable-qty_frontend-threshold.jpg?raw=true)](https://github.com/peterbrain/magento2-salable-qty/blob/media/salable-qty_frontend-threshold.jpg?raw=true)Disable Add to cart button for products without salable quantity: [![Disable Add to cart button for products without salable quantity.](https://github.com/peterbrain/magento2-salable-qty/raw/media/salable-qty_frontend-disabled.jpg?raw=true)](https://github.com/peterbrain/magento2-salable-qty/blob/media/salable-qty_frontend-disabled.jpg?raw=true)Admin configuration: [![Admin configuration](https://github.com/peterbrain/magento2-salable-qty/raw/media/salable-qty_admin.jpg?raw=true)](https://github.com/peterbrain/magento2-salable-qty/blob/media/salable-qty_admin.jpg?raw=true)

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

[](#installation)

### Method 1: Composer (recommended)

[](#method-1-composer-recommended)

```
composer require peterbrain/magento2-salable-qty
```

### Method 2: Zip file (not recommended)

[](#method-2-zip-file-not-recommended)

- Unzip the zip file in `app/code/PeterBrain`

This extension requires [PeterBrain Core](https://github.com/PeterBrain/magento2-peterbrain-core). Ensure that you have it installed prior to installing this module. Use Composer to install it automatically with this module.

### Enable &amp; deploy

[](#enable--deploy)

```
bin/magento module:enable PeterBrain_SalableQty
bin/magento setup:upgrade
bin/magento setup:static-content:deploy
bin/magento cache:flush
```

Usage
-----

[](#usage)

- Enable module output in `Stores > Configuration > PeterBrain Extensions > Salable Quantity > General Configuration`
- Set a custom message for products with salable quantity is zero
- Disable the add to cart button if salable quantity is zero
- Set a custom minimum salable quantity threshold
- Set a custom message for salable product quantity at or below the custom threshold

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance42

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

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

Every ~178 days

Total

5

Last Release

460d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82a4dff352f84e30fcf369255490dc281e9eec294691e0afef4c4a5c88443d7f?d=identicon)[PeterBrain](/maintainers/PeterBrain)

---

Top Contributors

[![PeterBrain](https://avatars.githubusercontent.com/u/3484124?v=4)](https://github.com/PeterBrain "PeterBrain (7 commits)")

---

Tags

magentomagento-2magento-extensionmagento-modulemagento2magento2-extensionmagento2-extension-freemagento2-module

### Embed Badge

![Health badge](/badges/peterbrain-magento2-salable-qty/health.svg)

```
[![Health](https://phpackages.com/badges/peterbrain-magento2-salable-qty/health.svg)](https://phpackages.com/packages/peterbrain-magento2-salable-qty)
```

###  Alternatives

[smart-crowd/simple-sms-drivers

Addition providers for simple SMS laravel package

101.0k](/packages/smart-crowd-simple-sms-drivers)

PHPackages © 2026

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