Results 1 to 10 of 21

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,122
    Plugin Contributions
    0

    Default Make a product that is sold out not appear in listings, sideboxes

    Is there any way to make a product which is marked as sold out, not appear in product listings, centreboxes etc.

    I don't want to delete the product or turn it off as that makes a page not found, so I want to mark it as sold out, but not come up in the current products listings on my sites.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,718
    Plugin Contributions
    6

    Default Re: Make a product that is sold out not appear in listings, sideboxes

    For the Product Listing, edit the file:
    /includes/index_filters/default_filter.php

    and where you find in each of the SELECT statements:
    Code:
           where p.products_status = 1
    add to it:
    Code:
           where p.products_status = 1
           and p.products_quantity > 0
    For the Centerboxes, you would need to do the same thing, example for the Featured Products centerbox edit the file, using your templates and overrides:
    /includes/modules/featured_products.php

    copy to:
    /includes/modules/your_templates_dir/featured_products.php

    and add the same thing to each of the SELECT statements:
    Code:
                               and p.products_status = 1 and f.status = 1
    to read:
    Code:
                               and p.products_status = 1 and f.status = 1
                               and p.products_quantity > 0
    and that will prevent the display of Sold Out Products ...
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,122
    Plugin Contributions
    0

    Default Re: Make a product that is sold out not appear in listings, sideboxes

    Excellent thanks.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,718
    Plugin Contributions
    6

    Default Re: Make a product that is sold out not appear in listings, sideboxes

    Thanks for the update that this worked for you ...
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,122
    Plugin Contributions
    0

    Default Re: Make a product that is sold out not appear in listings, sideboxes

    Actually, couple of issues. Those products still show in searches (and not for those particular products - but they just happen to have a keyword used in it, ie 'dress') and they still show in the new products page and all products page.

    Any way of preventing this?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,718
    Plugin Contributions
    6

    Default Re: Make a product that is sold out not appear in listings, sideboxes

    Peek at the:
    /includes/modules/pages/advanced_search_result/header_php.php

    Code:
    $where_str = " WHERE (p.products_status = 1
                   AND p.products_id = pd.products_id
                   AND pd.language_id = :languagesID
                   AND p.products_id = p2c.products_id
                   AND p2c.categories_id = c.categories_id ";
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 

Similar Threads

  1. Replies: 15
    Last Post: 16 Sep 2012, 04:45 PM
  2. Sold out button only on main page product listings?
    By jt3c in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Jun 2011, 04:14 PM
  3. Make product listing look like the all listings
    By Derek_ICD in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 May 2009, 12:42 PM
  4. Make all product listings formatted like Specials?
    By Bad Wolf in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Jun 2008, 05:37 PM
  5. Make a product go to affiliate link not product page (sold out)
    By apemusic in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 29 May 2006, 09:03 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
  •