osCmax v2.5 User Manual
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Hide Zero Price

This is a discussion on Hide Zero Price within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I have some servies that do not have a determined price until certain things are selected. Is there a way ...

      
  1. #1
    Member suntech's Avatar
    Join Date
    Jul 2010
    Posts
    48
    Rep Power
    0


    Default Hide Zero Price

    I have some servies that do not have a determined price until certain things are selected. Is there a way I can hide the $0.00 on the product page but still have it show on products that have a set price? I did all prices on the product listings, but I just need to hide the 0s on the product page.

  2. #2
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Lightbulb Re: Hide Zero Price

    There's a contribution called "Call for Price" that could be easily adapted to just not display anything.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  3. #3
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: Hide Zero Price

    Call for price is a neater solution but if you want to hack in it quickly.

    Open product_info.tpl.php in your tempate folder.

    Find:
    <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
    Change it to:

    <td class="pageHeading" align="right" valign="top"><?php if ($products_price != 0 ) { echo $products_price; } ?></td>
    Or something similar - I have not tested but this should simply hide the price if it is zero ...

    Regards,
    pgmarshall
    _______________________________

  4. #4
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Exclamation Re: Hide Zero Price

    A very neat 'quick n dirty' method, that doesn't take into account the Buy It Now button, amongst other things. Just something to bear in mind.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  5. #5
    Member suntech's Avatar
    Join Date
    Jul 2010
    Posts
    48
    Rep Power
    0


    Default Re: Hide Zero Price

    Thanks. I went with the quick method because I dont use buy it now or anything like that and the call for price addon didnt seem compatable with OSCmax.
    PG - I tested and it works, problem is it hides all prices. I will mess with it later today, but if you have another idea let me know.
    Last edited by suntech; 10-29-2010 at 03:24 AM.

  6. #6
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Hide Zero Price

    If it is hiding all prices then the if is failing.

    It basically is always thinking that the price is zero.

    Try:
    <td class="pageHeading" align="right" valign="top"><?php if ($products_price != '0' ) { echo $products_price; } ?></td>
    Regards,
    pgmarshall
    _______________________________

  7. #7
    Member suntech's Avatar
    Join Date
    Jul 2010
    Posts
    48
    Rep Power
    0


    Default Re: Hide Zero Price

    That one brings the zero price back.

  8. #8
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Post Re: Hide Zero Price

    [I've implemented "Call for price" for 2 clients, with no issues.]
    Hosting plans with installation, configuration, contributions, support and maintenance.

  9. #9
    Member suntech's Avatar
    Join Date
    Jul 2010
    Posts
    48
    Rep Power
    0


    Default Re: Hide Zero Price

    Maybe you have, but the first instruction could not be found on my file. I figured it was because MAX is so modded. I'm not experienced enough to see what to do. I have no problem adding contributions if the code it tells me to change can be found.

  10. #10
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Post Re: Hide Zero Price

    This document may help.
    Attached Files Attached Files
    Hosting plans with installation, configuration, contributions, support and maintenance.

Page 1 of 3 123 LastLast

Similar Threads

  1. Does anyone know how to apply the mod hide price if $0
    By awstyles in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 07-12-2007, 06:12 PM
  2. Quantity Price Breaks Per Product Price Table Formatter
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-22-2007, 12:00 PM
  3. Quantity Price Breaks Per Product Price Table Formatter
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 03-20-2007, 10:02 PM
  4. Needing: Attribute Weight, Hide Price if 0, Actual Attribute
    By crystina in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 11-22-2006, 04:08 PM
  5. How to hide price in main page (default.php)
    By cybervin in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 01-24-2003, 06:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •