View Single Post
  #8  
Old 09-15-2004, 03:38 PM
 
sportruck sportruck is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 70
 

Default

I got it to work, you may have coded something wrong.

Here is an exmaple of what I did. I have many parts that drop ship, so instead of showing stock for these I show the paramater in an extra field, such as "Ships within 2-3 days" or "Custom order, 4-6 week build time". Make an extra field titled "Availability" and check the Show box to show this field on products. For products with nothing in that field it is not shown by default.

Then to turn off the regular stock level display for items that do have something in that field, search for the following code in /customer/main/product.tpl

Code:
{if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <TR><TD width="30%">{$lng.lbl_quantity}</TD><TD nowrap><SPAN id="product_avail_txt">{if $product.avail gt 0}{$product.avail}</SPAN>{else}{$lng.txt_no}{/if} {$lng.txt_items_available}</TD></TR> {/if}

Simply surround that code with an if statement as shown:

Code:
{if $extra_fields[0].field_value eq null} {if $config.Appearance.show_in_stock eq "Y" and $config.General.unlimited_products ne "Y" and $product.distribution eq ""} <TR><TD width="30%">{$lng.lbl_quantity}</TD><TD nowrap><SPAN id="product_avail_txt">{if $product.avail gt 0}{$product.avail}</SPAN>{else}{$lng.txt_no}{/if} {$lng.txt_items_available}</TD></TR> {/if} {/if}
Reply With Quote