Recurring Auction - no bids

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

Recurring Auction - no bids

Postby bobede » Thu Jan 10, 2008 7:03 am

Hi Steve,

I have set up a charity auction site where people donate items which are auctioned off, and the proceeds go to children's charities. As the site is new, many items reach the end of the auction with no bids. Is it possible to have auctions which close with no bid, automatically reopen with an extended auction close date (ie. plus one month)?

Thanks

Bob
bobede
 
Posts: 24
Joined: Tue Oct 30, 2007 7:01 am

Postby shannah » Fri Jan 11, 2008 9:47 am

Hi Bob,

This is a good idea, though not yet supported by default. It wouldn't be hard to add this sort of thing in though.

In the include/functions.inc.php file, there is a function called closeAuction(). This is called when the auction is meant to be closed. One section in that function deals specifically with the case where nobody has bid on the product:
Code: Select all
if (!isset($username) ){
        // No username was set as the high bidder for this product.  That means that nobody wins.
        // send an email notification to the admin about this product - and record that the
        // notification was sent - so it doesn't get sent twice.
        if ( !$closeRec->val('admin_email_sent') ){
            sendAdminEmail('Auction closed without bids','The auction for product "'.$product->getTitle().'" was closed without any bids having been made on it.');
            $closeRec->setValue('admin_email_sent',1);
            $closeRec->save();
        }
        return PEAR::raiseError("Nobody bid on the product '".$product->getTitle()."'");
    }


You could change this to:

Code: Select all
if ( !isset($username) ){
    $product->setValue('closing_time', date('Y-m-d H:i:s', time()+(60*60*24*30)));
    $product->save();
    return;
}


This would extend the auction by 30 days in the case where it closed without any bids.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby bobede » Thu Jan 24, 2008 7:10 am

Thanks Steve!

I'll give that a try.
bobede
 
Posts: 24
Joined: Tue Oct 30, 2007 7:01 am


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

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