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

#   Traffic Light System for Stock

##

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

Less More

- Posts: 59
- Thank you received: 2
-
-

13 years 11 months ago [\#81426](#81426) by [MikeB](/forum/user/11679-mikeb "View MikeB's Profile")  *[Traffic Light System for Stock](/forum/2-general-talk-about-hikashop/76633-traffic-light-system-for-stock#81426 "Hello,  is it possible (now or in the near future) to make a &quot;traffic light&quot; system, for the avaible stock.  RED for not on stock ORANGE for small stock GREEN for on stock  Because the Avaible with Number on Stock looks not very nice. And some Products have a deliever time of 2 or 3 days - so the Light can be green or orange when the stock is on zero... (now it displays not avaible)  just a request / wish :-) thank you")* was created by *[MikeB](/forum/user/11679-mikeb "View MikeB's Profile")*

Hello,

is it possible (now or in the near future) to make a "traffic light" system,
for the avaible stock.

RED for not on stock
ORANGE for small stock
GREEN for on stock

Because the Avaible with Number on Stock looks not very nice. And some Products
have a deliever time of 2 or 3 days - so the Light can be green or orange when the
stock is on zero... (now it displays not avaible)

just a request / wish ![:-)](/media/kunena/emoticons/3.png ":-)") thank you

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 11 months ago -  13 years 11 months ago [\#81468](#81468) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Traffic Light System for Stock](/forum/2-general-talk-about-hikashop/76633-traffic-light-system-for-stock#81468 "Hello,  is it possible (now or in the near future) to make a &quot;traffic light&quot; system, for the avaible stock.  RED for not on stock ORANGE for small stock GREEN for on stock  Because the Avaible with Number on Stock looks not very nice. And some Products have a deliever time of 2 or 3 days - so the Light can be green or orange when the stock is on zero... (now it displays not avaible)  just a request / wish :-) thank you")*

Hi,

You can already implement such feature in your product page.
Thanks to view override, you can edit the view "product &#124; quantity".

In this view, the quantity is display like that: Code:

echo '&lt;span class="hikashop_product_stock_count"&gt;'.JText::sprintf('X_ITEMS_IN_STOCK',$this-&gt;row-&gt;product_quantity).'&lt;/span&gt;&lt;br/&gt;';

So you can remove it and display in image depending the value of "$this-&gt;row-&gt;product_quantity".

In the view there are three section.
The first when the product quantity is unlimited Code:

if($this-&gt;row-&gt;product_quantity==-1){ /* ... */ }

The second when the product quantity have a value Code:

}elseif($this-&gt;row-&gt;product_quantity&gt;0){ ?&gt; &lt;div class="hikashop_product_stock"&gt; &lt;?php echo '&lt;span class="hikashop_product_stock_count"&gt;'.JText::sprintf('X_ITEMS_IN_STOCK',$this-&gt;row-&gt;product_quantity).'&lt;/span&gt;&lt;br/&gt;'; /* ... */ }

And the last one, when the product does not have stock. Code:

}else{ ?&gt; &lt;div class="hikashop_product_no_stock"&gt; &lt;?php echo JText::_('NO_STOCK'); /* ... */

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Last edit: 13 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

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

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

Less More

- Posts: 59
- Thank you received: 2
-
-

13 years 11 months ago [\#81492](#81492) by [MikeB](/forum/user/11679-mikeb "View MikeB's Profile")  Replied by *[MikeB](/forum/user/11679-mikeb "View MikeB's Profile")* on topic *[Traffic Light System for Stock](/forum/2-general-talk-about-hikashop/76633-traffic-light-system-for-stock#81492 "Hello,  is it possible (now or in the near future) to make a &quot;traffic light&quot; system, for the avaible stock.  RED for not on stock ORANGE for small stock GREEN for on stock  Because the Avaible with Number on Stock looks not very nice. And some Products have a deliever time of 2 or 3 days - so the Light can be green or orange when the stock is on zero... (now it displays not avaible)  just a request / wish :-) thank you")*

:blink: uuuuh ! i think i´m to stupid for that...

is it possible that you can write me the code ready so that i can it past it in my view ?
the images are stored in the joomla media folder named "stocksigns"

for unlimted stock - ampel0.png
less then 6 pcs on stock - ampel1.png
no stock - ampel2.png

that want to be nice - because in the moment i collect experience - but i donßt wont to destroy
the shop... :blush:

thanks a lot

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#81536](#81536) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Traffic Light System for Stock](/forum/2-general-talk-about-hikashop/76633-traffic-light-system-for-stock#81536 "Hello,  is it possible (now or in the near future) to make a &quot;traffic light&quot; system, for the avaible stock.  RED for not on stock ORANGE for small stock GREEN for on stock  Because the Avaible with Number on Stock looks not very nice. And some Products have a deliever time of 2 or 3 days - so the Light can be green or orange when the stock is on zero... (now it displays not avaible)  just a request / wish :-) thank you")*

Hi,

This would be some customization that we could not provide like that as support. It would ask for several lines of code and so, so times to implement it.
You can ask for 3th party developer, use our "commercial jobs" section.

But the most important thing is that, you can use "view overrides" without breaking anything.
At any moment, you can delete your override and retrieve the original HikaShop file (which wouldn't be overwrite, just override).

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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