Function to display any subscription alerts from their my account area
string
alerts
([integer $userid = 0])
Function to cancel any scheduled subscription invoices based on a timer which the admin defines in max days of invoice cancellation
string
cancel_scheduled_subscription_invoices
()
Function used to check a user's access when trying to access a certain marketplace resource or area.
bool
check_access
([integer $userid = 0], [string $accessname = ''])
-
integer
$userid: user id
-
string
$accessname: access name
Function to handle the subscription exemption upgrade process for end users.
string
construct_subscription_exemption
([integer $userid = 0], [string $accessname = ''], [string $accessvalue = ''], [integer $cost = 0], [integer $days = 0], [string $logic = ''], [string $comments = ''], [boolean $doemail = ''])
-
integer
$userid: user id
-
string
$accessname: access permission name
-
string
$accessvalue: access permission value
-
integer
$cost: cost for this exemption
-
integer
$days: days this exemption shall last for
-
string
$logic: logic to use for determining what to do
-
string
$comments: end user comments
-
boolean
$doemail: defines if this function should dispatch email once it's finished
Function to display any subscription plan exemptions within a pulldown menu element.
string
exemptions_pulldown
()
Function to expire the saved search subscriptions after x days defined in the argument
void
expire_saved_search_subscriptions
([integer $days = 30])
-
integer
$days: days (default 30)
Function to display any subscription alerts from their my account area
string
fetch_subscription_plan
([integer $userid = 0])
Function to fetch the roleid of a particular subscription plan id
integer
fetch_subscription_roleid
([integer $subscriptionid = 0])
-
integer
$subscriptionid: subscription id
Function to internally check if a user has an active subscription plan (paid or free).
bool
has_active_subscription
([integer $userid = 0])
Function for processing a subscription plan payment from a previously generated unpaid subscription transaction.
mixed
payment
([inetger $userid = 0], [integer $invoiceid = 0], [string $method = 'account'], [string $gateway = ''], [string $gatewaytxn = ''], [boolean $silentmode = false])
-
inetger
$userid: user id
-
integer
$invoiceid: invoice id
-
string
$method: method of payment (ipn or account)
-
string
$gateway: name of gateway which will be processing this payment (optional)
-
string
$gatewaytxn: gateway transaction id (from gateway provider) (optional)
-
boolean
$silentmode: silent mode (return only true or false; default false)
Function to display subscription plans within a pulldown menu element
string
plans_pulldown
()
Function to print a user's subscription icon
string
print_subscription_icon
([integer $userid = 0])
Function to print a user's subscription title
string
print_subscription_title
([integer $userid = 0])
Function to display for users any subscription plans within a pulldown menu element
string
pulldown
()
Function to dispatch newsletter subscription notifications for latest listings posted that users have opted in This function is run via iLance automation script (cron.dailyrfp.php)
string
send_category_notification_subscriptions
()
Function to dispatch emails based on users saved searches where they choose to opt-in This function is run via iLance automation script (cron.dailyrfp.php)
string
send_saved_search_subscriptions
([integer $limit = 50])
-
integer
$limit: limit (default 50)
Function to dispatch subscription notifications to users "x" days before a subscription is expired This function is run via iLance automation script (cron.dailyrfp.php)
string
send_subscription_expiry_reminders
([integer $reminddays = 7])
-
integer
$reminddays: days to remind user before expiry (default 7)
Function designed to send out subscription reminder notices based on an admin defined email dispatch frequency This function is called from cron.reminders.php
string
send_user_subscription_frequency_reminders
()
Function used to obtain the time left of a subscription.
string
subscription_countdown_timeleft
(integer $countdown)
-
integer
$countdown: countdown
Function used to obtain the subscription length (in days) from a supplied unit (D/M/Y) and length (in days)
string
subscription_length
(string $units, integer $length)
-
string
$units: unit (D or M or Y)
-
integer
$length: length in days
Function to handle the subscription upgrade process for end users.
string
subscription_upgrade_process
([integer $userid = 0], [integer $subscriptionid = 0], [boolean $agreecheck = 0], [boolean $instantpay = 0], [boolean $nocost = 0], [boolean $recurring = 0], [string $paymethod = ''], [boolean $ismodify = 0], [boolean $removepending = false], [string $returnurl = ''])
-
integer
$userid: user id
-
integer
$subscriptionid: subscription id
-
boolean
$agreecheck: end user agreement of terms value (true / false)
-
boolean
$instantpay: end user instant payment value (true / false)
-
boolean
$nocost: defines if the subscription cost is zero or not
-
boolean
$recurring: defines if the transaction will be using the recurring subscription logic
-
string
$paymethod: payment method chosen by the end user
-
boolean
$ismodify: defines if this transaction is a recurring subscription modification or not
-
boolean
$removepending: defines if this function should automatically delete any previous free or paid subscription transactions to reduce the amount of pending invoices in the admincp
-
string
$returnurl: return url (optional)
Function to update a users subscription plan within the AdminCP
void
subscription_upgrade_process_admincp
([integer $userid = 0], [integer $subscriptionid = 0], [string $txndescription = 'No description'], [string $action = ''])
-
integer
$userid: user id
-
integer
$subscriptionid: subscription id
-
string
$txndescription: transaction description
-
string
$action: subscription action