|
|
#1 |
|
Senior Member
Join Date: Jan 2007
Posts: 123
Rep Power: 13 ![]() |
I'm trying to modify the file that creats the horizontal featured listings display 'function.feature_listings_horizontal.php'.
The price field in some of the listings is zero. I'd like to display nothing at all is the price field is empty. Here's the original code that siplays the price in the featured listings table: Code:
if($show_price=='Y')
{
$output.= $loop[$x][price];
}
Code:
if($show_price=='Y' && $price<>'$0.00') Thanks! Jim
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
|
|
|
|
#2 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,019
Rep Power: 116 ![]() |
Can you try this:
if($show_price=='Y' && $loop[$x][price] > 0)
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2007
Posts: 123
Rep Power: 13 ![]() |
Thanks Eric,
That got me on the right track - this is what worked: Code:
if($show_price=='Y' && $loop[$x][price] != "$0.00") Jim
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
|
|
|
|
#4 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,019
Rep Power: 116 ![]() |
Glad you got it.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Nov 2006
Posts: 190
Rep Power: 14 ![]() |
Quote:
Could "$0.00" be changed to show "POA", Price on Application Also is this good for v4
__________________
Costa del Sol Spain v3.1.10 Dev V4.09 Dev sweeeet �Powerful you have become, the dark side I sense in you.� |
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jan 2007
Posts: 123
Rep Power: 13 ![]() |
Hi CHRD,
Yes, you could replace the $0.00 with most anything. I haven't tried this, but I think it will work: Code:
if($show_price=='Y' && $loop[$x][price] != "$0.00")
{
$output.= $loop[$x][price];
}
else {
$output.="POA";
}
I don't know about V4 since I haven't tackled that yet... Regards, Jim
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Module smarty plugins are not available | marketingsolutions | v3.1 Questions & Support | 3 | 03-12-2008 09:33 AM |
| Smarty Function for Top Listing | Soleiltan | v3.1 Questions & Support | 1 | 02-05-2008 08:24 AM |
| Smarty Templates and You. Posted BY Lhotch | Eric Barnes | HTML, CSS, and Design Help | 13 | 10-02-2007 08:06 AM |
| Help with Smarty custom functions | Nealm | v3.1 Modules & Modifications | 2 | 07-09-2007 08:55 PM |
| Problems with updateOrder function | flyingpylon | v3.1 Questions & Support | 3 | 11-06-2006 08:58 PM |