Class StatisticsService
Class StatisticsService
Provides the statistic data for the dashboard.
- StatisticsService implements StatisticsServiceInterface
Methods summary
public
|
|
public
integer
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
protected
array
|
#
_getVisitorsFromDayIntervalHelper( integer $fromInterval )
Helper function to fetch visitors data of a month time span. |
protected
array
|
|
protected
array
|
#
_getVisitorsFromMonthIntervalHelper( integer $fromInterval )
Helper function to fetch visitors data of a month time span. |
protected
array
|
#
_getVisitorsFromCurrentMonthHelper( )
Helper function to fetch visitors data of the current month. |
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
protected
array
|
#
_getNewCustomersFromDayIntervalHelper( integer $fromInterval )
Helper function to fetch new customer data of a day time span. |
protected
array
|
#
_getNewCustomersFromCurrentDayHelper( )
Helper function to fetch new customer data of the current day. |
protected
array
|
#
_getNewCustomersFromMonthIntervalHelper( integer $fromInterval )
Helper function to fetch new customer data of a month time span. |
protected
array
|
#
_getNewCustomersFromCurrentMonthHelper( )
Helper function to fetch new customer data of the current month. |
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
protected
array
|
#
_getOrdersFromDayIntervalHelper( integer $fromInterval )
Helper function to fetch order data of a month time span. |
protected
array
|
|
protected
array
|
#
_getOrdersFromMonthIntervalHelper( integer $fromInterval )
Helper function to fetch order data of a month time span. |
protected
array
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
string
|
|
public
string
|
#
getConversionRateLastWeek( )
Gets the conversion rate of the last week as a formatted number (i.e.: 0,27) |
public
string
|
#
getConversionRateLastTwoWeeks( )
Gets the conversion rate of the last two weeks as a formatted number (i.e.: 0,27) |
public
string
|
#
getConversionRateLastMonth( )
Gets the conversion rate of the last month as a formatted number (i.e.: 0,27) |
public
string
|
#
getConversionRateLastThreeMonths( )
Gets the conversion rate of the last three months as a formatted number (i.e.: 0,27) |
public
string
|
#
getConversionRateLastSixMonths( )
Gets the conversion rate of the last six months as a formatted number (i.e.: 0,27) |
public
string
|
#
getConversionRateLastYear( )
Gets the conversion rate of the last year as a formatted number (i.e.: 0,27) |
protected
float
|
#
_calculateConversionRate( integer $p_ordersCount, integer $p_visitorsCount )
Calculates the conversion rate |
protected
string
|
#
_getConversionRate( integer $p_ordersCount, integer $p_visitorsCount )
Returns the conversion rate as a formatted number (i.e.: 0,27) |
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
protected
array
|
#
_getSalesFromDayIntervalHelper( integer $fromInterval )
Helper function to fetch sales data of a day time span. |
protected
array
|
|
protected
array
|
#
_getSalesFromMonthIntervalHelper( integer $fromInterval )
Helper function to fetch sales data of a month time span. |
protected
array
|
|
protected
float
|
|
protected
float
|
|
protected
float
|
|
protected
float
|
|
protected
float
|
|
protected
float
|
|
protected
float
|
|
public
string
|
#
getAverageOrderValueToday( )
Gets the average order value of today as a formatted price (i.e.: 1.234,56 EUR). |
public
string
|
#
getAverageOrderValueLastWeek( )
Gets the average order value of the last week as a formatted price (i.e.: 1.234,56 EUR). |
public
string
|
#
getAverageOrderValueLastTwoWeeks( )
Gets the average order value of the last two weeks as a formatted price (i.e.: 1.234,56 EUR). |
public
string
|
#
getAverageOrderValueLastMonth( )
Gets the average order value of the last month as a formatted price (i.e.: 1.234,56 EUR). |
public
string
|
#
getAverageOrderValueLastThreeMonths( )
Gets the average order value of the last three months as a formatted price (i.e.: 1.234,56 EUR). |
public
string
|
#
getAverageOrderValueLastSixMonths( )
Gets the average order value of the last six months as a formatted price (i.e.: 1.234,56 EUR). |
public
string
|
#
getAverageOrderValueLastYear( )
Gets the average order value of the last year as a formatted price (i.e.: 1.234,56 EUR). |
protected
float
|
#
_calculateAverageOrderValue( float $p_sales, integer $p_ordersCount )
Calculates the average order value. |
protected
string
|
#
_getAverageOrderValue( float $p_sales, integer $p_ordersCount )
Returns the conversion rate as a formatted number (i.e.: 0,27). |
Properties summary
protected
CI_DB_query_builder
|
$db
|
|
protected
|
$xtcPrice
|
|
protected
integer
|
$conversionRateDecimalPlaces
|
#
2
|
protected
array
|
$excludeOrderStatusIds
|
#
array(99)
|