Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Hide sold out products from category listings and search without disabling produc

    Quote Originally Posted by Ajeh View Post
    Edit the file:
    /includes/index_filters/default_filter.php

    and add the code around line 27 that is in red above the code in black:
    Code:
      $alpha_sort .= " and p.products_quantity > 0 ";
      if (!isset($select_column_list)) $select_column_list = "";
    I noticed that when using the Filter by Manufacturer or Alpha sorter, that products with >0 re-appear in the product listing, any quick fixes to this?

    Thanks

  2. #12
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Hide sold out products from category listings and search without disabling produc

    disregard, my mistake, I forgot to save file before refreshing page.

  3. #13
    Join Date
    Dec 2010
    Posts
    138
    Plugin Contributions
    0

    Default Re: Hide sold out products from category listings and search without disabling produc

    @Ajeh, Pardon me for asking but is this technique safe to do, since the products will no longer be displayed on the site, but will still show on search engines?

  4. #14
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide sold out products from category listings and search without disabling produc

    This hides it from the Categories listings ... not from anything else ...

    Test it out and you should not see it when navigating the Categories listing, but you will see it in the sideboxes and centerboxes and New Products listing (if new) and All Products listing and Specials listing (if on special) and Featured listing (if a featured product) ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #15
    Join Date
    Dec 2010
    Posts
    138
    Plugin Contributions
    0

    Default Re: Hide sold out products from category listings and search without disabling produc

    Your right. I tested it on my site and they still appear on the sideboxes. I was worried the website would get penalized if the out of stock items weren't showing on the site but on the search engines. I guess it wouldn't get penalized. Thanks Ajeh.
    Last edited by ricangem; 16 Sep 2012 at 02:43 PM.

  6. #16
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide sold out products from category listings and search without disabling produc

    NOTE: the spiders are seeing just what you are on this as nothing is masked with css but actually either there or not there based on the code change ... and spiders can only see what is actually there ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #17
    Join Date
    May 2014
    Location
    Florida
    Posts
    13
    Plugin Contributions
    0

    Default Re: Hide sold out products from category listings and search without disabling produc

    To get this to work for 1.5 users, see this post


    http://www.zen-cart.com/showthread.p...91#post1245791

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Hide Normalprice for sold out products & in product listing page ONLY!
    By Green Books in forum General Questions
    Replies: 1
    Last Post: 4 Oct 2015, 06:06 PM
  2. Hide out of stock products from advanced search
    By solo_400 in forum Basic Configuration
    Replies: 4
    Last Post: 28 Mar 2013, 06:08 PM
  3. Hide upcoming products from all and category listings
    By jmsnyder23 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 Mar 2012, 02:44 PM
  4. Hide Sold out product from Product Listing page
    By needsome in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 May 2011, 06:49 PM
  5. Replies: 7
    Last Post: 28 Mar 2011, 04:08 AM

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