WeBid Bug Tracking - WeBid
View Issue Details
0000273WeBidBiddingpublic2011-05-07 20:202013-08-18 20:28
bondango 
 
@0@minorhave not tried
resolvedfixed 
1.0.1 
1.1.0 
275
0000273: YOUR BIDS PROBLEM - on Items out bid on (yourbids.php)
Have Noticed this serious Problem a few times now.



When looking at the yourbids page, on some of the items i have been out bid on, it shows the actually current bid price of the item i.e. i know how much i need to place to be the winner again.



I think this is quite serious as it renders the auction unfair to any user.



Marty
No tags attached.
Issue History
2015-04-01 13:17renlokNew Issue
2015-04-01 13:17renlokimport_id => 275
2015-04-01 13:17renlokDate Submitted2015-04-01 13:17 => 2011-05-07 20:20
2015-04-01 13:17renlokLast Update2015-04-01 13:17 => 2013-08-18 20:28

Notes
(0000704)
Box Lot   
2011-05-07 21:21   
(edited on: 1970-01-01 00:00)
Mine is significantly edited so you will have to try this fix but based on 1.0.2's yourbids.php and I think-

On/around line 19 Find:
$query = "SELECT a.current_bid, a.id, a.title, a.ends, b.bid, b.quantity, p.bid As proxybid FROM " . $DBPrefix . "bids b
        LEFT JOIN " . $DBPrefix . "auctions a ON (a.id = b.auction)
        LEFT JOIN " . $DBPrefix . "proxybid p ON (p.itemid = a.id)

Replace with:
$query = "SELECT a.current_bid, a.id, a.title, a.ends, b.bid, b.bidder, b.quantity, p.bid As proxybid FROM " . $DBPrefix . "bids b
        LEFT JOIN " . $DBPrefix . "auctions a ON (a.id = b.auction)
        LEFT JOIN " . $DBPrefix . "proxybid p ON (p.userid = b.bidder)

Test it out. I think 1.0.1 is the same. You should upgrade soon to 1.0.2.
(0000705)
bondango   
2011-05-07 22:57   
(edited on: 1970-01-01 00:00)
heres my code with the mods outline above

include 'includes/common.inc.php';

// get active bids for this user
$query = "SELECT a.current_bid, a.id, a.title, a.ends, b.bid, b.bidder,
b.quantity, p.bid As proxybid FROM " . $DBPrefix . "bids b
        LEFT JOIN " . $DBPrefix . "auctions a ON (a.id = b.auction)
        LEFT JOIN " . $DBPrefix . "proxybid p ON (p.userid = b.bidder)
        WHERE a.closed = 0 AND b.bidder = " . $user->user_data['id'] . "
        AND a.bn_only = 'n' ORDER BY a.ends ASC, b.bidwhen DESC";
$res = mysql_query($query);
$system->check_mysql($res, $query, __LINE__, __FILE__);

$idcheck = array();
$auctions_count = 0;
while ($row = mysql_fetch_assoc($res))
{
    if (!in_array($row['id'], $idcheck))
    {
        // prepare some data
        $bgColor = (!($auctions_count % 2)) ? '' : 'class="alt-row"';

        // Outbidded or winning bid
        if ($row['current_bid'] != $row['bid']) $bgColor = 'style="background-color:#FFFF00;"';

        $auctions_count++;
        $idcheck[] = $row['id'];

        $template->assign_block_vars('bids', array(
                'BGCOLOUR' => $bgColor,
                'ID' => $row['id'],
                'TITLE' => $row['title'],
                'BID' => $system->print_money($row['bid']),
                'QTY' => $row['quantity'],
                'TIMELEFT' => FormatTimeLeft($row['ends'] - time()),
                'PROXYBID' => (isset($row['proxybid']) && $row['proxybid'] > $row['bid']) ? $system->print_money($row['proxybid'], true, false, false) : ''
                ));
    }
}

$template->assign_vars(array(
        'NUM_BIDS' => $auctions_count
        ));

include 'header.php';
$TMP_usmenutitle = $MSG['620'];
include 'includes/user_cp.php';
$template->set_filenames(array(
        'body' => 'yourbids.tpl'
        ));
$template->display('body');
include 'footer.php';
?>



Unfortunately on my Bids page it is still displaying the Bid that has outbid me on some of the Actions (not all)

Marty
(0000706)
bondango   
2011-05-07 23:10   
(edited on: 2011-05-07 23:13)
Ok just to add as a test. it seems the second value being displayed isnt the Current Proxy bif value on the item.
i.e. one of my outbid items shows as,,

Item name . . . . . . GBP 19,000 . . . . . . 24d 13h 9m
 . . . . . . . . . . . . . . . GBP 120,000

I dont know were that lower value os coming from, and it only appear on some of my outbid items?
(0000722)
pani100   
2011-06-06 12:42   
(edited on: 1970-01-01 00:00)
Hi,
I have just come across the same issue too. Tried your fix Box Lot but there are still problems.
The original 1.0.2 passes your proxy bid to other bidders too only sometimes when viewing your bids.
Your fix stops that but adds some random non related proxy bids to the bid and other bids.
Proxy bids seem alright on the database. Any ideas to work on?
It seems the query is mixing things up. I just wish I knew about databases to try things.
(0001086)
va.le21   
2013-04-29 23:35   
(edited on: 1970-01-01 00:00)
hello!! someone have solved the problem??
(0001145)
pani100   
2013-08-18 20:28   
(edited on: 1970-01-01 00:00)
It looks like this has been removed from the 1.10 version?
Anyway just in case anyone has an older version, the problem is it gets a value but it could be an older value you have entered and also be a value someone else has entered. Things can get tricky if we can see what others have bid on an auction.
In yourbids.php the query I have ended up with which seems to be doing a correct job is the following:
[PHP]// get active bids for this user
$query = "SELECT a.current_bid, a.id, a.title, a.ends, b.bid, b.quantity, p.bid As proxybid FROM " . $DBPrefix . "bids b
        LEFT JOIN " . $DBPrefix . "auctions a ON (a.id = b.auction)
        LEFT JOIN " . $DBPrefix . "proxybid p ON (p.userid = " . $user->user_data['id'] . " AND p.itemid = a.id)
        WHERE a.closed = 0 AND b.bidder = " . $user->user_data['id'] . "
        AND a.bn_only = 'n' ORDER BY a.ends ASC, b.bidwhen DESC, p.date DESC";[/PHP]