X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Visual stock amount (https://forum.x-cart.com/showthread.php?t=54918)

ScanoGraphics.com 08-05-2010 03:39 AM

Visual stock amount
 
Is there a mod to show the stock amount on product pages?

Example:
stock = 0 -> an icon with no stock message is shown
stock = 1-5 -> a red icon with low stock message is shown
stock = 6-10 -> an orange icon with limited stock message is shown
stock = 11-100 -> a green icon with in stock message is shown

Does this make sense?

cflsystems 08-05-2010 08:11 AM

Re: Visual stock amount
 
Use an if statement to show what you want

{if $product.avail eq 0}
show image/message for no stock
{elseif $product.avail gte 1 && $product.avail lte 5}
1-5 image/message
{elseif $product.avail gte 6 && $product.avail lte 10}
6-10 image/message
{elseif $product.avail gte 11}
11-.... image/message
{/if}

ScanoGraphics.com 08-06-2010 02:42 AM

Re: Visual stock amount
 
Thanks Steve, I will try that!


All times are GMT -8. The time now is 12:00 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.