Support Forums

Old 06-04-2008, 12:08 PM   #1
Senior Member
 
Join Date: Jan 2007
Posts: 123
Rep Power: 13
HotAir is on a distinguished road
Default Modifying smarty function

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];
}
I need to change that conditional if statment to test for a non-zero value in the variable 'price'. I tried this but it didn't work:

Code:
if($show_price=='Y' && $price<>'$0.00')
Any clue how I can get this to work?

Thanks!
Jim
__________________
V3.1.10 Developer - live
V4.1.0 Beta 2 - sandbox
HotAir is offline   Reply With Quote
Old 06-04-2008, 12:10 PM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,019
Rep Power: 116
Eric Barnes is a jewel in the rough
Default

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
Eric Barnes is offline   Reply With Quote
Old 06-04-2008, 12:17 PM   #3
Senior Member
 
Join Date: Jan 2007
Posts: 123
Rep Power: 13
HotAir is on a distinguished road
Default

Thanks Eric,
That got me on the right track - this is what worked:
Code:
if($show_price=='Y' && $loop[$x][price] != "$0.00")
Regards,
Jim
__________________
V3.1.10 Developer - live
V4.1.0 Beta 2 - sandbox
HotAir is offline   Reply With Quote
Old 06-04-2008, 12:48 PM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,019
Rep Power: 116
Eric Barnes is a jewel in the rough
Default

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
Eric Barnes is offline   Reply With Quote
Old 06-14-2008, 06:04 PM   #5
Senior Member
 
CHRD's Avatar
 
Join Date: Nov 2006
Posts: 190
Rep Power: 14
CHRD is on a distinguished road
Default

Quote:
Originally Posted by HotAir View Post
Thanks Eric,
That got me on the right track - this is what worked:
Code:
if($show_price=='Y' && $loop[$x][price] != "$0.00")
Regards,
Jim

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.�
CHRD is offline   Reply With Quote
Old 06-15-2008, 03:23 PM   #6
Senior Member
 
Join Date: Jan 2007
Posts: 123
Rep Power: 13
HotAir is on a distinguished road
Default

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
HotAir is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 04:10 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0