Page 1 of 1

How to Hide Closed Auctions on the Home Page?

PostPosted: Thu Sep 03, 2009 1:48 pm
by rickyspears
I'm looking for a way to hide closed auctions on the home page. I'm not seeing any way to filter this query. We've created a new category called "Closed Auctions" and an administrator will move them to that category after they close--so we want them to be visible in that category, but we don't want them to show up on the home page.

So, I need some way to filter out items on the home page only that are in the "Closed Auctions" category, or some way to filter out items with a Closing Time before the current date/time.

Thanks in advance!

PostPosted: Wed Sep 09, 2009 9:48 am
by shannah
At the beginning of your index.php file, you could add the necessary search parameters to eliminate the closed auctions.

You need to know the category id of your closed auctions category. An easy way to find this out is to click on your closed auctions category and look at the resulting URL. It will contain something like:

product_categories=10

(if the category id is 10).

Remember this category id. Suppose the category id is 10, then you would add the following to the beginning of the index.php file:

Code: Select all
if ( !$_POST and !isset($_GET['product_categories']) ){
    $_GET['product_categories'] = $_REQUEST['product_categories'] = '!=10';
}


Now the default page should show products in all categories except your closed items category.

PostPosted: Thu Sep 10, 2009 11:17 am
by rickyspears
Perfect! Thank you!