Quote:
Originally Posted by wicked
That is great, but I should explain further: It should only display the Market price (And Label) if the sell price is not the same. And if it is the same, then only show Sell Price. Please advise....
|
X-cart does this by default. In admin - general settings - product options options tr checking the "The dynamic updating of the Save Money label depending on the selected product options is enabled:" and see if that does it. It should display "Market Price" and a "Save %" graphic if the "price" is less than the "market price", or only the "price" if they are the same or "market price" is less than "price".
This is determined by the following code ( I pulled mine from product.tpl version 4.1.11 but yours should be the same). Also, products.tpl and products_t.tpl should have something similar if not the same code. This displays "Market Price" and "Price".
Code:
{if $product.taxed_price ne 0 || $variant_price_no_empty}
<font class="ProductDetailsTitle"><span id="product_price" style="white-space: nowrap;">{include file="currency.tpl" value=$product.taxed_price plain_text_message=true}</span></font><font class="MarketPrice"> <span id="product_alt_price" style="white-space: nowrap;">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price plain_text_message=true}</span></font>
{if $product.taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if}
{else}
<input type="text" size="7" name="price" />
{/if}
In the same file but closer to the top you will find
Code:
<table width="60" cellspacing="1" cellpadding="2">
<tr>
<td class="SaveMoneyLabel">
<br />
{math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount}
<span id="save_percent">{ $discount }</span>%
</td>
</tr>
</table>
This displays the "Save Money" graphic, and if I remember right, is only in product.tpl.