TotalRevenue
- Type
- Class
- Namespace
- craft\commerce\stats
- Inherits
- craft\commerce\stats\TotalRevenue ยป craft\commerce\base\Stat
- Implements
- craft\commerce\base\StatInterface
- Uses traits
- craft\commerce\base\StatTrait
- Since
- 3.0
Total Revenue Stat
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) |
| weekStartDay | integer (opens new window) |
# Protected Properties
| Property | Description |
|---|---|
| _handle | string (opens new window) |
# _handle
- Type
- string (opens new window)
- Default value
'totalRevenue'
View source (opens new window)
# Public Methods
| Method | Description |
|---|---|
| __construct() | Stat constructor. |
| get() | |
| getChartQueryOptionsByInterval() | |
| getData() | |
| getDateRangeInterval() | |
| getDateRangeWording() | |
| getEndDate() | |
| getHandle() | |
| getStartDate() | |
| prepareData() | |
| setEndDate() | |
| setStartDate() |
# getData()
View source (opens new window)
Returns
array (opens new window), null (opens new window), false (opens new window)
# Protected Methods
| Method | Description |
|---|---|
| _createChartQuery() | |
| _createStatQuery() | Generate base stat query |
โ TotalOrdersByCountry ProductFixture โ