OrderListGeneratorInterface

Extends

Interface OrderListGeneratorInterface

category

System

package

Order

subpackage

Interfaces

Methods

Filter order list items by the provided parameters.

filterOrderList(array $filterParameters, \IntType|null $startIndex = null, \IntType|null $maxCount = null, \StringType|null $orderBy = null) : \OrderListItemCollection

The following slug names need to be used:

  • number => orders.orders_id
  • customer => orders.customers_lastname orders.customers_firstname
  • group => orders.customers_status_name
  • sum => orders_total.value
  • payment => orders.payment_method
  • shipping => orders.shipping_method
  • countryIsoCode => orders.delivery_country_iso_code_2
  • date => orders.date_purchased
  • status => orders_status.orders_status_name
  • invoiceNumber => invoices.invoice_number

Arguments

$filterParameters

array

Contains the column slug-names and their values.

$startIndex

\IntType|null

The start index of the wanted array to be returned (default = null).

$maxCount

\IntType|null

Maximum amount of items which should be returned (default = null).

$orderBy

\StringType|null

A string which defines how the items should be ordered (default = null).

Response

\OrderListItemCollection

Get the filtered orders count.

filterOrderListCount(array $filterParameters) : integer

This number is useful for pagination functionality where the app needs to know the number of the filtered rows.

Throws
\BadMethodCallException

Arguments

$filterParameters

array

Response

integer

Get Order List Items

getOrderListByConditions(string|array $conditions = array(), \IntType $startIndex = null, \IntType $maxCount = null, \StringType $orderBy = null) : \OrderListItemCollection

Returns an order list item collection.

Throws
\InvalidArgumentException

If the result rows contain invalid values.

Arguments

$conditions

string|array

Provide a WHERE clause string or an associative array (actually any parameter that is acceptable by the "where" method of the CI_DB_query_builder method).

$startIndex

\IntType

The start index of the wanted array to be returned (default = null).

$maxCount

\IntType

Maximum amount of items which should be returned (default = null).

$orderBy

\StringType

A string which defines how the items should be ordered (default = null).

Response

\OrderListItemCollection

Filters records by a single keyword string.

getOrderListByKeyword(\StringType $keyword, \IntType|null $startIndex = null, \IntType|null $maxCount = null, \StringType|null $orderBy = null) : \OrderListItemCollection

Arguments

$keyword

\StringType

Keyword string to be used for searching in order records.

$startIndex

\IntType|null

The start index of the wanted array to be returned (default = null).

$maxCount

\IntType|null

Maximum amount of items which should be returned (default = null).

$orderBy

\StringType|null

A string which defines how the items should be ordered (default = null).

Response

\OrderListItemCollection

Order list item collection.

Get count of orders filtered by keyword

getOrderListByKeywordCount(\StringType $keyword) : integer

Arguments

$keyword

\StringType

Keyword string to be used for searching in order records.

Response

integer

Get the total count of all orders

getOrderListCount() : integer

Response

integer