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)
-   -   Stock icons (https://forum.x-cart.com/showthread.php?t=49779)

Warwick 09-19-2009 02:50 AM

Stock icons
 
Is there a mod outthere that makes it possible to show low/medium/normal stock icons depending on the amount in stock?

Or something simular:
stock: low / in stock

Or something like that?

amy2203 09-19-2009 03:14 AM

Re: Stock icons
 
it probably depends on how you want to define low/med/normal etc,

basically, where your template currently displays the number in stock, you need to change it to an if statement along the lines of if the qty is less than x, do this etc

depending on your product range, the levels(s) that trigger the different icons etc might be the same for all, or you might need to define the levels for each product. You could do that with extra fields in your product, and then test against those extra fields.

It probably wouldn't be a big mod,

hth

Warwick 09-19-2009 03:17 AM

Re: Stock icons
 
Quote:

Originally Posted by amy2203
It probably wouldn't be a big mod


Wouldn't think so too, must be around in some form I hope :)

candc 09-20-2009 05:04 AM

Re: Stock icons
 
We would also like such a mod if available

PhilJ 09-20-2009 09:50 AM

Re: Stock icons
 
skin1/customer/main/product.tpl
Code:

{if $product.avail eq "0"}
<img src="{$ImagesDir}/out_of_stock.jpg" />
{elseif $product.avail gt "0" && lt "10"}
<img src="{$ImagesDir}/low_stock.jpg" />
{elseif $product.avail gte "10"}
<img src="{$ImagesDir}/in_stock.jpg" />
{/if}



All times are GMT -8. The time now is 06:04 AM.

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