Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Market price list and save % on detail product

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
  #2  
Old 03-02-2005, 03:38 PM
 
x-online x-online is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Australia, Sydney
Posts: 189
 

Default

Excellent thanks!
__________________
X-Cart version 4.x (Most likely will be the latest version)
Reply With Quote
  #3  
Old 03-11-2005, 04:52 AM
  RichieRich's Avatar 
RichieRich RichieRich is offline
 

X-Adept
  
Join Date: Sep 2004
Location: London, England
Posts: 750
 

Default

this only works if a product has a discount on it.

If you have product #1 which has a list price it will show correctly.

If you have product #2 which doesnt have list price, you get SQL errors etc.


Can this not be adjusted like the thumbnail pages? ie, if there is not list price, dont show anything, but if there is, then show what the saving is.
__________________
Richard


Ultimate 5.4 testing
Reply With Quote
  #4  
Old 04-10-2005, 01:43 AM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

Yes, you would be better off using an if statement that specifies that the value needs to be over 0. The same type of thing is used on the "Save X%" in the customer/main/product.tpl.

Here's one way to show the list price if there is one (XC's default is $0.00):
Code:
{if $product.list_price gt 0} <TR><TD class="ProductPriceConverting" valign="top">{$lng.lbl_list_price}:</TD> <TD valign="top"> <FONT class="MarketPrice">{include file="currency.tpl" value=$product.list_price}</FONT> </TD> </TR> {/if}
Just put it above or below the standard price. It may also work elsewhere.

- Mike
__________________
4.1.9
Reply With Quote
  #5  
Old 04-18-2005, 05:00 AM
 
expressrugs expressrugs is offline
 

Advanced Member
  
Join Date: Feb 2005
Posts: 77
 

Default

Hello
I there a way to have the list price changed on the Product variants. This works great on the Product details page but not if a variant is involved. Any help here would be great.
Thanks
__________________
4.1.3
Reply With Quote
  #6  
Old 12-15-2005, 11:47 AM
 
syndicatelabs syndicatelabs is offline
 

Member
  
Join Date: Aug 2005
Posts: 29
 

Default No list if price is list price is 0

This mod works great

but is there a way to not display list price if the list price is "0.00" in the admin

For example right now it if list price is "0.00" it will display "List Price: $0.00" with the zero's slashed out.

Thanks
v4.0
__________________
learnxcart
4.1.6
Reply With Quote
  #7  
Old 12-16-2005, 02:31 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

similar thread
http://forum.x-cart.com/viewtopic.php?t=10171&postdays=0&postorder=asc&sta rt=0
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:57 PM.

   

 
X-Cart forums © 2001-2020