Login Form

#218 – Automatic bidding and minimum bid problem

Posted in ‘BF Auction’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Saturday, 10 May 2014 21:48 AEST
picht
Joomla! version: 3.3.0
BF auction version 1.5.4

Hi

I have this scenario:
An auction with these settings
Minimum bid 200
Increment 1
Automatic bidding Yes

User A bids 100
Current bid is therefore 1
User B bids 250
Current bid is now 101
Auction ends
No one wins acordig to BF

In my opinion User B has won the auction with 200 as this was the minimum bid and B has bid 250.

Regards
Picht
 
Saturday, 24 May 2014 00:13 AEST
picht
Hi

On the tickets page it looks as if there is an answer to this comment, but i can't see it ?

Regards
Picht
 
Wednesday, 25 June 2014 14:25 AEST
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
Monday, 21 July 2014 23:24 AEST 60'
Tim
Everything Bundle, BF Quiz Plus 3 Years, BF Survey 12 Months
Hi Picht,
Sorry for the delay on this. I've tested the scenario you outline, and was able to reproduce the issue on my dev site. I totally agree with your logic that User B should win with 200.

While debugging, I noticed a few errors that helped pinpoint the problem. This should be all fixed now in v1.5.13
http://tamlynsoftware.com/download/bf-auction-plus/bf-auction-plus-1-5-13.html

In case you are interested in the details of the change and the errors I saw, please find below.

Notice: Undefined property: stdClass::$itemId in \components\com_bfauction_plus\controller.php on line 1136

/components/com_bfauction_plus/controller.php

//Line 1136
$query->where('a.itemid='.(int)$row->itemId);

//change to
$query->where('a.itemid='.(int)$row->id);


//line 1170
$query->where('id = '.(int)$row->itemId);

//change to
$query->where('id = '.(int)$row->id);


I then saw a whole bunch of errors

Notice: Undefined property: stdClass::$itemId in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$username in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$uid in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$email in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$bid_time in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$bidCurrency in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$tax in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$commission in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$maxbid in \components\com_bfauction_plus\controller.php on line 1184
Notice: Undefined property: stdClass::$deliveryOption in \components\com_bfauction_plus\controller.php on line 1184

//line 1184
$query->values( (int)$row->itemId.', '.$db->quote( $db->escape($row->username), false ).', '.(int)$row->uid.', '.$db->quote( $db->escape($row->email), false ).', '.(float)$row->reservePrice.', '.$db->quote($row->bid_time, false ).', '.$db->quote($row->bidCurrency, false ).', '.(float)$row->tax.', '.(float)$row->commission.', '.(float)$row->maxbid.', '.(int)$row->quantity.', '.$db->quote( $db->escape($row->deliveryOption), false ) );


//change to
$query->values( (int)$row->id.', '.$db->quote( $db->escape($autobidrows[0]->username), false ).', '.(int)$row->uid.', '.$db->quote( $db->escape($autobidrows[0]->email), false ).', '.(float)$row->reservePrice.', '.$db->quote($row->bid_time, false ).', '.$db->quote($row->bidCurrency, false ).', '.(float)$row->tax.', '.(float)$row->commission.', '.(float)$row->maxbid.', '.(int)$row->quantity.', '.$db->quote( $db->escape($row->deliveryOption), false ) );


//and add to the query around line 1073
$query->select('uid, tax, commission');

//line 1135
$query->select('a.username, a.uid, a.email, a.bid, a.maxbid, a.itemid, a.id');

//change to
$query->select('a.username, a.uid, a.email, a.bid, a.maxbid, a.itemid, a.id, a.bid_time, a.bidCurrency, a.deliveryOption');


regards

Tim
Follow us on twitter http://twitter.com/tamlynsoftware
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.
Go to top