View Single Post
  #2  
Old 09-21-2007, 11:41 AM
 
toomnyhats toomnyhats is offline
 

Advanced Member
  
Join Date: Sep 2006
Posts: 41
 

Default Re: Removing Options on 0 Dollar Items...

In skin1/customer/main/product.tpl


FIRST

FIND:
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td colspan="2">
<b><font class="ProductDetailsTitle">{$lng.lbl_options}</font></b>

REPLACE WITH:
<table width="100%" cellpadding="0" cellspacing="0">
{*****1a-ADDED TO REMOVE PRICE FROM $0 PRODUCTS*****}
{if $product.taxed_price ne 0}
{****1a-END ADDED TO REMOVE PRICE FROM $0 PRODUCTS***}
<tr><td colspan="2">
<b><font class="ProductDetailsTitle">{$lng.lbl_options}</font></b>

SECOND

FIND:
{include file="customer/main/product_prices.tpl"}
{if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)}
{if $js_enabled}
<br />

REPLACE WITH:
{include file="customer/main/product_prices.tpl"}
{if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)}
{if $js_enabled}
<br />
{****1b-ADDED TO REMOVE PRICE FOR $0 PRODUCT*******}
{/if}
{****1b-END ADDED TO REMOVE PRICE FOR $0 PRODUCT***}

THIRD

FIND:
{if $product.forsale ne "B"}
<table cellspacing="0" cellpadding="0">
<tr>
<td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;</td>


REPLACE WITH:
{if $product.forsale ne "B"}
<table cellspacing="0" cellpadding="0">
<tr>
{****2a-ADDED TO REMOVE PRICE FOR $0 PRODUCT*******}
{if $product.forsale ne "B"||$product.taxed_price ne 0}
{****2a-END ADDED TO REMOVE PRICE FOR $0 PRODUCT***}
<td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;</td>
{****2b-ADDED TO REMOVE PRICE FOR $0 PRODUCT*******}
{/if}
{****2b-END ADDED TO REMOVE PRICE FOR $0 PRODUCT***}


This works on my test site which doesn't contain any mods. I didn't test it on my live site. If you have a heavily modded products.tpl, you may run into snags.
__________________
toomnyhats
X-Cart Gold 4.1.9 (Unix)
X-SpecialOffers
DSEFU (disabled)
Reply With Quote