TotalOrdersByCountry
- Type
- Class
- Namespace
- craft\commerce\stats
- Inherits
- craft\commerce\stats\TotalOrdersByCountry » craft\commerce\base\Stat
- Implements
- craft\commerce\base\StatInterface
- Uses traits
- craft\commerce\base\StatTrait
- Since
- 3.0
Total Orders by Country 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) |
limit | |
type | string (opens new window) – Type of stat e.g. 'shipping' or 'billing'. |
weekStartDay | integer (opens new window) |
# limit
- Default value
5
View source (opens new window)
# type
- Type
- string (opens new window)
- Default value
'shipping'
Type of stat e.g. 'shipping' or 'billing'.
View source (opens new window)
# Protected Properties
Property | Description |
---|---|
_handle | string (opens new window) |
# _handle
- Type
- string (opens new window)
- Default value
'totalOrdersByCountry'
View source (opens new window)
# Public Methods
Method | Description |
---|---|
__construct() | Stat constructor. |
get() | |
getChartQueryOptionsByInterval() | |
getData() | |
getDateRangeInterval() | |
getDateRangeWording() | |
getEndDate() | |
getHandle() | |
getStartDate() | |
prepareData() | |
setEndDate() | |
setStartDate() |
# __construct()
Stat constructor.
View source (opens new window)
Arguments
$dateRange
(string (opens new window), null (opens new window))$type
$startDate
(DateTime (opens new window), null (opens new window))$endDate
(DateTime (opens new window), null (opens new window))
Throws
# getData()
View source (opens new window)
Returns
array (opens new window), null (opens new window), false (opens new window)
# getHandle()
View source (opens new window)
Returns
# prepareData()
View source (opens new window)
Arguments
$data
Returns
mixed
# Protected Methods
Method | Description |
---|---|
_createChartQuery() | |
_createStatQuery() | Generate base stat query |