Skip to content

StatTrait ​

Type
Trait
Namespace
craft\commerce\base
Implemented by
craft\commerce\base\Stat, craft\commerce\stats\AverageOrderTotal, craft\commerce\stats\NewCustomers, craft\commerce\stats\RepeatCustomers, craft\commerce\stats\TopCustomers, craft\commerce\stats\TopProductTypes, craft\commerce\stats\TopProducts, craft\commerce\stats\TopPurchasables, craft\commerce\stats\TotalOrders, craft\commerce\stats\TotalOrdersByCountry, craft\commerce\stats\TotalRevenue
Since
3.0

Stat Trait

View source

Public Properties ​

PropertyDescription
cacheboolean
cacheDurationinteger – How long to cache the data, in seconds.
dateRangestring, null
weekStartDayinteger

cache ​

Type
boolean
Default value
false

View source

cacheDuration ​

Type
integer
Default value
0

How long to cache the data, in seconds.

View source

dateRange ​

Type
string, null
Default value
\craft\commerce\base\StatInterface::DATE_RANGE_TODAY

View source

weekStartDay ​

Type
integer
Default value
1

View source

Protected Properties ​

PropertyDescription
_handlestring

_handle ​

Type
string
Default value
null

View source