X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Display Market Price on Product Detail page (https://forum.x-cart.com/showthread.php?t=40534)

wicked 06-15-2008 09:20 PM

Display Market Price on Product Detail page
 
Can someone advise how to Display Market Price on Product Detail page as well as the discounted price as Xcart by default only displays the discounted price, thanks.

Yurij 06-16-2008 12:27 AM

Re: Display Market Price on Product Detail page
 
{$product.list_price} - Market price

{$product.taxed_price} - Taxed Price

Just add this varible in the file skin1/customer/main/product.tpl

wicked 06-16-2008 01:34 AM

Re: Display Market Price on Product Detail page
 
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....

s.morgan 07-04-2008 07:42 PM

Re: Display Market Price on Product Detail page
 
I have exactly the same problem, anyone can help?

JWait 10-19-2008 07:41 AM

Re: Display Market Price on Product Detail page
 
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}
&nbsp;<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.


All times are GMT -8. The time now is 10:59 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.