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 (opens new window)
# Public Properties
Property | Description |
---|---|
cache | boolean (opens new window) |
cacheDuration | integer (opens new window) – How long to cache the data, in seconds. |
dateRange | string (opens new window), null (opens new window) |
weekStartDay | integer (opens new window) |
# cache
- Type
- boolean (opens new window)
- Default value
false
View source (opens new window)
# cacheDuration
- Type
- integer (opens new window)
- Default value
0
How long to cache the data, in seconds.
View source (opens new window)
# dateRange
- Type
- string (opens new window), null (opens new window)
- Default value
\craft\commerce\base\StatInterface::DATE_RANGE_TODAY
View source (opens new window)
# weekStartDay
- Type
- integer (opens new window)
- Default value
1
View source (opens new window)
# Protected Properties
Property | Description |
---|---|
_handle | string (opens new window) |
# _handle
- Type
- string (opens new window)
- Default value
null