Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • StatisticsService

Class StatisticsService

Class StatisticsService

Provides the statistic data for the dashboard.

StatisticsService implements StatisticsServiceInterface
Package: Statistics
Category: System
Located at Services/Core/Statistic/StatisticsService.inc.php

Methods summary

public
# __construct( CI_DB_query_builder $db, StatisticsService::$xtcPrice $xtcPrice )
public integer
# getUsersOnline( )

Gets the amount of users who are currently online.

Gets the amount of users who are currently online.

Returns

integer

Implementation of

StatisticsServiceInterface::getUsersOnline()
public array
# getVisitorsStatisticsDataLastWeek( )

Get visitors data for the last week.

Get visitors data for the last week.

Returns

array
public array
# getVisitorsStatisticsDataLastTwoWeeks( )

Get visitors data for the last two weeks.

Get visitors data for the last two weeks.

Returns

array
public array
# getVisitorsStatisticsDataLastMonth( )

Get visitors data for the last month.

Get visitors data for the last month.

Returns

array
public array
# getVisitorsStatisticsDataLastThreeMonth( )

Get visitors data for the last three months.

Get visitors data for the last three months.

Returns

array
public array
# getVisitorsStatisticsDataLastSixMonth( )

Get visitors data for the last six months.

Get visitors data for the last six months.

Returns

array
public array
# getVisitorsStatisticsDataLastYear( )

Get visitors data for the last six months.

Get visitors data for the last six months.

Returns

array
protected array
# _getVisitorsFromDayIntervalHelper( integer $fromInterval )

Helper function to fetch visitors data of a month time span.

Helper function to fetch visitors data of a month time span.

Parameters

$fromInterval

Returns

array
protected array
# _getVisitorsFromCurrentDayHelper( )

Helper function to fetch visitors data of the current month.

Helper function to fetch visitors data of the current month.

Returns

array
protected array
# _getVisitorsFromMonthIntervalHelper( integer $fromInterval )

Helper function to fetch visitors data of a month time span.

Helper function to fetch visitors data of a month time span.

Parameters

$fromInterval

Returns

array
protected array
# _getVisitorsFromCurrentMonthHelper( )

Helper function to fetch visitors data of the current month.

Helper function to fetch visitors data of the current month.

Returns

array
public integer
# getVisitorsToday( )

Gets the amount of visitors of the current date.

Gets the amount of visitors of the current date.

Returns

integer

Implementation of

StatisticsServiceInterface::getVisitorsToday()
public integer
# getVisitorsLastWeek( )

Gets the amount of visitors of the last week

Gets the amount of visitors of the last week

Returns

integer

Implementation of

StatisticsServiceInterface::getVisitorsLastWeek()
public integer
# getVisitorsLastTwoWeeks( )

Gets the amount of visitors of the last two week

Gets the amount of visitors of the last two week

Returns

integer

Implementation of

StatisticsServiceInterface::getVisitorsLastTwoWeeks()
public integer
# getVisitorsLastMonth( )

Gets the amount of visitors of the last month

Gets the amount of visitors of the last month

Returns

integer

Implementation of

StatisticsServiceInterface::getVisitorsLastMonth()
public integer
# getVisitorsLastThreeMonths( )

Gets the amount of visitors of the last three months

Gets the amount of visitors of the last three months

Returns

integer

Implementation of

StatisticsServiceInterface::getVisitorsLastThreeMonths()
public integer
# getVisitorsLastSixMonths( )

Gets the amount of visitors of the last six months

Gets the amount of visitors of the last six months

Returns

integer

Implementation of

StatisticsServiceInterface::getVisitorsLastSixMonths()
public integer
# getVisitorsLastYear( )

Gets the amount of visitors of the last year

Gets the amount of visitors of the last year

Returns

integer

Implementation of

StatisticsServiceInterface::getVisitorsLastYear()
public array
# getNewCustomersStatisticsDataLastWeek( )

Get new customer data of the last week.

Get new customer data of the last week.

Returns

array
public array
# getNewCustomersStatisticsDataLastTwoWeeks( )

Get new customer data of the last two weeks.

Get new customer data of the last two weeks.

Returns

array
public array
# getNewCustomersStatisticsDataLastMonth( )

Get new customer data of the last month.

Get new customer data of the last month.

Returns

array
public array
# getNewCustomersStatisticsDataLastThreeMonth( )

Get new customer data of the last three months.

Get new customer data of the last three months.

Returns

array
public array
# getNewCustomersStatisticsDataLastSixMonth( )

Get new customer data of the last six months.

Get new customer data of the last six months.

Returns

array
public array
# getNewCustomersStatisticsDataLastYear( )

Get new customer data of the last year.

Get new customer data of the last year.

Returns

array
protected array
# _getNewCustomersFromDayIntervalHelper( integer $fromInterval )

Helper function to fetch new customer data of a day time span.

Helper function to fetch new customer data of a day time span.

Parameters

$fromInterval

Returns

array
protected array
# _getNewCustomersFromCurrentDayHelper( )

Helper function to fetch new customer data of the current day.

Helper function to fetch new customer data of the current day.

Returns

array
protected array
# _getNewCustomersFromMonthIntervalHelper( integer $fromInterval )

Helper function to fetch new customer data of a month time span.

Helper function to fetch new customer data of a month time span.

Parameters

$fromInterval

Returns

array
protected array
# _getNewCustomersFromCurrentMonthHelper( )

Helper function to fetch new customer data of the current month.

Helper function to fetch new customer data of the current month.

Returns

array
public integer
# getNewCustomersToday( )

Gets the amount of new customers of the current date

Gets the amount of new customers of the current date

Returns

integer

Implementation of

StatisticsServiceInterface::getNewCustomersToday()
public integer
# getNewCustomersLastWeek( )

Gets the amount of new customers of the last week

Gets the amount of new customers of the last week

Returns

integer

Implementation of

StatisticsServiceInterface::getNewCustomersLastWeek()
public integer
# getNewCustomersLastTwoWeeks( )

Gets the amount of new customers of the last two week

Gets the amount of new customers of the last two week

Returns

integer

Implementation of

StatisticsServiceInterface::getNewCustomersLastTwoWeeks()
public integer
# getNewCustomersLastMonth( )

Gets the amount of new customers of the last month

Gets the amount of new customers of the last month

Returns

integer

Implementation of

StatisticsServiceInterface::getNewCustomersLastMonth()
public integer
# getNewCustomersLastThreeMonths( )

Gets the amount of new customers of the last three months

Gets the amount of new customers of the last three months

Returns

integer

Implementation of

StatisticsServiceInterface::getNewCustomersLastThreeMonths()
public integer
# getNewCustomersLastSixMonths( )

Gets the amount of new customers of the last six months

Gets the amount of new customers of the last six months

Returns

integer

Implementation of

StatisticsServiceInterface::getNewCustomersLastSixMonths()
public integer
# getNewCustomersLastYear( )

Gets the amount of new customers of the last year

Gets the amount of new customers of the last year

Returns

integer

Implementation of

StatisticsServiceInterface::getNewCustomersLastYear()
public array
# getOrdersStatisticsDataLastWeek( )

Get orders data for the last week.

Get orders data for the last week.

Returns

array
public array
# getOrdersStatisticsDataLastTwoWeek( )

Get orders data for the last two weeks.

Get orders data for the last two weeks.

Returns

array
public array
# getOrdersStatisticsDataLastMonth( )

Get orders data for the last month.

Get orders data for the last month.

Returns

array
public array
# getOrderStatisticsDataLastThreeMonth( )

Get order data for the last three months.

Get order data for the last three months.

Returns

array
public array
# getOrderStatisticsDataLastSixMonth( )

Get order data for the last six months.

Get order data for the last six months.

Returns

array
public array
# getOrderStatisticsDataLastYear( )

Get order data for the last year.

Get order data for the last year.

Returns

array
protected array
# _getOrdersFromDayIntervalHelper( integer $fromInterval )

Helper function to fetch order data of a month time span.

Helper function to fetch order data of a month time span.

Parameters

$fromInterval

Returns

array
protected array
# _getOrdersFromCurrentDayHelper( )

Helper function to fetch order data of the current month.

Helper function to fetch order data of the current month.

Returns

array
protected array
# _getOrdersFromMonthIntervalHelper( integer $fromInterval )

Helper function to fetch order data of a month time span.

Helper function to fetch order data of a month time span.

Parameters

$fromInterval

Returns

array
protected array
# _getOrdersFromCurrentMonthHelper( )

Helper function to fetch order data of the current month.

Helper function to fetch order data of the current month.

Returns

array
public integer
# getOrdersCountToday( )

Gets the orders count of today

Gets the orders count of today

Returns

integer

Implementation of

StatisticsServiceInterface::getOrdersCountToday()
public integer
# getOrdersCountLastWeek( )

Gets the orders count of the last week

Gets the orders count of the last week

Returns

integer

Implementation of

StatisticsServiceInterface::getOrdersCountLastWeek()
public integer
# getOrdersCountLastTwoWeeks( )

Gets the orders count of the last two weeks

Gets the orders count of the last two weeks

Returns

integer

Implementation of

StatisticsServiceInterface::getOrdersCountLastTwoWeeks()
public integer
# getOrdersCountLastMonth( )

Gets the orders count of the last month

Gets the orders count of the last month

Returns

integer

Implementation of

StatisticsServiceInterface::getOrdersCountLastMonth()
public integer
# getOrdersCountLastThreeMonths( )

Gets the orders count of the last three months

Gets the orders count of the last three months

Returns

integer

Implementation of

StatisticsServiceInterface::getOrdersCountLastThreeMonths()
public integer
# getOrdersCountLastSixMonths( )

Gets the orders count of the last six months

Gets the orders count of the last six months

Returns

integer

Implementation of

StatisticsServiceInterface::getOrdersCountLastSixMonths()
public integer
# getOrdersCountLastYear( )

Gets the orders count of the last year

Gets the orders count of the last year

Returns

integer

Implementation of

StatisticsServiceInterface::getOrdersCountLastYear()
public string
# getConversionRateToday( )

Gets the conversion rate of today as a formatted number (i.e.: 0,27)

Gets the conversion rate of today as a formatted number (i.e.: 0,27)

Returns

string

Implementation of

StatisticsServiceInterface::getConversionRateToday()
public string
# getConversionRateLastWeek( )

Gets the conversion rate of the last week as a formatted number (i.e.: 0,27)

Gets the conversion rate of the last week as a formatted number (i.e.: 0,27)

Returns

string

Implementation of

StatisticsServiceInterface::getConversionRateLastWeek()
public string
# getConversionRateLastTwoWeeks( )

Gets the conversion rate of the last two weeks as a formatted number (i.e.: 0,27)

Gets the conversion rate of the last two weeks as a formatted number (i.e.: 0,27)

Returns

string

Implementation of

StatisticsServiceInterface::getConversionRateLastTwoWeeks()
public string
# getConversionRateLastMonth( )

Gets the conversion rate of the last month as a formatted number (i.e.: 0,27)

Gets the conversion rate of the last month as a formatted number (i.e.: 0,27)

Returns

string

Implementation of

StatisticsServiceInterface::getConversionRateLastMonth()
public string
# getConversionRateLastThreeMonths( )

Gets the conversion rate of the last three months as a formatted number (i.e.: 0,27)

Gets the conversion rate of the last three months as a formatted number (i.e.: 0,27)

Returns

string

Implementation of

StatisticsServiceInterface::getConversionRateLastThreeMonths()
public string
# getConversionRateLastSixMonths( )

Gets the conversion rate of the last six months as a formatted number (i.e.: 0,27)

Gets the conversion rate of the last six months as a formatted number (i.e.: 0,27)

Returns

string

Implementation of

StatisticsServiceInterface::getConversionRateLastSixMonths()
public string
# getConversionRateLastYear( )

Gets the conversion rate of the last year as a formatted number (i.e.: 0,27)

Gets the conversion rate of the last year as a formatted number (i.e.: 0,27)

Returns

string

Implementation of

StatisticsServiceInterface::getConversionRateLastYear()
protected float
# _calculateConversionRate( integer $p_ordersCount, integer $p_visitorsCount )

Calculates the conversion rate

Calculates the conversion rate

Parameters

$p_ordersCount
$p_visitorsCount

Returns

float
protected string
# _getConversionRate( integer $p_ordersCount, integer $p_visitorsCount )

Returns the conversion rate as a formatted number (i.e.: 0,27)

Returns the conversion rate as a formatted number (i.e.: 0,27)

Parameters

$p_ordersCount
$p_visitorsCount

Returns

string
public string
# getSalesToday( )

Gets the amount of sales of the current date

Gets the amount of sales of the current date

Returns

string

Implementation of

StatisticsServiceInterface::getSalesToday()
public string
# getSalesLastWeek( )

Gets the amount of sales of the last week

Gets the amount of sales of the last week

Returns

string

Implementation of

StatisticsServiceInterface::getSalesLastWeek()
public string
# getSalesLastTwoWeeks( )

Gets the amount of sales of the last two week

Gets the amount of sales of the last two week

Returns

string

Implementation of

StatisticsServiceInterface::getSalesLastTwoWeeks()
public string
# getSalesLastMonth( )

Gets the amount of sales of the last month

Gets the amount of sales of the last month

Returns

string

Implementation of

StatisticsServiceInterface::getSalesLastMonth()
public string
# getSalesLastThreeMonths( )

Gets the amount of sales of the last three months

Gets the amount of sales of the last three months

Returns

string

Implementation of

StatisticsServiceInterface::getSalesLastThreeMonths()
public string
# getSalesLastSixMonths( )

Gets the amount of sales of the last six months

Gets the amount of sales of the last six months

Returns

string

Implementation of

StatisticsServiceInterface::getSalesLastSixMonths()
public string
# getSalesLastYear( )

Gets the amount of sales of the last year

Gets the amount of sales of the last year

Returns

string

Implementation of

StatisticsServiceInterface::getSalesLastYear()
public array
# getSalesStatisticsDataLastWeek( )

Get sales data for the last week.

Get sales data for the last week.

Returns

array
public array
# getSalesStatisticsDataLastTwoWeeks( )

Get sales data for the last two weeks.

Get sales data for the last two weeks.

Returns

array
public array
# getSalesStatisticsDataLastMonth( )

Get sales data for the last month.

Get sales data for the last month.

Returns

array
public array
# getSalesStatisticsDataLastThreeMonth( )

Get sales data for the last three month.

Get sales data for the last three month.

Returns

array
public array
# getSalesStatisticsDataLastSixMonth( )

Get sales data for the last six month.

Get sales data for the last six month.

Returns

array
public array
# getSalesStatisticsDataLastYear( )

Get sales data for the last year.

Get sales data for the last year.

Returns

array
protected array
# _getSalesFromDayIntervalHelper( integer $fromInterval )

Helper function to fetch sales data of a day time span.

Helper function to fetch sales data of a day time span.

Parameters

$fromInterval

Returns

array
protected array
# _getSalesFromCurrentDayHelper( )

Helper function to fetch sales data of the current day.

Helper function to fetch sales data of the current day.

Returns

array
protected array
# _getSalesFromMonthIntervalHelper( integer $fromInterval )

Helper function to fetch sales data of a month time span.

Helper function to fetch sales data of a month time span.

Parameters

$fromInterval

Returns

array
protected array
# _getSalesFromCurrentMonthHelper( )

Helper function to fetch sales data of the current month.

Helper function to fetch sales data of the current month.

Returns

array
protected float
# _getSalesToday( )

Get Sales Today

Get Sales Today

Returns

float
protected float
# _getSalesLastWeek( )

Get Sales Last Week

Get Sales Last Week

Returns

float
protected float
# _getSalesLastTwoWeeks( )

Get Sales Last Two Weeks

Get Sales Last Two Weeks

Returns

float
protected float
# _getSalesLastMonth( )

Get Sales Last Month

Get Sales Last Month

Returns

float
protected float
# _getSalesLastThreeMonths( )

Get Sales Last Three Months

Get Sales Last Three Months

Returns

float
protected float
# _getSalesLastSixMonths( )

Get Sales Last Six Months

Get Sales Last Six Months

Returns

float
protected float
# _getSalesLastYear( )

Get Sales Last Year

Get Sales Last Year

Returns

float
public string
# getAverageOrderValueToday( )

Gets the average order value of today as a formatted price (i.e.: 1.234,56 EUR).

Gets the average order value of today as a formatted price (i.e.: 1.234,56 EUR).

Returns

string

Implementation of

StatisticsServiceInterface::getAverageOrderValueToday()
public string
# getAverageOrderValueLastWeek( )

Gets the average order value of the last week as a formatted price (i.e.: 1.234,56 EUR).

Gets the average order value of the last week as a formatted price (i.e.: 1.234,56 EUR).

Returns

string

Implementation of

StatisticsServiceInterface::getAverageOrderValueLastWeek()
public string
# getAverageOrderValueLastTwoWeeks( )

Gets the average order value of the last two weeks as a formatted price (i.e.: 1.234,56 EUR).

Gets the average order value of the last two weeks as a formatted price (i.e.: 1.234,56 EUR).

Returns

string

Implementation of

StatisticsServiceInterface::getAverageOrderValueLastTwoWeeks()
public string
# getAverageOrderValueLastMonth( )

Gets the average order value of the last month as a formatted price (i.e.: 1.234,56 EUR).

Gets the average order value of the last month as a formatted price (i.e.: 1.234,56 EUR).

Returns

string

Implementation of

StatisticsServiceInterface::getAverageOrderValueLastMonth()
public string
# getAverageOrderValueLastThreeMonths( )

Gets the average order value of the last three months as a formatted price (i.e.: 1.234,56 EUR).

Gets the average order value of the last three months as a formatted price (i.e.: 1.234,56 EUR).

Returns

string

Implementation of

StatisticsServiceInterface::getAverageOrderValueLastThreeMonths()
public string
# getAverageOrderValueLastSixMonths( )

Gets the average order value of the last six months as a formatted price (i.e.: 1.234,56 EUR).

Gets the average order value of the last six months as a formatted price (i.e.: 1.234,56 EUR).

Returns

string

Implementation of

StatisticsServiceInterface::getAverageOrderValueLastSixMonths()
public string
# getAverageOrderValueLastYear( )

Gets the average order value of the last year as a formatted price (i.e.: 1.234,56 EUR).

Gets the average order value of the last year as a formatted price (i.e.: 1.234,56 EUR).

Returns

string

Implementation of

StatisticsServiceInterface::getAverageOrderValueLastYear()
protected float
# _calculateAverageOrderValue( float $p_sales, integer $p_ordersCount )

Calculates the average order value.

Calculates the average order value.

Parameters

$p_sales
$p_ordersCount

Returns

float
protected string
# _getAverageOrderValue( float $p_sales, integer $p_ordersCount )

Returns the conversion rate as a formatted number (i.e.: 0,27).

Returns the conversion rate as a formatted number (i.e.: 0,27).

Parameters

$p_sales
$p_ordersCount

Returns

string

Properties summary

protected CI_DB_query_builder $db
#
protected StatisticsService::$xtcPrice $xtcPrice
#
protected integer $conversionRateDecimalPlaces
# 2
protected array $excludeOrderStatusIds
# array(99)
API documentation generated by ApiGen