Showing 0.00 on my featured listings

Discussion in 'Technical Support' started by jaybarber1, Jul 27, 2009.

Thread Status:
Not open for further replies.
  1. jaybarber1 horsesandclassifieds.com

    Hi, I need to get some help with this small problem. On my website I have featured listings and when people have not entered a price it just show 0.00

    Fortunately it only does this when viewing the featured listings on the home page. When you go to the specific page to view their ad it just show N/A. I'm running V4 Hosted. Purple Template. A step by step approach to fix this would be nice.Thanks
  2. Lhotch curmudgeon

    Your going to have to edit the plugin featured listings vertical or horizontal depending on which you use and tweak it to evaluate the value and if zero display N/A.
  3. jaybarber1 horsesandclassifieds.com

    Ok im using horizontal...do i need to go to layout.tpl? css style? or what? and do you have a specific line of code for me to seek? thanks
  4. seymourjames All Hands On Deck

  5. bowers01 Genius At Work

    I dont have a copy of the original code on me.
    But you need to change function.feature_listings_horizontal.php to
    Code:
    if($show_price=='Y')
    {
       if($loop[$x][price]=="$0.00"){
           $output.= "<b><a href='". $link ."' class='featuredtext'>P.O.A</a></b>";
       }else{
    					$output.= "<b><a href='". $link ."' class='featuredtext'>".$loop[$x][price] ."</a></b>";
       }
    }
    
    Im guessing its something like
    Code:
    $output.= "<b><a href='". $link ."' class='featuredtext'>".$loop[$x][price] ."</a></b>";
    
    It will be similar you should be able to find it, then replace it with the first lot of code i posted.
    Nick
  6. bowers01 Genius At Work

    Ok, i just downloaded a copy from 68c

    Find the following in function.feature_listings_horizontal.php
    Code:
    					if($show_price=='Y')
    					{
    					$output.= $loop[$x][price];
    					}
    Then replace it with
    Code:
    if($show_price=='Y')
    {
       if($loop[$x][price]=="$0.00"){
           $output.= "<b><a href='". $link ."' >P.O.A</a></b>";
       }else{
    					$output.= "<b><a href='". $link ."' >".$loop[$x][price] ."</a></b>";
       }
    }
    
    Should do the trick
  7. seymourjames All Hands On Deck

    That works as well. Most of this is in other threads.
  8. Lhotch curmudgeon

    Not sure why you are working with templates at all. As I said in the first reply to you, you need to edit the PLUGIN. Bowsers also laterstated...

  9. Lhotch curmudgeon

    What a plugin is, is covered in the manual. The plugin files are located in the plugins folder.
  10. seymourjames All Hands On Deck

    Why are you trying to use adobe reader when you need to edit the plugin files? At the very least you need a text editor or the built in editor that you get with cpanel.
  11. jaybarber1 horsesandclassifieds.com

    Ok keep sticking with me fella! Alright Im in the plesk control panel. I added the file function.feature_listings_horizontal.php

    I finally found the part where Nick instructed me to change I pressed save.No changes occured on my site. Did I do this right?
  12. seymourjames All Hands On Deck

    If you made the changes and presumably they were saved through your control panel then it should be showing. Try to clear your browser cache and cookies. Also, use the maintenance tool in your admin control panel (modules) to clear your templates_c folder (templates cache).
  13. bowers01 Genius At Work

    on your site does it show up as $0.00 or 0.00
    If it shows up as 0.00 remove the $ out of
    Code:
     if($loop[$x][price]=="$0.00"){
    so it looks like
    Code:
     if($loop[$x][price]=="0.00"){
    Nick
  14. jaybarber1 horsesandclassifieds.com

    Ok tried that too..still not working :eek:.. but here goes...I went in to Plesk Control Panel. Added a new file (function.feature listings horizontal.php) to (cgi.bin) . Went to the file and pressed the pencil for edit. I cleared out cache,history, and went to my other control panel and performed the maintenance..twice might I add. Anyways I edited the code,which I took out the $ symbol like Nick instructed now..it is as follows.....


    if($show_price=='Y')
    {
    if($loop[$x][price]=="0.00"){
    $output.= "<b><a href='". $link ."' >P.O.A</a></b>";
    }else{
    $output.= "<b><a href='". $link ."' >".$loop[$x][price] ."</a></b>";
    }
    }
  15. bowers01 Genius At Work

    You have me a little confused.
    Are you editing www/includes/classes/smarty/plugins/function.feature listings horizontal.php ?
    Nick
  16. jaybarber1 horsesandclassifieds.com

    Yes, ..Ok when I go to Plesk Control Panel, I went to (Manage Files on Domain) . I then clicked on a folder that displayed (cgi-bin). Next I clicked Add New File. The downloads I got from 68classifieds are on my computer. So after clicking Add New File, I uploaded the plug in (function.feature listings horizontal.php) to the folder cgi-bin that I clicked on. From there I edited the multiple ways as you guys instructed previously. This is about as structural as I can break down as to what I've done. Maybe Im in the wrong location?? idk??

    thanks
  17. bowers01 Genius At Work

    well theres your problem :D
    By putting that file there it will do nothing at all.
    You need to make the change to the file stored on your local computer. Then in the file manager browse to www/includes/classes/smarty/plugins/ and then upload/add new file, the function.feature listings horizontal.php that you changed and it should promt for you to replace it.
    Nick
  18. Lhotch curmudgeon

    Or better yest just edit the file thats already on your server. Most web hosting control panels allow you to edit files already on the server.
  19. jaybarber1 horsesandclassifieds.com

    a ha! Jut found out about filezilla and transferring files to server..etc. I cant make a change to a file on my computer and just expect something to happen on my site..lol..I know Im not as computer witty as yall but Im learning! Thanks for everything!
  20. bowers01 Genius At Work

    Have you got it working? why cant you change it on your computer?
    Nick
Thread Status:
Not open for further replies.

Share This Page