Table of Contents
View Magento 2 Custom stock status Extension Detail Page for Features and Demo
Documentation for Custom stock status
Preference
Custom Stock Status extension provide to display custom stock status on product list , product view and cart page.it’s allows replacing default Magento stock status with precise and understandable stock statuses and custom message about product availability.
- Custom stock status display in all product type
- Create multiple custom stock statuses
- Upload special icons for stock statuses
- Add statuses to products automatically or manually\
- Show out of stock options of configurable items
- Display quantity based stock statuses
- User Friendly and flexible configuration.
- Compatible with Most of the Browser.
Installation
There are two ways of installing extension in magento2.
- Using COMMAND LINE.
- Manually Install extension.
Option 1: Magento 2 install extension using COMMAND LINE (Recommended)
Follow below steps to install extension from the command line.
Step 1: Download the extension and unzip it.
Step 2: Upload it to code directory in your magento installation’s app directory. If code directory does not exists then create.
Step 3: Disable the cache under System → Cache Management.
Step 4: Enter the following at the command line:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
Step 5: Once you complete above steps log out and log in back to the admin panel and switch to Stores → Configuration → Mageants → Custom stock status, The module will be displayed in the admin panel.
Option 2: Magento 2 install extension manually
Step 1: Download the extension and unzip it.
Step 2: Upload it to code directory in your magento installation’s app directory. If code directory does not exists then create.
Step 3: Disable the cache under System → Cache Management Edit app/etc/config.php file and add one line code: ‘Mageants_Custom stock status’ → 1
Step 4: Disable the cache under System → Cache Management
Step 5: Once you complete above steps log out and log in back to the admin panel and switch to
Stores → Configuration → Mageants → Custom stock status, the module will be displayed in the admin panel.
Backend Example
- After Installation of Extension login to magento admin panel to set configuration of the extension.
- As per below screen shot you can set all the settings here.
Extension Configuration
Add Custom Stock Status
Go to Admin Panel → Stores → Attributes → Product → Select mageants_custom_stock_status
- In properties section Manage Options (values of your attribute) section.
- Create the options for the custom stock status label.
- To display current product quantity in particular stock status, use
{qty} variable, for example: Only {qty} left in stock!
Use variable like :- {qty} , {special_price} , {day-aftertomorrow} and {tomorrow}.
Upload icons for Custom Stock Status
- Select mageants_custom_stock_status.
- Go to Manage Option Icon section
- Choose icons for custom stock statuses.
Rules for quantity ranges
Add quantity rules
Go to Stores → Attributes → Product and select the attribute mageants_custom_stock_rule.
- In properties section, in the Manage Options (values of your attribute) section, create one rule for each product group, for which you will use different levels of stock.
- Once you create the rules, go to Manage Quantity Range and specify ranges for each of these rules.
To enable the stock status rules
- Go to Admin Panel → Stores → Configuration → Custom Stock Status and set to Yes the Use Activate rules for Quantity Range Status field.
Manage Quantity Ranges
- If you would like the statuses to be updated automatically, based on how many items of a product are left in the inventory, please create quantity ranges and assign the necessary statuses to the ranges.
- You can also use Stock Status Rule column. With its help, you can specify different quantity levels for the same statuses for different groups of products.
- Use backorder rules to automatically assign particular stock statuses to the products.
- If you choose to use range based stock statuses when editing a product, the stock status will change automatically once the product quantity changes.
Custom Stock Status Settings
- Go to Stores → Configuration → Mageants → Custom Stock Status, to Custom Stock Status settings Section.
Hide Default Stock Status
- Set to Yes - To Hide default stock status (in stock\out of stock).
- Set to No - To display both status default and custom stock status.
- Display Only Custom Stock Status Icon - If set yes, display only custom status icon.
- Display Quantity Ranges Based Statuses - If set yes, display custom stock status quantity range wise.
- Use Activate rules for Quantity Range Status - If set yes, display custom stock status quantity rules range wise.
- Display Custom Stock Status Only 'Out Of Stock' Product– if set yes, display custom stock status only out of stock product.
Display Settings
Choose to show custom stock statuses on
- Product list page
- Shopping cart
- Order Confirmation Email.
Frontend Example