Blesta Source Documentation

OrderAffiliateStatistics extends OrderModel

Order Affiliate Statistics Management

Table of Contents

Methods

get() Get the affiliate statistics from a specific day or a given date range
getAllCount() Get the total count of statistics from a specific affiliate
registerSale() Register an affiliate sale
registerVisit() Register an affiliate visit
Methods

get()

Get the affiliate statistics from a specific day or a given date range

public get([array<string|int, mixed> $filters = [] ]) : array<string|int, mixed>
Parameters
$filters : array<string|int, mixed> = []

A list of filters for the query

  • affiliate_id The ID of the affiliate from which to obtain the statistics
  • start_date The start date from which to obtain the statistics
  • end_date The end date from which to obtain the statistics
Return values
array<string|int, mixed>

A numerically indexed array containing the statistics objects each containing:

  • affiliate_id The ID of the affiliate
  • visits The number of registered visits for a given day
  • sales The number of registered sales for a given day
  • date The date for which these statistics are recorded

getAllCount()

Get the total count of statistics from a specific affiliate

public getAllCount(int $affiliate_id) : array<string|int, mixed>
Parameters
$affiliate_id : int

The ID of the affiliate from which to obtain the statistics

Return values
array<string|int, mixed>

A numerically indexed array of objects containing the following properties:

  • visits The total count of registered visits
  • sales The total count of registered sales

registerSale()

Register an affiliate sale

public registerSale(int $affiliate_id[, string $date = null ]) : mixed
Parameters
$affiliate_id : int

The ID of the affiliate to register a referral sale

$date : string = null

The date on which the sale is registered

registerVisit()

Register an affiliate visit

public registerVisit(int $affiliate_id[, string $date = null ]) : mixed
Parameters
$affiliate_id : int

The ID of the affiliate to register a referral visit

$date : string = null

The date on which the visit is registered

Tags
subpackage

plugins.order.models

copyright

Copyright (c) 2020, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results