Class StatisticsService
Class StatisticsService
Provides the statistic data for the dashboard.
- StatisticsService implements StatisticsServiceInterface
Methods summary
public
getVisitorsStatisticsDataLastTwoWeeks( void )
: array
Get visitors data for the last two weeks.
public
getVisitorsStatisticsDataLastThreeMonth( void )
: array
Get visitors data for the last three months.
public
getVisitorsStatisticsDataLastSixMonth( void )
: array
Get visitors data for the last six months.
protected
_getVisitorsFromDayIntervalHelper( integer $fromInterval )
: array
Helper function to fetch visitors data of a month time span.
protected
_getVisitorsFromCurrentDayHelper( void )
: array
Helper function to fetch visitors data of the current month.
protected
_getVisitorsFromMonthIntervalHelper( integer $fromInterval )
: array
Helper function to fetch visitors data of a month time span.
protected
_getVisitorsFromCurrentMonthHelper( void )
: array
Helper function to fetch visitors data of the current month.
public
getVisitorsLastThreeMonths( void )
: integer
Gets the amount of visitors of the last three months
public
getVisitorsLastSixMonths( void )
: integer
Gets the amount of visitors of the last six months
public
getNewCustomersStatisticsDataLastWeek( void )
: array
Get new customer data of the last week.
public
getNewCustomersStatisticsDataLastTwoWeeks( void )
: array
Get new customer data of the last two weeks.
public
getNewCustomersStatisticsDataLastMonth( void )
: array
Get new customer data of the last month.
public
getNewCustomersStatisticsDataLastThreeMonth( void )
: array
Get new customer data of the last three months.
public
getNewCustomersStatisticsDataLastSixMonth( void )
: array
Get new customer data of the last six months.
public
getNewCustomersStatisticsDataLastYear( void )
: array
Get new customer data of the last year.
protected
_getNewCustomersFromDayIntervalHelper( integer $fromInterval )
: array
Helper function to fetch new customer data of a day time span.
protected
_getNewCustomersFromCurrentDayHelper( void )
: array
Helper function to fetch new customer data of the current day.
protected
_getNewCustomersFromMonthIntervalHelper( integer $fromInterval )
: array
Helper function to fetch new customer data of a month time span.
protected
_getNewCustomersFromCurrentMonthHelper( void )
: array
Helper function to fetch new customer data of the current month.
public
getNewCustomersLastTwoWeeks( void )
: integer
Gets the amount of new customers of the last two week
public
getNewCustomersLastMonth( void )
: integer
Gets the amount of new customers of the last month
public
getNewCustomersLastThreeMonths( void )
: integer
Gets the amount of new customers of the last three months
public
getNewCustomersLastSixMonths( void )
: integer
Gets the amount of new customers of the last six months
public
getOrderStatisticsDataLastThreeMonth( void )
: array
Get order data for the last three months.
protected
_getOrdersFromDayIntervalHelper( integer $fromInterval )
: array
Helper function to fetch order data of a month time span.
protected
_getOrdersFromCurrentDayHelper( void )
: array
Helper function to fetch order data of the current month.
protected
_getOrdersFromMonthIntervalHelper( integer $fromInterval )
: array
Helper function to fetch order data of a month time span.
protected
_getOrdersFromCurrentMonthHelper( void )
: array
Helper function to fetch order data of the current month.
public
getOrdersCountLastThreeMonths( void )
: integer
Gets the orders count of the last three months
public
getConversionRateToday( void )
: string
Gets the conversion rate of today as a formatted number (i.e.: 0,27)
public
getConversionRateLastWeek( void )
: string
Gets the conversion rate of the last week as a formatted number (i.e.: 0,27)
public
getConversionRateLastTwoWeeks( void )
: string
Gets the conversion rate of the last two weeks as a formatted number (i.e.: 0,27)
public
getConversionRateLastMonth( void )
: string
Gets the conversion rate of the last month as a formatted number (i.e.: 0,27)
public
getConversionRateLastThreeMonths( void )
: string
Gets the conversion rate of the last three months as a formatted number (i.e.: 0,27)
public
getConversionRateLastSixMonths( void )
: string
Gets the conversion rate of the last six months as a formatted number (i.e.: 0,27)
public
getConversionRateLastYear( void )
: string
Gets the conversion rate of the last year as a formatted number (i.e.: 0,27)
protected
_calculateConversionRate( integer $p_ordersCount, integer $p_visitorsCount )
: float
Calculates the conversion rate
protected
_getConversionRate( integer $p_ordersCount, integer $p_visitorsCount )
: string
Returns the conversion rate as a formatted number (i.e.: 0,27)
public
getSalesStatisticsDataLastThreeMonth( void )
: array
Get sales data for the last three month.
protected
_getSalesFromDayIntervalHelper( integer $fromInterval )
: array
Helper function to fetch sales data of a day time span.
protected
_getSalesFromCurrentDayHelper( void )
: array
Helper function to fetch sales data of the current day.
protected
_getSalesFromMonthIntervalHelper( integer $fromInterval )
: array
Helper function to fetch sales data of a month time span.
protected
_getSalesFromCurrentMonthHelper( void )
: array
Helper function to fetch sales data of the current month.
public
getAverageOrderValueToday( void )
: string
Gets the average order value of today as a formatted price (i.e.: 1.234,56 EUR).
public
getAverageOrderValueLastWeek( void )
: string
Gets the average order value of the last week as a formatted price (i.e.: 1.234,56 EUR).
public
getAverageOrderValueLastTwoWeeks( void )
: string
Gets the average order value of the last two weeks as a formatted price (i.e.: 1.234,56 EUR).
public
getAverageOrderValueLastMonth( void )
: string
Gets the average order value of the last month as a formatted price (i.e.: 1.234,56 EUR).
public
getAverageOrderValueLastThreeMonths( void )
: string
Gets the average order value of the last three months as a formatted price (i.e.: 1.234,56 EUR).
public
getAverageOrderValueLastSixMonths( void )
: string
Gets the average order value of the last six months as a formatted price (i.e.: 1.234,56 EUR).
public
getAverageOrderValueLastYear( void )
: string
Gets the average order value of the last year as a formatted price (i.e.: 1.234,56 EUR).
protected
_calculateAverageOrderValue( float $p_sales, integer $p_ordersCount )
: float
Calculates the average order value.
protected
_getAverageOrderValue( float $p_sales, integer $p_ordersCount )
: string
Returns the conversion rate as a formatted number (i.e.: 0,27).