View Single Post
  #1  
Old 02-07-2005, 03:26 PM
 
mpj mpj is offline
 

Senior Member
  
Join Date: Feb 2005
Posts: 106
 

Default Market price list and save % on detail product

This is to list the market list price and % save on the detail products page.

X-Cart 4.0+

SKIN1 > CUSTOMER > MAIN> product.tpl

Code:
<TR><TD class="ProductPriceConverting" valign="top">{$lng.lbl_price}:</TD> <TD valign="top"> {if $product.taxed_price ne 0 || $variants ne ''} <FONT class="ProductDetailsTitle"><SPAN id="product_price">{include file="currency.tpl" value=$product.taxed_price}</SPAN></FONT><FONT class="MarketPrice"> <SPAN id="product_alt_price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</SPAN></FONT> {if $product.taxes} {include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if} {else} <INPUT type="text" size="7" name="price"> {/if} </TD> </TR>

Replace with

Code:
<TR><TD class="ProductPriceConverting" valign="top">{$lng.lbl_price}: </TD> <TD valign="top"> {if $product.taxed_price ne 0 || $variants ne ''} <FONT class="ProductDetailsTitle"><SPAN id="product_price">{include file="currency.tpl" value=$product.taxed_price} </SPAN></FONT><FONT class="MarketPrice"> , save {math equation="100-(lprice/price)*100" price=$product.list_price lprice=$product.taxed_price format="%d" assign=discount}{$discount}% <SPAN id="product_alt_price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</SPAN></FONT> {if $product.taxes} {include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if} {else} <INPUT type="text" size="7" name="price"> {/if} <FONT class="MarketPrice">{$lng.lbl_market_price}: <S> ${$product.list_price} </S></FONT> </TD> </TR>

Just giving back to a great forum! ... Happy coding!

MPJ
__________________
X-Cart 4.0.11


{My simple mods}
Adding Market list and % save on product detail
Quantity input box
Reply With Quote