Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2014
    Location
    ohio
    Posts
    216
    Plugin Contributions
    0

    Default can I prevent sold out items from appearing in search

    Just like title says, how can I prevent items with "0" quantity from appearing in searches?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: how to prevent sold out items from appearing in search

    Do you still want or still display such items on your site? (meaning that one could still get to them if the uri is known?)
    From what search(es) are you trying to block the item(s)?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2014
    Location
    ohio
    Posts
    216
    Plugin Contributions
    0

    Default Re: how to prevent sold out items from appearing in search

    After I sell a part, I move it to the "Sold" folder with "0" quantity.
    All I want to do is prevent any item with "0" quantity from appearing in any search in my store.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: how to prevent sold out items from appearing in search

    Quote Originally Posted by mespe View Post
    After I sell a part, I move it to the "Sold" folder with "0" quantity.
    All I want to do is prevent any item with "0" quantity from appearing in any search in my store.
    So is the "Sold" folder navigable by a customer at your site?

    Point is that until a search engine detects that the product is no longer reachable, it will maintain it in its list. There are multiple ways to try to inform it of such, but generally speaking it takes a while for it to get to the search engine just like it takes a while for it to be removed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Sep 2014
    Location
    ohio
    Posts
    216
    Plugin Contributions
    0

    Default Re: how to prevent sold out items from appearing in search

    No, you don't understand. I don't mean search engines, I'm talking about searching within the store, using the search button provided by zencart. Sorry if I wasn't clear in my OP

  6. #6
    Join Date
    Sep 2014
    Location
    ohio
    Posts
    216
    Plugin Contributions
    0

    Default Re: how to prevent sold out items from appearing in search

    This is what I want to do, but just don't know how to accomplish it,,,
    https://www.zen-cart.com/showthread....91#post1245791

  7. #7
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: how to prevent sold out items from appearing in search

    Hi mespe,

    open this file:

    includes/modules/pages/advanced_search_result/header.php

    search for this line:
    $where_str = " WHERE (p.products_status = 1

    change it to:
    $where_str = " WHERE (p.products_status = 1 and p.products_quantity > 0

  8. #8
    Join Date
    Sep 2014
    Location
    ohio
    Posts
    216
    Plugin Contributions
    0

    Default Re: how to prevent sold out items from appearing in search

    Quote Originally Posted by yaseent View Post
    Hi mespe,

    open this file:

    includes/modules/pages/advanced_search_result/header.php

    search for this line:
    $where_str = " WHERE (p.products_status = 1

    change it to:
    $where_str = " WHERE (p.products_status = 1 and p.products_quantity > 0
    I hope you mean header_php.php as that's the file in the advanced_search_result directory
    ,,, yes it works,,, THANKS

  9. #9
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: how to prevent sold out items from appearing in search

    Potayto Potaato...

    Yes that's the one.

    You can also prevent sold out items from appearing in New Products listing, All Products listing and a few other places by doing a similar thing with the default_filter.php.

 

 

Similar Threads

  1. Replies: 16
    Last Post: 2 May 2014, 10:07 PM
  2. v139h How do I keep Sold Items from appearing on new products?
    By mooncavecrystals in forum General Questions
    Replies: 4
    Last Post: 30 Jun 2012, 02:07 PM
  3. Can I make stop backorders of one-of-a-kind items once sold out?
    By Skybye in forum Managing Customers and Orders
    Replies: 1
    Last Post: 12 May 2009, 06:55 AM
  4. How can I prevent the constant from appearing inside a button?
    By ecobebe in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Jun 2006, 06:56 PM

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