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

How to hide price; if the item cost $0.00

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-18-2016, 01:40 PM
 
steewu steewu is offline
 

Member
  
Join Date: Sep 2007
Posts: 26
 

Default How to hide price; if the item cost $0.00

How to hide price; if the item cost $0.00

//skins/default/en/common/price_parts/price.tpl

<span class="price product-price">{formatPrice(getListPrice(),null,1):h}</span>

Thanks...
__________________
Version Xcart5 5.2.XX
Reply With Quote
  #2  
Old 05-19-2016, 04:25 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: How to hide price; if the item cost $0.00

Hello. Try this.
Code:
{if:getListPrice()>0} <li><span class="price product-price">{formatPrice(getListPrice(),null,1):h}</span></li> {end:}
Ideally all logic should be coded in PHP classes, not in templates, but this will work.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote

The following user thanks razortw for this useful post:
steewu (05-19-2016)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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 12:18 PM.

   

 
X-Cart forums © 2001-2020