extend an auction

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

extend an auction

Postby dmcwilliams » Tue Dec 16, 2008 4:53 pm

Is there any way to extend an auction if someone bids within the last x amount of minutes or seconds?

Thank you,
dmcwilliams
 
Posts: 1
Joined: Tue Dec 16, 2008 4:51 pm

Postby shannah » Wed Dec 17, 2008 10:48 am

In the tables/products/products.php file:

Code: Select all
function field__cooked_closing_time_seconds(&$record){
        $closing_time = $record->strval('closing_time');
        if ( !$closing_time ){
            $app =& Dataface_Application::getInstance();
            $closing_time = $app->_conf['df_auction']['closing_time'];
        }
       
        $closing_time_seconds = strtotime($closing_time);
        $high_bid = $record->val('high_bid');
        if ( $high_bid ){
            $bid_time = $high_bid->strval('time_of_bid');
            $closing_time_seconds = max($closing_time_seconds, strtotime($bid_time));
        }
        return $closing_time_seconds;
    }


Change the line:

Code: Select all
$closing_time_seconds = max($closing_time_seconds, strtotime($bid_time));


to

Code: Select all
$closing_time_seconds = max($closing_time_seconds, strtotime($bid_time)+300);


To extend auctions to 300 seconds (or 5 minutes) after the last bid.

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

Postby ltdan » Sat Sep 12, 2009 5:30 am

Hi there

This is exactly what I wanted but although it does extend the auction, it doesn't show it's been extended anywhere, i.e. the closing time doesn't change. Is there a way of transferring the extended time on to the displayed closing time. I'm thinking it can't because the closing time is in the MySQL database, whereas this script modification is an 'on the fly' adjustment.

So would it be possible to show this on the bidding page somewhere like a countdown timer, similar to the way e-bay works where it shows the minutes/seconds remaining till the auction closes and adjusts when the browser is refreshed?

Cheers
ltdan
 
Posts: 2
Joined: Sat Sep 12, 2009 5:17 am

Postby shannah » Thu Sep 17, 2009 9:42 am

Neat idea! Certainly anything is possible and this would probably be a simple modification. If you add it to the issue tracker as a feature request I can see if I can get to it. But reallistically it could be some time before I'm able to devote the time to this as I'm pretty tied up right now with other projects.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby ltdan » Thu Sep 17, 2009 11:19 am

Yeah, I think it should be pretty straight forward to update the mysql database with a new end time rather than the on the fly method, but the countdown timer may need some java script. I've had a play with WeBid and that seems to do it with some modification, but they don't have the single seller mod working that I need :( which this has :D
ltdan
 
Posts: 2
Joined: Sat Sep 12, 2009 5:17 am


Return to Web Auction Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

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