WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000009WeBidBiddingpublic2009-04-16 07:432015-04-01 17:06
Reportercavimales 
Assigned To 
Priority@0@SeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version0.7.3 / 0.7.4 
Target VersionFixed in Version 
Summary0000009: Bid amount error
DescriptionI'm posting two issues here which are closely coupled with each other. I don't think it would be meaningful to post them in separate threads.



I'll describe the issues using the following scenario so that you can reproduce it...



* Suppose that an auction starts with 10 GBP and the increment is 1 GBP.

* Bidder A sets his maximum bid to 12 GBP and starts bidding

* Next, bidder B sets his maximum bid to 12.5 GBP and starts bidding.

* Soon the system bids 12 GBP on behalf of A and B's bid should be 13 GBP (current bid + increment), but B has already set his maximum bid to 12.5 GBP. Therefore B cannot bid for 13 GBP. At the same time B cannot bid for 12.5 GBP since it violates the bid increment rule.

* However the system records B's bid as 13 GBP.

* Then the system displays the next minimum bid as 14 GBP.

* But if another user bids for 14 GBP the system records his bid (current bid) as 13.5 GBP and displays the next minimum bid as 14.5 GBP.



To be clear, the two issues that I have mention here are:

1. The system updates the current bid with an amount that the bidder is not willing to pay

2. The system records an amount for the current bid which is lower than the next minimum bid displayed by the system prior to bid



The second issue arises only in the presence of the first issue... Hope I didn't confuse anybody :)



When I went through the code I found that the system calculating the next bid, when the bid amount is higher that the proxy bid, using the following formula



[PHP]

if ($proxy_max_bid < $bid) {

    $next_bid = $proxy_max_bid + $increment;

........

[/PHP]



and the current bid and the bid history are updated in the database using the $next_bid variable value and the proxy bid table is updated using the variable $bid. I think the problem stems from this...



In my humble opinion, the system should not allow a bidder to enter bid amounts that are not equal to $minimum_bid + ($increment * n) where n is a whole number.. (correct me if I'm wrong :))



I have attached some screen shots as well so that u can understand the scenario better...



Thanks in advance to all who will look into this matter!!!!
TagsNo tags attached.
import_id9
Thread
Attached Fileszip file icon Screenshots.zip [^] (395,902 bytes) 2015-04-01 17:06
zip file icon Screenshots_2.zip [^] (237,057 bytes) 2015-04-01 17:06

- Relationships

-  Notes
(0000022)
renlok (administrator)
2009-04-16 11:32
edited on: 2009-04-18 01:10

see http://www.webidsupport.com/project.php?issueid=9#note57[/url] [^]
(0000025)
cavimales (reporter)
2009-04-17 18:48
edited on: 1970-01-01 00:00

Thanks Renlok!
I didn't apply your fix yet.... I'll apply it and will let you know if there is any issue in the testing process... Hope there won't be any issue! :)
(0000026)
cavimales (reporter)
2009-04-17 22:05
edited on: 1970-01-01 00:00

Renlok! I applied your fix and found some issues... I'll list them below. I used the same scenario that I used to find the bug to test your fix..

* When bidder B bids for 12.5 GBP, the system notified that B's bid was not enough to become the highest bidder and offered another chance to bid.
* Suppose that B did not choose to bid again and went to the item's page. There it showed that bidder B is the current highest bidder (issue 0000001) and displayed the current bid as 12 GBP and the next minimum bid as 13 GBP
*But in the auction history B's bid for 12.5 GBP is recorded! (issue 0000002)
*Suppose that B is willing to bid again and enters a bid for 13 GBP which is the minimum bid recommended by the system
*But the system replies that B's bid is below the minimum bid and displays the minimum bid as 13.5 GBP! (issue 0000003)

To my knowledge, the possible reasons for the above issues may be the 12.5 GBP bid getting recorded as a bid and the current bid remaining at 12 GBP after the 12.5 GBP bid.

I have attached some screen shots so that u can understand the scenario better...

Thanks!
(0000027)
renlok (administrator)
2009-04-18 01:10
edited on: 1970-01-01 00:00

ok undo what i posted before it looks like it was complete rubbish but this seems to work fine.

before
[PHP]if ($proxy_max_bid < $bid)[/PHP]
add
[PHP]if (($proxy_max_bid + $increment) > $bid && $proxy_max_bid < $bid)
{
    $cbid = $proxy_max_bid;
    // Update bids table
    $query = "INSERT INTO " . $DBPrefix . "bids VALUES (NULL, " . $id . ", " . $proxy_bidder_id . ", " . floatval($next_bid) . ", '" . $NOW . "', " . $qty . ")";
    $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__);
    $query = "UPDATE " . $DBPrefix . "counters SET bids = (bids + 1)";
    $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__);
    $query = "UPDATE " . $DBPrefix . "auctions SET current_bid = " . $next_bid . ", num_bids = (num_bids + 1) WHERE id = " . $id;
    $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__);
    $errmsg = $ERR_607;
    $next_bid = $cbid + $increment;
}[/PHP]
and change
[PHP]if ($proxy_max_bid < $bid)[/PHP]
to
[PHP]if ($proxy_max_bid < $bid && !isset($errmsg))[/PHP]
(0000030)
cavimales (reporter)
2009-04-20 08:13
edited on: 1970-01-01 00:00

Thanks renlok! It works!

The bid history shows that the bidder A has bid consecutively for 10 GBP and then for 11 GBP. This means that A has outbid himself. Can a bidder outbid himself? Apart from this issue it works fine...
(0000031)
renlok (administrator)
2009-04-20 10:20
edited on: 2009-04-20 10:22

yeah i notice that but i didn't know how else to put it, well hes outbid himself with a proxy bid so i spose its OK
(0000035)
cavimales (reporter)
2009-04-22 06:02
edited on: 2009-04-22 07:01

http://www.webidsupport.com/project.php?issueid=9#note72[/url] [^]
(0000037)
cavimales (reporter)
2009-04-22 06:46
edited on: 2009-04-22 07:05

I found some issues after applying your patch and have documented them below.

(1) When bidder B bids for 12.5 GBP the system says that the current bid is 12 GBP and suggested the next minimum bid as 13 GBP, but the bid history did not have a bid recorded for 12 GBP!

I think the reason may be the current bid and the bid values are updated in the databases with the value of $next_bid and not with the value of $proxy_bid. I hope the problem will be solved if the $proxy_bid values are used for updating bid and current bid values in the database.

(2) The second issue is, what if the bidder B does not choose to bid for 13 GBP as the system proposed and no one else bid on this item thereafter? Won't this ultimately result in bidder A becoming the winner outbidding himself? Also, if the system behaves in this way, sellers can exploit this in different ways to increase the final bid amount such as having a fake account and bidding for for amounts like 12.5 GBP as described in the above scenario!
(0000036)
renlok (administrator)
2009-04-22 10:49
edited on: 1970-01-01 00:00

Thats a good point, maybe the best way around this is let the system ignore the increment in this instance.
(0000038)
cavimales (reporter)
2009-04-22 11:31
edited on: 1970-01-01 00:00

Ebay allows a bid to be outbid by less than full bid increment. They have explained it using a similar scenario to that I have used in this thread... According to ebay, bidder B must become the winning bidder and the current bid should be 12.5 GBP! For me it is acceptable (of course, after reading their explanation).

http://pages.ebay.com/help/buy/bid-increments.html#outbid[/url] [^]
(0000039)
cavimales (reporter)
2009-04-27 03:39
edited on: 1970-01-01 00:00

The original code of still has a bug as mentioned below with regard to the scenario described in the first post.

* The system records B's bid as 13 GBP, instead of 12.5 GBP.
* Then the system displays the next minimum bid as 14 GBP, instead of 13.5 GBP.

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 9
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2009-04-16 07:43
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2009-05-07 12:13
2015-04-01 17:06 renlok File Added: Screenshots.zip
2015-04-01 17:06 renlok File Added: Screenshots_2.zip


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker