This is all handled in the tables/products/products.php file, in the methods:
- Code: Select all
function field__isOpen(&$record){
return ($record->val('opening_time_seconds') < time() and time() < $record->val('cooked_closing_time_seconds'));
}
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;
}
It's pretty simple. The field__cooked_closing_time_seconds() method returns the unix timestamp of when the
the product will be closed. And the field__isOpen() method returns a boolean value of whether or not the
auction is open.
To debug this issue, you can try putting some echo statements in at various places to see where it is going wrong.
-Steve