Quote:
Originally Posted by donmck
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...
|
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...