View Single Post
  #2  
Old 06-08-2007, 03:06 PM
 
JediSam04 JediSam04 is offline
 

Advanced Member
  
Join Date: Sep 2004
Location: Columbia, SC
Posts: 43
 

Default Re: Conditonal statement for market price

Well, I managed to solve my problem. For those of you interested, here's what I did.

On Product.tpl to make the "Market Price" disappear if it is less than "Our Price"

Find this:
Code:
<font class="MarketPrice">{$lng.lbl_market_price}: </font></td><td> <font class="MarketPrice"><s>{include file="currency.tpl" value=$product.list_price plain_text_message=true}</s></font></tr></td>

Change it to:
Code:
{if $product.list_price gt 0 and $product.taxed_price lt $product.list_price} <font class="MarketPrice">{$lng.lbl_market_price}: </font></td><td> <font class="MarketPrice"><s>{include file="currency.tpl" value=$product.list_price plain_text_message=true}</s></font></tr></td> {/if}{/if}

Now to make the discount disappear if the percentage is less than 10.

In products_t.tpl find:
Code:
<font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price} </font>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""},{/if} {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes}<br />

Change the 0 in {if $discount gt 0} to 10 or whatever percentage you want.

I hope some of you will find this useful.
__________________
JediSam04
Version 4.1.11
X-AOM 4.1.10
PHP 5.2.6
MySQL 5.0.51a-community
Hosting by EWDHosting
DSEFU, Feed Manager, Custom mods
Reply With Quote