[Skip to main content](#vessel-content)

#   Display “Out of stock” message in HikaShop when quantity is 0

##

- **[pkaeller](/forum/user/83036-pkaeller "View pkaeller's Profile")**
- [![pkaeller's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/83036-pkaeller "View pkaeller's Profile") Topic Author
- [ Offline](/forum/user/83036-pkaeller)

Less More

- Posts: 18
- Thank you received: 1
-
-

1 year 3 months ago [\#368147](#368147) by [pkaeller](/forum/user/83036-pkaeller "View pkaeller's Profile")  *[Display “Out of stock” message in HikaShop when quantity is 0](/forum/26-product-category-display/909634-display-out-of-stock-message-in-hikashop-when-quantity-is-0#368147 "-- url of the page with the problem -- :   www.fidelebrueder.de/  -- HikaShop version -- : 6.0.0 Business -- Joomla version -- : 5.3.2 -- PHP version -- : 8.3.23 -- Browser(s) name and version -- : Chrome 138.0.7204.184  Hello,  I am using HikaShop 6 Business and would like to show an “Out of stock” message on the product page when the quantity is 0.  So far I have:  Set “Display out of stock products” to Yes.  Set product quantity to 0 (no variants).  However, in the frontend the add-to-cart button disappears, but there is no visible “Out of stock” text for the customer.  Question: How can I make HikaShop display an “Out of stock” label or message on the product page when the quantity is 0? Is there a built-in option in v6, or do I need a view override?  Thank you!")* was created by *[pkaeller](/forum/user/83036-pkaeller "View pkaeller's Profile")*

-- url of the page with the problem -- : [ www.fidelebrueder.de/](https://www.fidelebrueder.de/)
-- HikaShop version -- : 6.0.0 Business
-- Joomla version -- : 5.3.2
-- PHP version -- : 8.3.23
-- Browser(s) name and version -- : Chrome 138.0.7204.184

Hello,

I am using HikaShop 6 Business and would like to show an “Out of stock” message on the product page when the quantity is 0.

So far I have:

Set “Display out of stock products” to Yes.

Set product quantity to 0 (no variants).

However, in the frontend the add-to-cart button disappears, but there is no visible “Out of stock” text for the customer.

Question:
How can I make HikaShop display an “Out of stock” label or message on the product page when the quantity is 0? Is there a built-in option in v6, or do I need a view override?

Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDk2MzQtZGlzcGxheS1vdXQtb2Ytc3RvY2stbWVzc2FnZS1pbi1oaWthc2hvcC13aGVuLXF1YW50aXR5LWlzLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

1 year 3 months ago [\#368149](#368149) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Display “Out of stock” message in HikaShop when quantity is 0](/forum/26-product-category-display/909634-display-out-of-stock-message-in-hikashop-when-quantity-is-0#368149 "-- url of the page with the problem -- :   www.fidelebrueder.de/  -- HikaShop version -- : 6.0.0 Business -- Joomla version -- : 5.3.2 -- PHP version -- : 8.3.23 -- Browser(s) name and version -- : Chrome 138.0.7204.184  Hello,  I am using HikaShop 6 Business and would like to show an “Out of stock” message on the product page when the quantity is 0.  So far I have:  Set “Display out of stock products” to Yes.  Set product quantity to 0 (no variants).  However, in the frontend the add-to-cart button disappears, but there is no visible “Out of stock” text for the customer.  Question: How can I make HikaShop display an “Out of stock” label or message on the product page when the quantity is 0? Is there a built-in option in v6, or do I need a view override?  Thank you!")*

Hi,

The out of stock message will appear automatically on the product details page on the frontend once stock for the product goes to 0.
There is no option to not display it.
If you don't see it, either you've already have a view override (made on your end or by your template provider) which removes it, or you have a translation override of the text for it on the frontend which removes it, or you have custom CSS which removes it, or you have some page caching in place preventing you from seeing the change and you need to clear it.
The code to display it is in the view file product / quantity : Code:

&lt;!-- STOCK MESSAGE --&gt; &lt;?php $stock_class = ($stock != 0) ? "" : " hikashop_product_no_stock"; ?&gt; &lt;span class="hikashop_product_stock_count&lt;?php echo $stock_class; ?&gt;"&gt; &lt;?php if(!empty($this-&gt;row-&gt;product_stock_message)) echo JText::sprintf($this-&gt;row-&gt;product_stock_message, $stock); elseif($stock &gt; 0) echo (($stock &lt;= $threshold_stock_message &amp;&amp; JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') ? JText::sprintf('X_ITEM_IN_STOCK', $stock) : JText::sprintf('X_ITEMS_IN_STOCK', $stock)); elseif(!$in_stock) echo JText::_('NO_STOCK'); ?&gt; &lt;/span&gt; &lt;!-- EO STOCK MESSAGE --&gt;

So either that code is missing or there is a problem with the translation key NO_STOCK

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDk2MzQtZGlzcGxheS1vdXQtb2Ytc3RvY2stbWVzc2FnZS1pbi1oaWthc2hvcC13aGVuLXF1YW50aXR5LWlzLTA/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.057 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
