How to Hide Closed Auctions on the Home Page?

A place to discuss and receive support for the Web Auction application.

How to Hide Closed Auctions on the Home Page?

Postby rickyspears » Thu Sep 03, 2009 1:48 pm

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!
rickyspears
 
Posts: 4
Joined: Thu Sep 03, 2009 1:42 pm

Postby shannah » Wed Sep 09, 2009 9:48 am

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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby rickyspears » Thu Sep 10, 2009 11:17 am

Perfect! Thank you!
rickyspears
 
Posts: 4
Joined: Thu Sep 03, 2009 1:42 pm


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 34 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved