Class bid

Description

Bid class to perform the majority of bidding functions within ILance

  • author: ILance
  • version: $Revision: 1.0.0 $

Located in /api/class.bid.inc.php (line 23)


	
			
Direct descendents
Class Description
bid_fields Class to handle the auction posting interface for any type of auction supported in ILance.
bid_lowest_unique Lowest Unique Bid class to perform the majority of lowest unique bidding functions within ILance.
bid_permissions Function to handle bid permissions
bid_product Function to handle inserting a forward auction bid
bid_proxy Proxy Bid class to perform the majority of proxy bidding functions within ILance.
bid_retract Retract Bid class to perform the majority of bid retraction functions within ILance.
bid_service Function to handle inserting a service reverse auction bid
bid_tabs Bid Tabs class to perform the majority of bid tab display and output operations within ILance.
Method Summary
string bid_filter_checkup ([integer $projectid = 0])
string construct_bid_details_pulldown ([string $selected = ''])
string fetch_auction_win_amount ([integer $project_id = 0], [integer $seller_id = 0], [integer $buyer_id = 0])
string fetch_auction_win_type ([integer $project_id = 0], [string $project_state = ''], [string $auctiontype = ''], [integer $project_details = ''], [integer $seller_id = 0], [ $buyer_id = 0])
string fetch_average_bid ([integer $projectid = 0], [boolean $noprivacy = true], [string $bid_details = ''], [ $noformatting = false])
array fetch_average_lowest_highest_bid_amounts ([string $bid_details = ''], [integer $project_id = 0], [integer $ownerid = 0])
string fetch_awarded_bid_amount ([integer $projectid = 0])
string fetch_bid_amount ([string $bid_details = ''], [integer $bidamount = 0], [integer $bidderid = 0], [integer $ownerid = 0], [integer $currencyid = 0])
string fetch_declined_bids ([integer $projectid = 0])
string fetch_highest_bid ([integer $projectid = 0])
integer fetch_highest_bidder ([integer $projectid = 0])
array fetch_lowest_bidder_info ([integer $project_id = 0], [integer $user_id = 0], [string $bid_details = ''])
string fetch_minimum_bid ([string $highestbid = 0], [integer $cid = 0])
string fetch_retracted_bids ([integer $projectid = 0])
string fetch_second_highest_bid ([integer $projectid = 0], integer 1)
string fetch_shortlisted_bids ([integer $projectid = 0], [integer $buyerid = 0])
string fetch_transaction_status ([integer $projectid = 0], [boolean $shortform = false], [boolean $showicononly = false], [boolean $showlinktopayment = false])
bool has_bids ([integer $projectid = 0])
bool has_highest_bidder ([integer $projectid = 0])
bool has_winning_bidder ([integer $projectid = 0])
bool is_highest_bidder ([integer $bidderid = 0], [integer $projectid = 0])
bool is_outbid ([integer $bidderid = 0], [integer $projectid = 0])
string is_valid_bid_range ([integer $projectid = 0], [string $bidamount = 0], [string $filtered_bidtype = ''], [ $delivery = 0])
bool is_winner ([integer $bidderid = 0], [integer $projectid = 0])
string product_bid_filter_checkup ([integer $id = 0])
nothing set_bid_counters ([integer $userid = 0], [string $dowhat = ''])
string user_can_bid ([integer $userid = 0], [integer $projectid = 0], [boolean $showtemplate = true])
string wait_approval_unaward_cron (integer 0)
Methods
bid_filter_checkup (line 667)

Function for determining if a particular auction event has any bid filters and if so this

function will print out the appropriate error response based on the credentials of the logged in member. Additionally, this function has been updated to also detect the new profile auction filter option where admin can define say "weight" and the auction poster defines a "weight" range for the auction (from: 100 lbs to: 200 lbs) type format (question is ultimately answered by the bidder from his/her profile menu)

  • return: HTML representation of a particular bid permission error (if applicable)
string bid_filter_checkup ([integer $projectid = 0])
  • integer $projectid: project id
construct_bid_details_pulldown (line 921)

Function for printing a bid privacy details pulldown menu.

  • return: HTML representation of the pulldown menu
string construct_bid_details_pulldown ([string $selected = ''])
  • string $selected: selected value (optional)
fetch_auction_win_amount (line 100)

Function for returning the raw winning amount from an auction that has ended with a winner. This function accepts both service and product logic and will calculate service, product and buy now winnings. Even if shipping is used, it will not be added within this function.

  • return: raw auction winning cost
string fetch_auction_win_amount ([integer $project_id = 0], [integer $seller_id = 0], [integer $buyer_id = 0])
  • integer $project_id: project id
  • integer $seller_id: seller id
  • integer $buyer_id: buyer id
fetch_auction_win_type (line 40)

Function to determine the actual "win type" for a listing. For example, if we're viewing feedback for this entry, and the user won a product auction, show the win type as "bid", if for example the product listing had buy now available, and the user won via buy now the win type would show "buynow".

Additionally, if the winning type was a service auction, the wintype would be "awarded".

This function accepts both service and product logic.

  • return: win type (highestbid, buynow, awarded or unknown)
string fetch_auction_win_type ([integer $project_id = 0], [string $project_state = ''], [string $auctiontype = ''], [integer $project_details = ''], [integer $seller_id = 0], [ $buyer_id = 0])
  • integer $project_id: project id
  • string $project_state: project state (service or product)
  • string $auctiontype: auction type (regular or fixed)
  • integer $project_details: seller id
  • integer $seller_id: buyer id
  • $buyer_id
fetch_average_bid (line 1079)

Function to fetch the average bid amount price for a particular service auction event.

  • return: Returns formatted average bid price amount
string fetch_average_bid ([integer $projectid = 0], [boolean $noprivacy = true], [string $bid_details = ''], [ $noformatting = false])
  • integer $projectid: project id
  • boolean $noprivacy: force no privacy (ie: will not show sealed if it is sealed)
  • string $bid_details: bid details to do the checkup on
  • $noformatting
fetch_average_lowest_highest_bid_amounts (line 1841)

Function to fetch and return an array of the average, lowest and highest bid amounts placed on a listing event

  • return: Mixed array of amounts requested
array fetch_average_lowest_highest_bid_amounts ([string $bid_details = ''], [integer $project_id = 0], [integer $ownerid = 0])
  • string $bid_details: bid privacy details
  • integer $project_id: listing id
  • integer $ownerid: owner user id
fetch_awarded_bid_amount (line 157)

Function for returning awarded bid amount for a particular auction event.

This function now supports lowest unique bid awarded amounts as well.

  • return: awarded bid amount
string fetch_awarded_bid_amount ([integer $projectid = 0])
  • integer $projectid: project id
fetch_bid_amount (line 1771)

Function to print out the bid amount taking into consideration sealed and blind bidding privacy filters

  • return: HTML formatted representation of the amount
string fetch_bid_amount ([string $bid_details = ''], [integer $bidamount = 0], [integer $bidderid = 0], [integer $ownerid = 0], [integer $currencyid = 0])
  • string $bid_details: bid privacy details
  • integer $bidamount: bid amount
  • integer $bidderid: bidder user id
  • integer $ownerid: owner user id
  • integer $currencyid: currency id of listing
fetch_declined_bids (line 1145)

Function to fetch the declined bids count for a particular service auction event.

  • return: Returns delicned bids count
string fetch_declined_bids ([integer $projectid = 0])
  • integer $projectid: project id
fetch_highest_bid (line 336)

Function to fetch the highest bid amount for a particular auction event.

This function does not care about the highest proxy bid, only current bids within the bids table.

  • return: bid amount
string fetch_highest_bid ([integer $projectid = 0])
  • integer $projectid: project id
fetch_highest_bidder (line 238)

Function to fetch the highest bidder "user_id" for a reverse or forward auction event.

  • return: bidder id
integer fetch_highest_bidder ([integer $projectid = 0])
  • integer $projectid: project id
fetch_lowest_bidder_info (line 1962)

Function to fetch and return an array of the lowest bidder details for a particular listing event

  • return: Mixed array of amounts requested
array fetch_lowest_bidder_info ([integer $project_id = 0], [integer $user_id = 0], [string $bid_details = ''])
  • integer $project_id: listing id
  • integer $user_id: owner user id
  • string $bid_details: bid privacy details
fetch_minimum_bid (line 402)

Function to fetch the minimum bid amount to place for a particular auction event. This function take into consideration any increments to apply within a specific category.

  • return: bid amount
string fetch_minimum_bid ([string $highestbid = 0], [integer $cid = 0])
  • string $highestbid: highest bid amount
  • integer $cid: category id
fetch_retracted_bids (line 1172)

Function to fetch the declined bids count for a particular service auction event.

  • return: Returns delicned bids count
string fetch_retracted_bids ([integer $projectid = 0])
  • integer $projectid: project id
fetch_second_highest_bid (line 367)

Function to fetch the second highest bid for a particular auction event.

  • return: bid amount
string fetch_second_highest_bid ([integer $projectid = 0], integer 1)
  • integer 1: user id
  • integer $projectid: project id
fetch_shortlisted_bids (line 1200)

Function to fetch the declined bids count for a particular service auction event.

  • return: Returns delicned bids count
string fetch_shortlisted_bids ([integer $projectid = 0], [integer $buyerid = 0])
  • integer $projectid: project id
  • integer $buyerid: buyer id
fetch_transaction_status (line 1397)

Function to print out the bid transaction status for a listing that is won by a winning bidder.

  • return: HTML formatted representation of the response
string fetch_transaction_status ([integer $projectid = 0], [boolean $shortform = false], [boolean $showicononly = false], [boolean $showlinktopayment = false])
  • integer $projectid: project id
  • boolean $shortform: show short form phrase only? (default false)
  • boolean $showicononly: show icon only (default false)
  • boolean $showlinktopayment: show invoice id with link to transaction page (to make payment for invoice IF unpaid)? (default false)

Redefined in descendants as:
has_bids (line 212)

Function for determining if a particular auction event has any bids placed.

  • return: true or false
bool has_bids ([integer $projectid = 0])
  • integer $projectid: project id
has_highest_bidder (line 466)

Function to determine if a particular auction event has an active highest bidder present

  • return: true or false
bool has_highest_bidder ([integer $projectid = 0])
  • integer $projectid: project id
has_winning_bidder (line 567)

Function to determine if a particular product listing has a winning bidder.

  • return: true or false
bool has_winning_bidder ([integer $projectid = 0])
  • integer $projectid: project id
is_highest_bidder (line 437)

Function to determine if the viewing bidder is the highest bidder for a particular auction event.

  • return: true or false
bool is_highest_bidder ([integer $bidderid = 0], [integer $projectid = 0])
  • integer $bidderid: bidder id
  • integer $projectid: project id
is_outbid (line 597)

Function to determine if the viewing bidder has been outbid for a particular auction event.

  • return: true or false
bool is_outbid ([integer $bidderid = 0], [integer $projectid = 0])
  • integer $bidderid: bidder id
  • integer $projectid: project id
is_valid_bid_range (line 944)

Function for returning a boolean value if a particular bid amount range for a project is valid

  • return: HTML representation of the lowest unique bidder and their bid
string is_valid_bid_range ([integer $projectid = 0], [string $bidamount = 0], [string $filtered_bidtype = ''], [ $delivery = 0])
  • integer $projectid: project id
  • string $bidamount: bid amount
  • string $filtered_bidtype: filtered bid type id
  • $delivery
is_winner (line 494)

Function to determine if the viewing bidder is the winner for a particular auction event.

This function will scan both, project bids (for awarded bids) or buynow_orders to determine if a buy now purchase order was made for the item. Additionally, this will take LUB into consideration.

  • return: true or false
bool is_winner ([integer $bidderid = 0], [integer $projectid = 0])
  • integer $bidderid: bidder id
  • integer $projectid: project id
product_bid_filter_checkup (line 786)

Function to determine if the viewing auction has any bid filters.

  • return: error message if any
string product_bid_filter_checkup ([integer $id = 0])
  • integer $id: project id
set_bid_counters (line 1020)

Function for setting member bid count history (bidstoday and bidsthismonth) within the user database table.

nothing set_bid_counters ([integer $userid = 0], [string $dowhat = ''])
  • integer $userid: user id
  • string $dowhat: action to perform (increase or decrease)
user_can_bid (line 1307)

Function for determining if a user can bid based on the auction posters filtered profile answer logic.

For example, if a profile question is "Hair Color" and the user placing a bid answered this previously saying "Red" then the auction poster can also filter his auction bids based on users only having the hair color of "Red" which they can place a bid. If the bidder has "Black" hair he / she will not be able to bid.

  • return: Returns true or false
string user_can_bid ([integer $userid = 0], [integer $projectid = 0], [boolean $showtemplate = true])
  • integer $userid: user id
  • integer $projectid: project id
  • boolean $showtemplate: show stop template? (default true)
wait_approval_unaward_cron (line 1230)

Function to find any awarded projects and unaward them due to expiry of awarding set by admin

  • return: Returns true or false
string wait_approval_unaward_cron (integer 0)
  • integer 0: days to determine if the expiry has been met

Documentation generated on Mon, 08 Aug 2011 17:40:49 +0200 by phpDocumentor 1.4.1