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

#   Availability: On Stock / Out of Stock

##

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile") Topic Author
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

9 years 8 months ago [\#260776](#260776) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[Availability: On Stock / Out of Stock](/forum/4-how-to/76154-availability-on-stock-out-of-stock?start=20#260776 "Hikashop 2.0 Business  Is it possible to have feature in each product  Availability: On Stock / Out of Stock  I do not want to show the number of what I have in stock of each product. But I just want to display if I have the product &quot;in stock&quot; or &quot;Out of Stock&quot;  Does Hikashop 2.0 have this function ?")*

So I've did a little change to the code and now it looks like this:
Code:

if($this-&gt;row-&gt;product_quantity &gt; 0) echo JText::_('IN_STOCK'); elseif(!$in_stock) echo JText::_('NO_STOCK');

And it works perfect.

My only problem is that some of my product has "Quantity: Unlimited"

But when products has the quantity: unlimited status the "in stock" message does not display".

How can I modify the code to display the message "in stock" when the Quantity of the product is set to "Unlimited" ?

Tnx

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

- **[kernel64](/forum/user/9275-kernel64 "View kernel64's Profile")**
- [![kernel64's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-06-28-2.jpg)](/forum/user/9275-kernel64 "View kernel64's Profile")
- [ Offline](/forum/user/9275-kernel64)

Less More

- Posts: 86
- Thank you received: 9
-
- [](http://www.cads.nl)
-

9 years 8 months ago [\#260789](#260789) by [kernel64](/forum/user/9275-kernel64 "View kernel64's Profile")  Replied by *[kernel64](/forum/user/9275-kernel64 "View kernel64's Profile")* on topic *[Availability: On Stock / Out of Stock](/forum/4-how-to/76154-availability-on-stock-out-of-stock?start=20#260789 "Hikashop 2.0 Business  Is it possible to have feature in each product  Availability: On Stock / Out of Stock  I do not want to show the number of what I have in stock of each product. But I just want to display if I have the product &quot;in stock&quot; or &quot;Out of Stock&quot;  Does Hikashop 2.0 have this function ?")*

Fastest way is to change the language string....

---

Kind regards,
Cornel

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile") Topic Author
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

9 years 8 months ago [\#260806](#260806) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[Availability: On Stock / Out of Stock](/forum/4-how-to/76154-availability-on-stock-out-of-stock?start=20#260806 "Hikashop 2.0 Business  Is it possible to have feature in each product  Availability: On Stock / Out of Stock  I do not want to show the number of what I have in stock of each product. But I just want to display if I have the product &quot;in stock&quot; or &quot;Out of Stock&quot;  Does Hikashop 2.0 have this function ?")*

....and what language string would that be ?

tnx

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

- **[kernel64](/forum/user/9275-kernel64 "View kernel64's Profile")**
- [![kernel64's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-06-28-2.jpg)](/forum/user/9275-kernel64 "View kernel64's Profile")
- [ Offline](/forum/user/9275-kernel64)

Less More

- Posts: 86
- Thank you received: 9
-
- [](http://www.cads.nl)
-

9 years 8 months ago [\#260823](#260823) by [kernel64](/forum/user/9275-kernel64 "View kernel64's Profile")  Replied by *[kernel64](/forum/user/9275-kernel64 "View kernel64's Profile")* on topic *[Availability: On Stock / Out of Stock](/forum/4-how-to/76154-availability-on-stock-out-of-stock?start=20#260823 "Hikashop 2.0 Business  Is it possible to have feature in each product  Availability: On Stock / Out of Stock  I do not want to show the number of what I have in stock of each product. But I just want to display if I have the product &quot;in stock&quot; or &quot;Out of Stock&quot;  Does Hikashop 2.0 have this function ?")*

do a search of "Unlimited" in your language file and change that

---

Kind regards,
Cornel

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

9 years 8 months ago [\#260807](#260807) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Availability: On Stock / Out of Stock](/forum/4-how-to/76154-availability-on-stock-out-of-stock?start=20#260807 "Hikashop 2.0 Business  Is it possible to have feature in each product  Availability: On Stock / Out of Stock  I do not want to show the number of what I have in stock of each product. But I just want to display if I have the product &quot;in stock&quot; or &quot;Out of Stock&quot;  Does Hikashop 2.0 have this function ?")*

Hello,

The best way will probably to use some php code like this : Code:

if($this-&gt;row-&gt;product_quantity &gt; 0 &#124;&#124; $this-&gt;row-&gt;product_quantity == -1) echo JText::_('IN_STOCK'); else echo JText::_('NO_STOCK');

Or Code:

if($this-&gt;row-&gt;product_quantity != 0) echo JText::_('IN_STOCK'); else echo JText::_('NO_STOCK');

The following user(s) said Thank You: [river](/forum/user/9591-river "View river's Profile")

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile") Topic Author
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

9 years 8 months ago [\#260860](#260860) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[Availability: On Stock / Out of Stock](/forum/4-how-to/76154-availability-on-stock-out-of-stock?start=20#260860 "Hikashop 2.0 Business  Is it possible to have feature in each product  Availability: On Stock / Out of Stock  I do not want to show the number of what I have in stock of each product. But I just want to display if I have the product &quot;in stock&quot; or &quot;Out of Stock&quot;  Does Hikashop 2.0 have this function ?")*

Tnx man I used this code
Code:

if($this-&gt;row-&gt;product_quantity &gt; 0 &#124;&#124; $this-&gt;row-&gt;product_quantity == -1) echo JText::_('IN_STOCK'); else echo JText::_('NO_STOCK');

It works like a charm

you're the best ![=)](/smile.gif "=)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2MTU0LWF2YWlsYWJpbGl0eS1vbi1zdG9jay1vdXQtb2Ytc3RvY2s/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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.292 seconds

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

[](#top)
