Traffic Light System for Stock

  • Posts: 59
  • Thank you received: 2
11 years 4 months ago #81426

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 :-) thank you

Please Log in or Create an account to join the conversation.

  • Posts: 26014
  • Thank you received: 4004
  • MODERATOR
11 years 4 months ago #81468

Hi,

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

In this view, the quantity is display like that:

echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';
So you can remove it and display in image depending the value of "$this->row->product_quantity".

In the view there are three section.
The first when the product quantity is unlimited
if($this->row->product_quantity==-1){
 /* ... */
} 
The second when the product quantity have a value
}elseif($this->row->product_quantity>0){
?>
<div class="hikashop_product_stock">
<?php
	echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';
 /* ... */
}
And the last one, when the product does not have stock.
}else{
	?>
<div class="hikashop_product_no_stock">
<?php
	echo JText::_('NO_STOCK');
 /* ... */

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 11 years 4 months ago by Jerome.

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 2
11 years 4 months ago #81492

: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 or Create an account to join the conversation.

  • Posts: 26014
  • Thank you received: 4004
  • MODERATOR
11 years 4 months ago #81536

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum