View Single Post
  #1  
Old 04-20-2005, 09:58 AM
 
macker123 macker123 is offline
 

Advanced Member
  
Join Date: Mar 2004
Posts: 68
 

Default Replace add to cart button with out of stock

I want to replace my add to cart button with an out of stock button when my quantity is equal to 0 for that product. I am trying the following code below in my product.tpl file, but all that happens is no add to cart button appears at all even when quantity is not equal to 0.

Can you guys tell me the proper if else statement to use.

Code:
{if $products[product].avail ne 0} {if $product.forsale ne "B"} {include file="buttons/add_to_cart.tpl" style="button" href="javascript:if (FormValidation()) document.orderform.submit()"} } {else} [img]{$ImagesDir}/outofstock.gif[/img] {/if}
__________________
Heavily Modified 4.0.8
http://www.hiphopcapital.com
Reply With Quote