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