Support Forums

featured ads home page

This is a discussion on featured ads home page within the Technical Support forums, part of the Technical Support Forums category; Can someone please tell me how to make the featured ads on the home with price field of $0.00 display ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 06-11-2009, 10:06 PM   #1
Customer
 
Join Date: Jun 2009
Posts: 38
Rep Power: 6
darkqueen is on a distinguished road
Default featured ads home page

Can someone please tell me how to make the featured ads on the home with price field of $0.00 display contact seller.
i tried this from the archive on the function.feature_listings_horizontal.php but it had no effect:

$output.=$loop[$x][title] ."<br />";
if($show_price=='Y')
{
if(price=='0.00')
{
$output.="N";
}
else
{
$output.= $loop[$x][price];
}
}
//close td
$output.="</td>\n";

i believe eric posted iti'm using V4.1.3 Designer - Default Template
thank you
darkqueen is offline  
Old 06-11-2009, 10:18 PM   #2
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,973
Rep Power: 58
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Try this instead:
PHP Code:
if($show_price=='Y')
{
    if(
$loop[$x][price]=='0.00')
    {
        
$output.="Contact Seller";
    }
    else
    {
         
$output.= $loop[$x][price];
    }

__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 06-11-2009, 11:00 PM   #3
Customer
 
Join Date: Jun 2009
Posts: 38
Rep Power: 6
darkqueen is on a distinguished road
Default

I'm not sure if this is correct because nothing changed.

$output.=$loop[$x][title] ."<br />";

if($show_price=='Y')
{
if($loop[$x][price]=='0.00')
{
$output.="Contact Seller";
}
else
{
$output.= $loop[$x][price];
}
}
}
//close td
$output.="</td>\n";

thanks
__________________
Victoria Abrams-Zantar Designs
<a href=http://Wellington-WEF.com target=_blank>http://Wellington-WEF.com</a>
V4.1.5 Designer - Default Template
"There is a crack in everything. That's how the light gets in."
 Leonard Cohen
darkqueen is offline  
Old 06-11-2009, 11:20 PM   #4
Customer
 
Join Date: Jun 2009
Posts: 38
Rep Power: 6
darkqueen is on a distinguished road
Default

okay my page has disappeared, changing everything back.i don't know if anyone is around now.goodnight all.
__________________
Victoria Abrams-Zantar Designs
<a href=http://Wellington-WEF.com target=_blank>http://Wellington-WEF.com</a>
V4.1.5 Designer - Default Template
"There is a crack in everything. That's how the light gets in."
 Leonard Cohen
darkqueen is offline  
Old 06-11-2009, 11:40 PM   #5
Customer
 
Join Date: Jun 2009
Posts: 38
Rep Power: 6
darkqueen is on a distinguished road
Default

okay before i lay me down to sleep, this is what was in the file originally:

//text
$output.=$loop[$x][title] ."<br />";
if($show_price=='Y')
{
$output.= $loop[$x][price];
}
//close td
$output.="</td>\n";
}
else
{
tried the above and page disappeared.
__________________
Victoria Abrams-Zantar Designs
<a href=http://Wellington-WEF.com target=_blank>http://Wellington-WEF.com</a>
V4.1.5 Designer - Default Template
"There is a crack in everything. That's how the light gets in."
 Leonard Cohen
darkqueen is offline  
Old 06-12-2009, 08:50 AM   #6
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,973
Rep Power: 58
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

I did not test the code that I posted, however in looking at it again, I believe that the price is already formatted when it reaches the template. You may want to try changing my original code to "$0.00" with the dollar sign or what ever currency code you are using.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 06-12-2009, 01:43 PM   #7
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,788
Rep Power: 67
seymourjames is a jewel in the rough
Default

Try this. Have to fly so don't have time to test. If you find the variable is not formatted try 0.00 without the $ sign.

$output.= {$loop[$x][price]|replace:'$0.00':'contact seller'};

let us know.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline  
Old 06-12-2009, 02:13 PM   #8
curmudgeon
 
Join Date: Mar 2006
Posts: 5,275
Rep Power: 130
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

//text
$output.=$loop[$x][title] ."<br />";
if($show_price=='Y')
{
if($loop[$x][price] == "$0.00"){
$output.= "Contact Seller";
}else{
$output.= $loop[$x][price];
}
}
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having trouble putting Featured Listings on my Home Page michael Templates, HTML, CSS, and Design Help 16 10-17-2008 03:24 PM
Price show up at featured home page need to be off cranko Technical Support 7 04-08-2008 08:10 AM
How show up 12 featured listing in home page ? Marcelo Templates, HTML, CSS, and Design Help 2 05-01-2007 01:21 AM


All times are GMT -4. The time now is 06:43 AM.


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