How to Show Stock Remaining Items in Magento 2
With a big catalog of 234+ extensions for your online store
If you keep receiving questions about remaining stocks, it is time for you to update this information on the website. Although the section of this message is small, it is very meaningful to customers when they can find the information easily, and significant to online stores because it can reduce their workload of replying to customers’ stock concerns. In this article, we will find out how to show Stock Remaining Items in Magento 2.
Recommend:
- Magento 2 CountDown Timer
- How to setup Stock in Magento 2
- How to Change Stock Message in Magento 2
- How to get product stock information in Magento 2
- Magento 2 Product Stock Alerts via Email
- Magento 2 Pre Order & Backorder
Table of Contents
- Why is telling customers about stock remaining items important?
- How to set up “Only 2 items left in stock” message
- An easy solution to custom any message
Why is telling customers about stock remaining items important?
Make customers trust more about the “HOT” level of a product
Let’s imagine that when you are shopping online and you see the label “Hot”, “Bestseller” but have no idea about the availability of products. This definitely makes you feel confused and somehow feel suspicious about the level of “Hot” in these items.
In this case, the message such as “Only 5 items available”, “Hurry up! Only 2 items left” definitely confirm firmly about the popularity of an item.
As the urging tool to motivate customers quickly make purchases
There is the truth that shoppers tend to rush to collect items when they feel worried other ones will pick all of them. It means that the smaller the item quantity is, the more hurried the shoppers are. Therefore, notifications about the limitation of items will work effectively to motivate the purchasing decision.
Better information, Better purchase plan
When customers are notified about the small availability of their concerned products, they will feel more focused on purchasing plan to get their loved items. They can prepare well about time to order, money to purchase and more.
Professionalize store appearance
Such a simple but significant message to customers is somehow showing professional notification system in a store. Customers can have good experience from such small but meaningful care.
How to set up “Only 2 items left in stock” message
In this article, we will guide you the way to get the Qty left in stock of a particular product in Magento 2. Let’s take an example as “Only 2 items left in stock”.
Please follow these stages:
Stage 1: Configure “Only 2 left”
- Step 1: On the Admin Panel, go to
Stores > Settings > Configuration
- Step 2: On the left panel, go to
Catalog > Inventory
- Step 3: Enter the number as 2 in the
Display X left Threshold
field. In the Store View, “Only 2 left” will be shown to the buyer.
Stage 2: Custom the above message to “Only 2 items left in stock”
Follow the path: \vendor\magento\module-catalog-inventory\view\frontend\templates\stockqty\default.phtml
Rewrite by the code below:
<?php if ($block->isMsgVisible()): ?>
<div class="availability only" title="<?= /* @escapeNotVerified */ __('Only %1 item(s) left in stock', ($block->getStockQtyLeft())) ?>">
<?= /* @escapeNotVerified */ __('Only %1 item(s) left in stock', "<strong>{$block->getStockQtyLeft()}</strong>") ?>
</div>
<?php endif ?>
Following the stages above, you will get the custom message “Only 2 items left in stock”. However, by Magento default, we can use the above option for simple products since we maintain the inventory for simple products.
An easy solution to custom any message
If you are not familiar with complicated coding, and would like to save time, or make the notice more attractive and lively, Custom Stock Status extension is recommended as the wise solution with a very easy and simple configuration. Custom Stock Status will help your store to custom the remaining message in the best way with extra advanced functions and definitely meet all your expectations. Let’s take a look at some typical features of Custom Stock Status:
Create unlimited custom stock status
Custom Stock Status help you to custom the stock notice with any messages you want without any limitation
Add image/icon to beautify the notice
Beside custom the message freely, with Custom Stock Status, you also can beautify the label to make it lively by adding any image you want.
Switch stock labels when quantity changes
An interesting feature of Custom Stock Status is applying specific stock status label automatically depending on the change in product quantity ranges. For example, if the quantity of a product is 1 to 10, the stock status will be “Hurry up! Last items.’’ However, when product quantity drops below 1, the stock notification will be automatically switched to notification - ‘In Stock in 5 Days’.
Applicable to all product types
With Custom Stock Status, you can customize the labels for all types of products including Simple products, Configurable products, Group products, Bundle products
To sum up, Magento 2 Custom Stock Status exactly meets the demand for customizing the stock label with all advanced functions. An effective stock label by Custom Stock Status will not only be clear at the content but also impressive at the look.
EXPLORE MAGEPLAZA CUSTOM STOCK STATUS
The bottom line
The default Magento 2 allows you to display remaining items on your site if you follow these instructions. However, it is limited with certain product types and quite hard to customize the design to excel the results. That is why we provide you with our Custom Stock Status solution with amazing features shown as above. Hope the article will be helpful to your store, and see you in our next posts!
Looking for
Customization & Development Services?
8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.
Get free consultantRecent Tutorials
Change Store Email Addresses
Fix Magento 2 'Invalid Form Key. Please refresh the page'
Magento 2 Search Settings: Default Magento vs Mageplaza AJAX Search
Explore Our Products:
People also searched for
- magento 2 show stock quantity on product page
- magento 2 display stock quantity
- magento 2 show stock quantity
- only x left threshold magento 2
- stock remaining
- remaining items
- hurry only left in stock
- magento show stock quantity on product page
- magento 2 get order item quantity
- magento configurable product stock quantity
- magento stock
- magento 2 only x left threshold
- magento 2 configurable product stock quantity
- remaining item
- only 2 left in stock
- magento 2 show out of stock products
- magento get product stock status
- 2.2.x, 2.3.x, 2.4.x
Stay in the know
Get special offers on the latest news from Mageplaza.
Earn $10 in reward now!