Function for creating a new insertion fee transaction which is usually executed during the initial posting of a service or product auction. This function will attempt to debit the amount owing from the user's account balance (if funds available) otherwise it will create an unpaid transaction and force the auction to be hidden until payment is completed. This function takes into consideration a user with insertion fees exemption.
void
calculate_insertion_fee
([integer $cid = 0], [string $cattype = 'service'], [string $amount = 0], [integer $pid = 0], [integer $userid = 0], [bool $isbudgetrange = 0], [integer $filtered_budgetid = 0])
-
integer
$cid: category id
-
string
$cattype: category type (service or product) default is service
-
string
$amount: amount to process
-
integer
$pid: project id
-
integer
$userid: user id
-
bool
$isbudgetrange: is a budget range type insertion group (true or false)
-
integer
$filtered_budgetid: budget range id that is selected
Function to create a new randomly generated auction id number.
integer
construct_new_auctionid
()
Function to create a new randomly generated auction id number for bulk upload.
integer
construct_new_auctionid_bulk
()
void
convert_bulk_attributes_into_custom
([ $attributes = ''])
Function to handle invitation logic for moderated and non-moderated auctions for externally invited users.
This function will also be called when a user is setting a draft auction to open and any invted users will then get email invitation notice.
nothing
dispatch_external_members_email
([string $cattype = 'service'], [integer $rfpid = 0], [integer $userid = 0], [string $project_title = ''], [string $bid_details = ''], [string $end_date = ''], [array $invitelist = array()], [string $invitemessage = ''], [bool $skipemailprocess = 0])
-
string
$cattype: category type (service/product)
-
integer
$rfpid: project id
-
integer
$userid: user id
-
string
$project_title: project title
-
string
$bid_details: bid details
-
string
$end_date: end date
-
array
$invitelist: invitation list
-
string
$invitemessage: invitation message
-
bool
$skipemailprocess: do not send email? (default false)
Function to handle invitation logic for moderated and non-moderated auctions. This function will only send any "members" that were invited to this auction when the buyer was using the search provider menus and/or inviting a user directly from their profile menu. The logic will detect if any invite logic has been stored in a session and if so, dispatch any invitation email to the end users.
nothing
dispatch_invited_members_email
([array $invitedusers = array()], [string $cattype = 'service'], [integer $rfpid = 0], [integer $userid = 0], [bool $dontsendemail = 0])
-
array
$invitedusers: invited users array
-
string
$cattype: category type (service/product)
-
integer
$rfpid: project id
-
integer
$userid: user id
-
bool
$dontsendemail: do not send email? (default false)
Function to send invite email after admin validate service auction
nothing
dispatch_invited_members_email_afteradminvalidate
([array $invitedusers = array()], [string $cattype = 'service'], [integer $rfpid = 0], [integer $userid = 0], [boolean $dontsendemail = 0])
-
array
$invitedusers: invited users array
-
string
$cattype: category type (service or product)
-
integer
$rfpid: listing id
-
integer
$userid: user id
-
boolean
$dontsendemail: don't send email? (default false)
Function to fetch the the budgetgroup name for a particular category
string
fetch_category_budgetgroup
([integer $cid = 0])
-
integer
$cid: category id
Function to fetch total number of invited users to a particular auction
integer
fetch_invited_users_count
([integer $projectid = 0])
-
integer
$projectid: category id
Function for handling a remote image url through a bulk file upload..
This will fetch the file from the remote server via curl, check if the file is valid (is an image), extract it's contents and save to the filepath or the database.
nothing
handle_remote_image_url
([string $imgurl = ''], [integer $project_id = 0], [integer $cid = 0], [ $attachtype = 'itemphoto'])
-
string
$imgurl: image url (full url with image, ie: http://www.domain.com/image1.jpg
-
integer
$project_id: project id we're assigning this image to
-
integer
$cid: category id
-
$attachtype
Function for handling a remote image url through a bulk file upload..
This will fetch the file from the remote server via curl, check if the file is valid (is an image), extract it's contents and save to the filepath or the database.
boolen
handle_remote_image_url_bulk
([string $imgurl = ''], [integer $project_id = 0], [integer $user_id = 0], [integer $cid = 0], [string $attachtype = 'itemphoto'], [ $tblfolder_ref = 0])
-
string
$imgurl: image url (full url with image, ie: http://www.domain.com/image1.jpg
-
integer
$project_id: project id we're assigning this image to
-
integer
$user_id: user id
-
integer
$cid: category id
-
string
$attachtype: attachtype (default itemphoto)
-
$tblfolder_ref
Function to insert a new user into the auction invitation table.
nothing
insert_auction_invitation
([integer $ownerid = 0], [integer $userid = 0], [integer $projectid = 0], [bool $noemail = 0], [string $invitetype = 'service'])
-
integer
$ownerid: owner id
-
integer
$userid: user id
-
integer
$projectid: project id
-
bool
$noemail: no email flag (true or false)
-
string
$invitetype: invitation type (service or product)
Function to insert a new product auction
bool
insert_product_auction
([integer $userid = 0], [string $project_type = 'forward'], [string $status = 'open'], [string $project_state = 'product'], [integer $cid = 0], [integer $rfpid = 0], [string $project_title = ''], [string $description = ''], [string $description_videourl = ''], [string $additional_info = ''], [string $keywords = ''], [array $custom = array()], [array $profileanswer = array()], [string $filtered_auctiontype = ''], [string $start_price = 0], [string $project_details = ''], [string $bid_details = ''], [bool $filter_rating = 0], [bool $filter_country = 0], [bool $filter_state = 0], [bool $filter_city = 0], [bool $filter_zip = 0], [integer $filter_businessnumber = ''], [string $filtered_rating = ''], [string $filtered_country = ''], [string $filtered_state = ''], [string $filtered_city = ''], [string $filtered_zip = ''], [string $city = ''], [string $state = ''], [string $zipcode = ''], [array $country = ''], [bool $shipping = array()], [string $buynow = 0], [string $buynow_price = 0], [integer $buynow_qty = 1], [array $buynow_qty_lot = 0], [bool $items_per_lot = 1], [string $enhancements = array()], [bool $reserve = 0], [bool $reserve_price = 0], [bool $filter_underage = 0], [bool $filter_escrow = 0], [bool $filter_gateway = 0], [array $filter_offline = 0], [string $filter_publicboard = 0], integer $invitelist, integer $invitemessage, integer $year, integer $month, integer $day, integer $hour, integer $min, string $sec, string $duration, string $duration_unit, [string $paymethod = array()], [string $paymethodoptions = array()], [integer $paymethodoptionsemail = array()], [bool $retailprice = 0], [bool $uniquebidcount = 0], [integer $saveasdraft = 0], [string $returnaccepted = 0], [string $returnwithin = 0], [string $returngivenas = 'none'], [bool $returnshippaidby = 'buyer'], [integer $returnpolicy = ''], [integer $donation = ''], [bool $charityid = 0], [array $donationpercentage = 0], [bool $skipemailprocess = 0], [string $apihookcustom = array()], [ $isbulkupload = false], [ $sample = ''], [ $currencyid = 0])
-
integer
$userid: user id
-
string
$project_type: project type (reverse/forward)
-
string
$status: status (open/draft)
-
string
$project_state: auction state (service/product)
-
integer
$cid: category id
-
integer
$rfpid: rfp id (custom auction id)
-
string
$project_title: auction title
-
string
$description: auction description
-
string
$description_videourl: auction description video embed
-
string
$additional_info: auction additional info
-
string
$keywords: auction keywords/tags
-
array
$custom: array holding custom questions answered
-
array
$profileanswer: array holding profile answers
-
string
$filtered_auctiontype: filtered auction type
-
string
$start_price: start price
-
string
$project_details: project details (public, realtime, invite_only)
-
string
$bid_details: bid details
-
bool
$filter_rating: filter by rating?
-
bool
$filter_country: filter by country?
-
bool
$filter_state: filter by state?
-
bool
$filter_city: filter by city?
-
bool
$filter_zip: filter by zip code?
-
integer
$filter_businessnumber: filtered rating answer
-
string
$filtered_rating: filtered country answer
-
string
$filtered_country: filtered state answer
-
string
$filtered_state: filtered city answer
-
string
$filtered_city: filtered zip code answer
-
string
$filtered_zip: item location city
-
string
$city: item location state/province
-
string
$state: item location zip or postal code
-
string
$zipcode: item location country
-
array
$country: shipping information array
-
bool
$shipping: buy now?
-
string
$buynow: buy now price
-
string
$buynow_price: buy now qty available
-
integer
$buynow_qty: buy now qty LOT (can only purchase entire buynow_qty not less)
-
array
$buynow_qty_lot: auction upsell enhancements array
-
bool
$items_per_lot: using reserve price?
-
string
$enhancements: reserve price
-
bool
$reserve: filter by underage disabled?
-
bool
$reserve_price: filter option: is escrow being used for this listing?
-
bool
$filter_underage: filter option: are gateway payment methods being used for this listing?
-
bool
$filter_escrow: filter option: are offline payment methods being used for this listing?
-
bool
$filter_gateway: filter public board enabled?
-
array
$filter_offline: invitation list (external emailed users)
-
string
$filter_publicboard: invitation message
-
integer
$invitelist: year (used for start of year for realtime auction only)
-
integer
$invitemessage: month (used for start of month for realtime auction only)
-
integer
$year: day (used for start of day for realtime auction only)
-
integer
$month: hour (used for start of hour for realtime auction only)
-
integer
$day: min (used for start of min for realtime auction only)
-
integer
$hour: sec (used for start of sec for realtime auction only)
-
integer
$min: duration (1 - 30) usually handling (days, hours or minutes) answer
-
string
$sec: duration unit (D, H, M)
-
string
$duration: payment method defined by the project buyer
-
string
$duration_unit: payment method gateway option selected by the seller
-
string
$paymethod: payment method gateway email address selected by the seller
-
string
$paymethodoptions: retail price
-
integer
$paymethodoptionsemail: unique bid count until bidding closes (optional)
-
bool
$retailprice: saving auction in draft mode? (default no)
-
bool
$uniquebidcount: return policy: returns accepted?
-
integer
$saveasdraft: return policy: return within days
-
string
$returnaccepted: return policy: return given as (default none)
-
string
$returnwithin: return policy: return shipping paid by
-
string
$returngivenas: return policy text
-
bool
$returnshippaidby: is donation associated (default 0 - false)
-
integer
$returnpolicy: charity id of the doner associated (default 0)
-
integer
$donation: donation percentage (default 0)
-
bool
$charityid: skip all email process? (default no) - useful to use this function as API and to not send 1000's of emails if 1000's of auctions are added.
-
array
$donationpercentage: custom api hook (optional)
-
bool
$skipemailprocess: is bulk upload? (default false) - note: if true, insertion fees and enhancements will not be created
-
string
$apihookcustom: string url to the sample bulk item photo
-
$isbulkupload
-
$sample
-
$currencyid
Function to print inline all invited users for a particular service auction
nothing
insert_profile_answers
(string $profile_ans, integer $projectid)
-
string
$profile_ans: profile answer
-
integer
$projectid: project id
Function to insert a new service auction
nothing
insert_service_auction
([integer $userid = 0], [string $project_type = 'reverse'], [string $status = 'open'], [string $project_state = 'service'], [integer $cid = 0], [integer $rfpid = 0], [string $project_title = ''], [string $description = ''], [string $description_videourl = ''], [string $additional_info = ''], [string $keywords = ''], [array $custom = array()], [array $profileanswer = array()], bool $filter_bidtype, string $filtered_bidtype, bool $filter_budget, string $filtered_budgetid, string $filtered_auctiontype, bool $filter_escrow, [bool $filter_gateway = 0], [bool $filter_offline = 0], [string $paymethod = array()], [string $paymethodoptions = array()], [string $paymethodoptionsemail = array()], string $project_details, string $bid_details, array $invitelist, string $invitemessage, array $invitedmember, integer $year, integer $month, integer $day, integer $hour, integer $min, integer $sec, integer $duration, string $duration_unit, [integer $filtered_rating = 1], [string $filtered_country = ''], [string $filtered_state = ''], [string $filtered_city = ''], [string $filtered_zip = ''], integer $filter_rating, bool $filter_country, bool $filter_state, bool $filter_city, bool $filter_zip, bool $filter_underage, bool $filter_businessnumber, [bool $filter_publicboard = 0], [array $enhancements = array()], [bool $saveasdraft = 0], [string $city = ''], [string $state = ''], [string $zipcode = ''], [string $country = ''], [bool $skipemailprocess = 0], [mixed $apihookcustom = array()], [bool $isbulkupload = false], [integer $currencyid = 0])
-
integer
$userid: user id
-
string
$project_type: project type (reverse/forward)
-
string
$status: status (open/draft)
-
string
$project_state: auction state (service/product)
-
integer
$cid: category id
-
integer
$rfpid: rfp id (custom auction id)
-
string
$project_title: auction title
-
string
$description: auction description
-
string
$description_videourl: auction description video embed
-
string
$additional_info: auction additional info
-
string
$keywords: auction keywords/tags
-
array
$custom: array holding custom questions answered
-
array
$profileanswer: array holding profile answers
-
bool
$filter_bidtype: filter option: is bidding privacy enabled
-
string
$filtered_bidtype: filter answer: bidding privacy filter answer
-
bool
$filter_budget: filter option: is budget filter is enalbed
-
string
$filtered_budgetid: filter answer: budget filter answer
-
string
$filtered_auctiontype: filtered auction type
-
bool
$filter_escrow: filter option: is escrow being used for this project?
-
bool
$filter_gateway: filter option: are direct gateway payments being used for this project? (default 0)
-
bool
$filter_offline: filter option: are offline payment methods being used for this project?
-
string
$paymethod: payment method defined by the project buyer
-
string
$paymethodoptions: payment method gateway selected by the project buyer
-
string
$paymethodoptionsemail: payment method gateway email address entered by the project buyer
-
string
$project_details: project details (public, realtime, invite_only)
-
string
$bid_details: bid details
-
array
$invitelist: invitation list (external emailed users)
-
string
$invitemessage: invitation message
-
array
$invitedmember: invited registered members array
-
integer
$year: year (used for start of year for realtime auction only)
-
integer
$month: month (used for start of month for realtime auction only)
-
integer
$day: day (used for start of day for realtime auction only)
-
integer
$hour: hour (used for start of hour for realtime auction only)
-
integer
$min: min (used for start of min for realtime auction only)
-
integer
$sec: sec (used for start of sec for realtime auction only)
-
integer
$duration: duration (1 - 30) usually handling (days, hours or minutes) answer
-
string
$duration_unit: duration unit (D, H, M)
-
integer
$filtered_rating: filtered rating answer
-
string
$filtered_country: filtered country answer
-
string
$filtered_state: filtered state answer
-
string
$filtered_city: filtered city answer
-
string
$filtered_zip: filtered zip code answer
-
integer
$filter_rating: filtered rating by answer
-
bool
$filter_country: filter by country?
-
bool
$filter_state: filter by state?
-
bool
$filter_city: filter by city?
-
bool
$filter_zip: filter by zip code?
-
bool
$filter_underage: filter by underage disabled?
-
bool
$filter_businessnumber: filter by business number requirement?
-
bool
$filter_publicboard: filter public board enabled?
-
array
$enhancements: auction upsell enhancements array
-
bool
$saveasdraft: saving auction in draft mode? (default no)
-
string
$city: service location city
-
string
$state: service location state/province
-
string
$zipcode: service location zip or postal code
-
string
$country: service location country
-
bool
$skipemailprocess: skip all email process? (default no) - useful to use this function as API and to not send 1000's of emails if 1000's of auctions are added.
-
mixed
$apihookcustom: api custom hooks
-
bool
$isbulkupload: is bulk upload? (default false)
-
integer
$currencyid: currency id
Function to print inline all invited users for a particular service auction
string
print_invited_users
([integer $projectid = 0], [integer $ownerid = 0], string $bid_details)
-
integer
$projectid: project id
-
integer
$ownerid: owner id
-
string
$bid_details: bid privacy details (open, sealed, blind, full)
Function for creating a new insertion fee transaction which is usually executed during the initial posting
of a service or product auction. This function will attempt to debit the amount owing from the user's account balance (if funds available) otherwise it will create an unpaid transaction and force the auction to be hidden until payment is completed. This function takes into consideration a user with insertion fees exemption as well as taxes.
void
process_insertion_fee_transaction
([integer $cid = 0], [string $cattype = 'service'], [string $amount = 0], [integer $pid = 0], [integer $userid = 0], [bool $isbudgetrange = 0], [integer $filtered_budgetid = 0], [bool $isbulkupload = false], [array $pids = array()], [ $currencyid = 0])
-
integer
$cid: category id
-
string
$cattype: category type (service or product) default is service
-
string
$amount: amount to charge
-
integer
$pid: project id
-
integer
$userid: user id
-
bool
$isbudgetrange: is a budget range type insertion group (true or false)
-
integer
$filtered_budgetid: budget range id that is selected
-
bool
$isbulkupload: is being called via bulk upload (default false)
-
array
$pids: bulk uploaded items listings ids
-
$currencyid
void
process_listing_bulk_enhancements_transaction
([ $pids = array()], [ $sumfees = 0], [ $userid = 0])
Function to process selected auction enhancements which also creates necessary transactions.
Additionally, this function cooperates with the admin defined tax logic for listing enhancements. This function will also update the invoice to isenhancementfee = '1' on successful transaction.
nothing
process_listing_enhancements_transaction
([array $enhancements = array()], [integer $userid = 0], [integer $rfpid = 0], [string $mode = 'insert'], [string $cattype = ''], [ $only_calculate = false])
-
array
$enhancements: enhancements array selected during the posting of the auction
-
integer
$userid: user id posting auction
-
integer
$rfpid: auction id
-
string
$mode: mode (insert or update) for letting this work when updating auction as well
-
string
$cattype: category type (service or product)
-
$only_calculate
Function to handle saving the shipping logic for an item within the appropriate areas of the database
nothing
save_item_shipping_logic
([integer $rfpid = 0], [array $shipping = array()])
-
integer
$rfpid: listing id
-
array
$shipping: shipping array with all details
Function to insert photo from bulk upload
nothing
upload_bulk_foto_auction
()
Inherited Methods
Inherited From auction
auction::archive_expired_auctions()
auction::auction_icons()
auction::auction_timeleft()
auction::calculate_insertion_fee_in_budget_group()
auction::calculate_time_left()
auction::category_listing_count_fixer()
auction::construct_bidamounttype()
auction::construct_bidamounttype_pulldown()
auction::construct_budget_overview()
auction::construct_budget_pulldown()
auction::construct_invoice_icon()
auction::construct_measure()
auction::construct_mediashare_icon()
auction::construct_pmb_icon()
auction::expire_featured_status_listings()
auction::fetch_auction_type()
auction::fetch_auction_winner()
auction::fetch_ending_soon_auctions()
auction::fetch_featured_auctions()
auction::fetch_latest_auctions()
auction::fetch_purchase_now()
auction::fetch_recently_viewed_auctions()
auction::fetch_reserve_price()
auction::fetch_reserve_price_bit()
auction::fetch_rfp_budget()
auction::fetch_transfer_ownership()
auction::fetch_users_other_listings()
auction::relist_product_auction()
auction::relist_service_auction()
auction::remove_answers_from_deleted_listings()
auction::remove_photos_from_deleted_listings()
auction::remove_shipping_regions_from_deleted_listings()
auction::rewrite_photos()