![]() |
Stock level in Colors?
Is there a mod shows Stock level in Colors?
Ex: 0 - Red, 1-10 Yellow, 10+ Green Looking for such mod. |
Re: Stock level in Colors?
skin1/customer/main/product.tpl
Code:
{if $product.avail eq 0} Code:
{if $products[product].avail eq 0} |
Re: Stock level in Colors?
Please don't post questions in the Completed Custom Mods forum. Moving to Template Editing.
|
Re: Stock level in Colors?
two possible code variants, and 2 possible file locations are given for this mod, and no indication is given, as to where in the file(s) to place the code.
It is a mod I would really like to have running. Have tried many variants, but unable to get it working to date. Is there any more information available? Thanks in advance, Don... |
Re: Stock level in Colors?
Quote:
Answering my own questions here. Thanks, after a little perseverance, I got this to work fine. Below is a summary of what I needed to do: skin1/customer/main/products_t.tpl (Main Index) skin1/customer/main/buy_now.tpl (Category Listing) skin1/customer/main/product.tpl (Individual Product) skin1/customer/main/products_t.tpl Code: (Main Index) ======================================== {if $products[product].avail eq 0} Out of Stock <img src="http://www.dontronics-shop.com/red.gif" align="absmiddle" alt="Out of Stock"> {elseif $products[product].avail gt 0 and $products[product].avail lt 10} Low Stock <img src="http://www.dontronics-shop.com/yellow.gif" align="absmiddle" alt="Low Stock"> {elseif $products[product].avail gt 9} In Stock<img src="http://www.dontronics-shop.com/green.gif" align="absmiddle" alt="In Stock"> {/if} skin1/customer/main/buy_now.tpl Code: (Category Listing) ===================================== {if $product.avail eq 0} Out of Stock <img src="http://www.dontronics-shop.com/red.gif" align="absmiddle" alt="Out of Stock"> {elseif $product.avail gt 0 and $product.avail lt 10} Low Stock <img src="http://www.dontronics-shop.com/yellow.gif" align="absmiddle" alt="Low Stock"> {elseif $product.avail gt 9} In Stock<img src="http://www.dontronics-shop.com/green.gif" align="absmiddle" alt="In Stock"> {/if} skin1/customer/main/product.tpl Code: (Individual Product) ===================================== {if $product.avail eq 0} Out of Stock <img src="http://www.dontronics-shop.com/red.gif" align="absmiddle" alt="Out of Stock"> {elseif $product.avail gt 0 and $product.avail lt 10} Low Stock <img src="http://www.dontronics-shop.com/yellow.gif" align="absmiddle" alt="Low Stock"> {elseif $product.avail gt 9} In Stock<img src="http://www.dontronics-shop.com/green.gif" align="absmiddle" alt="In Stock"> {/if} ====================================== I simply added the code in line, at the point I wanted the stock levels to appear. This wasn't difficult. Original code masked a stock of 10, I had to change it a little. Don... |
All times are GMT -8. The time now is 04:02 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.