Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    21
    Plugin Contributions
    0

    Default Hiding the price on Product Listing page when and item is Out of Stock

    I'm looking for a way to hide the price of a product when it is out of stock.

    I want product to still show up on the product listing page, but don't want the price displayed.

    I found this thread which had instructions for hiding the price when the Qty was zero on the Product Info page:
    https://www.zen-cart.com/showthread....f-out-of-stock
    I have done this and it was EXACTLY what I'm looking for, but I would also like to do this for the Product Listing Page (someone else asked the same question on that thread as well, but it's now closed)

    Thanks all

  2. #2
    Join Date
    Feb 2010
    Posts
    21
    Plugin Contributions
    0

    Default Re: Hiding the price on Product Listing page when and item is Out of Stock

    I'm assuming I will need to add something to the product_listing.php

    Like, if product quantity is zero, display price as "[blank]" or something like that.

    But it's the specifics on what to code and where that that eludes me =)

  3. #3
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Hiding the price on Product Listing page when and item is Out of Stock

    in: /includes/modules/YOUR_TEMPLATE_FOLDER/product_listing.php

    FIND:
    PHP Code:
            $lc_text =  $lc_price
    CHANGE TO:

    PHP Code:
            if ($listing->fields['products_quantity'] > 0) {
            
    $lc_text =  $lc_price;    
            } else {
            
    $lc_text =  '';
            } 

  4. #4
    Join Date
    Feb 2010
    Posts
    21
    Plugin Contributions
    0

    Default Re: Hiding the price on Product Listing page when and item is Out of Stock

    THANK YOU !!!
    Perfect

    I appreciate it so much!

 

 

Similar Threads

  1. Replies: 20
    Last Post: 26 Oct 2011, 12:21 AM
  2. Stock by Attribute setup and product has stock when added to card says out of stock
    By kwrosenzweig in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Jun 2011, 06:18 PM
  3. Hiding Attributes when out of stock in that size
    By afterglow in forum Setting Up Categories, Products, Attributes
    Replies: 20
    Last Post: 8 Jul 2009, 05:19 AM
  4. Selling an item when out of stock
    By confused_aswell in forum Managing Customers and Orders
    Replies: 2
    Last Post: 15 Oct 2008, 09:17 PM
  5. How to I do product pages W/OUT the image and price on the top of the page?
    By triswim in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Mar 2008, 07:46 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR