TopCustomers

Type
Class
Namespace
craft\commerce\stats
Inherits
craft\commerce\stats\TopCustomers » craft\commerce\base\Stat
Implements
craft\commerce\base\StatInterface
Uses traits
craft\commerce\base\StatTrait
Since
3.0

Top Customers Stat

View source

# Public Properties

Property Description
cache boolean
cacheDuration integer – How long to cache the data, in seconds.
dateRange string
limit integer – Number of customers to show.
type string – Type of start either 'total' or 'average'.
weekStartDay integer

# limit

Type
integer

Number of customers to show.

View source

# type

Type
string

Type of start either 'total' or 'average'.

View source

# Protected Properties

Property Description
_handle string

# _handle

Type
string

View source

# Public Methods

# __construct()

Stat constructor.

View source

Arguments

Throws

# getData()

View source

Returns

array, null, false

# getHandle()

View source

Returns

string

# prepareData()

View source

Arguments

  • $data

Returns

mixed

# Protected Methods

Method Description
_createChartQuery()
_createStatQuery() Generate base stat query