# Magento 2 Custom Stock Status Extension

### <span style="color: #3b82f6;">Installation and User Guide for Magento 2 Custom Stock Status Extension</span>

**Table of Contents**

1. [*Installation* ](#bkmrk-installation)
    - *Installation via app/code*
    - *Installation via Composer*
2. [*Configuration Settings for Custom Stock Status* ](#bkmrk-configuration-settin)
    - *General Settings*
    - *Stock Status Rules Grid*
    - *Add New Rule*
    - *Custom Stock Status and Rule Name at Product Level*
    - *Salable Quantity*
    - *Assign Custom Stock Status Rule to Products Automatically or Manually*
    - *Manually*
    - *Automatically on Cron Run*
    - *Multi Websites Selection*
    - *Custom Stock Status Product Attribute*
3. [*Front-end Site View* ](#bkmrk-front-end-site-view)
    - *Custom Stock Message for Simple Products on the Product Page*
    - *Custom Stock Message for Configurable Products on the Product Page*
    - *Custom Stock Message on the Cart &amp; Checkout Pages*
    - *Custom Stock Message on Related, Cross-sells and Up-sells Products*
    - *Status Message in the Order Confirmation Email*

### <span style="color: #3b82f6;">Installation</span> [](#bkmrk-)

- <span style="color: #f97316;">**Installation via app/code:**</span> Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added. After the successful upload of the package, run below commands on Magento 2 root directory.
    
     ```php
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy
    ```
- <span style="color: #f97316;">**Installation via Composer:**</span> Please follow the guide provided in the below link to complete the installation via composer.

<p class="callout success">[https://docs.scommerce-mage.com/magento-2-extensions/installation-via-composer/installation-via-composer](https://docs.scommerce-mage.com/magento-2-extensions/installation-via-composer/installation-via-composer)</p>

### <span style="color: #3b82f6;">Configuration Settings for Custom Stock Status</span> [](#bkmrk--1)

Go to **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Custom Stock Status**

#### <span style="color: #f97316;">General Settings</span> [](#bkmrk--2)

- **Enabled -** Select "Yes" or "No" to enable or disable the module.
- **License Key -** Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. If you require license keys for dev/staging sites then please email us at <support@scommerce-mage.com>.
- **Custom Stock Message on Related Product –** Select "Yes" to enable the custom stock message on related product.
- **Custom Stock Message on Up-Sells Product –** Select "Yes" to enable the custom stock message on Up-sells product.
- **Custom Stock Message or Cross-Sells Product –** Select "Yes" to enable the custom stock message on Cross-sells product.
- **Cron Schedule –** Schedule cron job to automatically update custom stock status based on correct rule.

[![image (11).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-11.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-11.jpg)

<span style="color: #f97316;">**Stock Status Rules Grid –**</span> This will be a grid in admin &gt; Catalog &gt; Stock Status Rules, with below column: -

- **ID:** ID, this is auto generated and non-editable
- **Rule Name:** Name of the rule
- **Status:** Status of the rule, Enabled/Disabled
- **Website:** Name of the website
- **Priority:** Priority of the rule
- **Action:** Edit/Delete

[![image (12).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/4Tlimage-12.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/4Tlimage-12.jpg)

- **Add New Rule –** You can add new rule by clicking "Add New Rule" from **Admin &gt; Catalog &gt; Products &gt; Stock Status Rules &gt;Add New Rule**, it redirects to the detailed view for Rule from where you can create a new rule by filling the required fields.
- **Rule Name -** Add generic name for rule
- **Website -** Select website from multi-select, from here you can select multiple website
- **Enable -** Please enable/disable rule by slider
- **Priority -** You can add priority (int) for the rule. In case of conflicting rules for a product the lowest number will have highest priority like 0 will be given priority over 1. If no priority defined then any random rule will apply
- **Conditions -** Add the conditions to match, leave blank for all products
- **Default Stock Message -** You can select default stock message from the drop- down, which will be shown on the frontend and replace availability (In Stock / Out Stock) message.
- **Apply Stock Quantity Ranges:** You can enable it by turning "On" this option. If it is enabled then it shows below grid where you can define stock ranges and corresponding status. Please note that if the range is not provided for given stock quantity then the default message will be shown.

[![image (19).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/XG9image-19.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/XG9image-19.png)

### <span style="color: #3b82f6;">Add New Stock Status Rules - Admin Site View</span>

<span style="color: #3b82f6;">[![image (16) (1).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-16-1.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-16-1.png)</span>

- <span style="color: #f97316;">**Custom Stock Status and Rule Name at Product Level -**</span> You can view the associated rule to product from **Admin &gt; Catalog &gt; Products &gt; Select product.**

<span style="color: #f97316;">**Salable Quantity -**</span> On product save it updates the stock status message based on the salable quantity and the quantity rule. To view salable quantity go to **Admin &gt; Catalog&gt; products &gt; Select Product &gt; Product Salable Quantity.**

**[![image (20).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/WQNimage-20.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/WQNimage-20.png)**

#### <span style="color: #f97316;">Assign Custom Stock Status Rule to Products Automatically or Manually</span> [](#bkmrk--8)

- <span style="color: #3b82f6;">**Manually -**</span> You can assign rules to product manually from **Admin &gt; Catalog&gt; Products &gt; Select Product &gt; Rule Name -** Select rule from the "Rule Name" drop-down list.

[![image (21).png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/dcuimage-21.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/dcuimage-21.png)

- <span style="color: #3b82f6;">**Automatically on Cron Run -**</span> You can schedule the Cron job from **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Custom Stock Status**, on cron run the rule will be automatically assigned to products based on the matched condition and set the correct message.

<span style="color: #f97316;">**Multi Websites Selection -**</span> It fully supports multi-store and websites, you can select websites from **Admin &gt; Catalog &gt; Products &gt; Select Product &gt; Product in Websites-** check websites.

[![image (13).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/ctXimage-13.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/ctXimage-13.jpg)

- <span style="color: #f97316;">**Custom Stock Status Product Attribute -**</span> You can add values to custom stock status product attribute from **Admin &gt; Store &gt;Attribute &gt; Product&gt; Product Attribute&gt;Select - custom\_stock\_status &gt; Properties &gt; Add option**, the added values will be populated in the default /custom stock status message drop-down.

[![image (14).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-14.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-14.jpg)

### <span style="color: #3b82f6;">Front-end Site View</span> [](#bkmrk--12)

- <span style="color: #f97316;">**Custom Stock Message for Simple Products on the Product Page –**</span> It displays stock status message for simple product based on salable qty and quantity ranges rule.

[![image (15).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/Idkimage-15.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/Idkimage-15.jpg)

- #### <span style="color: #f97316;">Custom Stock Message for Configurable Products on the Product Page :-</span> For configurable product it displays stock status based on variant selection**.** [](#bkmrk--14)

**[![image (16).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/9Uuimage-16.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/9Uuimage-16.jpg)**

- <span style="color: #f97316;">**Custom Stock Message on the Cart &amp; Checkout Pages –**</span> You can see the stock status message on cart and checkout pages.

[![image (17).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/dbAimage-17.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/dbAimage-17.jpg)

- <span style="color: #f97316;">**Custom Stock Message on Related, Cross-sells and Up-sells Products –**</span> When you select "Yes" for "**Custom Stock Message on Related Product / Up-Sells/ Cross- Sells**" from **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Custom Stock Status,** then it shows stock status message on related/up-sells/cross- sells products.

[![image (18).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/qt6image-18.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/qt6image-18.jpg)

- <span style="color: #f97316;">**Status Message in the Order Confirmation Email –**</span> In the order confirmation email you can see the added stock status message.

[![image (19).jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/scaled-1680-/image-19.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-05/image-19.jpg)

If you have a question related to this extension please check out our [**FAQ Section** ](https://www.scommerce-mage.com/magento-2-custom-stock-status.html#customfaq)first. If you can't find the answer you are looking for then please contact [**support@scommerce-mage.com**](mailto:core@scommerce-mage.com)**.**