Properties

$myConfig

$myConfig : object

Config object

Type

object

$oDb

$oDb : object

Database object

Type

object

$oShopTax

$oShopTax : object

Shoptax object

Type

object

$vatPercent

$vatPercent : object

vat percent object

Type

object

Methods

findLastOrderNr()

findLastOrderNr() : string

Function to find last order number

Returns

string

loadVat()

loadVat() : null

Function to load vat

Returns

null

getConfig()

getConfig() : object

Function to get config object

Returns

object

getDb()

getDb() : object

Function to get database object

Returns

object

getCountryOxid()

getCountryOxid(string  $iso2) : string

Function to get country oxid

Parameters

string $iso2

iso of a country to get the oxid

Returns

string

fetchCountryDetails()

fetchCountryDetails(string  $oxid) : array

Function to get country details based on oxid

Parameters

string $oxid

oxid of a country to get the details

Returns

array

updateOrderDetails()

updateOrderDetails(\JSONstring  $order) : boolean

Function to update order

Parameters

\JSONstring $order

json string with order details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxordernr'=>'xxxxx'.

Returns

boolean

updateOrders()

updateOrders(\JSONstring  $Orders) : array

Function to update multiple orders

Parameters

\JSONstring $Orders

json string with orders details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxordernr'=>'xxxxx'.

Returns

array

insertOrder()

insertOrder(\JSONstring  $order) : string

Function to insert a new order

Parameters

\JSONstring $order

json string with order details as key=>value pairs to insert. Ex: 'oxordernr'=>'xxxxxx', 'oxorderdate'=>'xxxxx'.

Returns

string

insertOrders()

insertOrders(\JSONstring  $Orders) : array

Function to insert new orders

Parameters

\JSONstring $Orders

json string with orders details as key=>value pairs to insert. Ex: 'oxordernr'=>'xxxxxx', 'oxorderdate'=>'xxxxx'.

Returns

array

deleteOrder()

deleteOrder(integer  $OrderId) : boolean

Function to delete order

Parameters

integer $OrderId

oxid of the order to be deleted

Returns

boolean

deleteOrders()

deleteOrders(array  $OrderIds) : boolean

Function to delete multiple orders

Parameters

array $OrderIds

oxid of the orders to be deleted

Returns

boolean

fetchAllOrders()

fetchAllOrders(integer  $start = 1, integer  $offset = 30) : array

Function to fetch orders

Parameters

integer $start

start index of the fetchAllOrders result (optional)

integer $offset

offset index of the fetchAllOrders result (optional)

Returns

array

findOrder()

findOrder(integer  $orderId) : array

Function to find order based on orderid

Parameters

integer $orderId

oxid of the order to fetch the order details

Returns

array

fetchOrders()

fetchOrders(string  $type = null) : array

Function to fetch orders

Parameters

string $type

type of the request like last order, month orders, ...

Returns

array

fetchOrdersByColumns()

fetchOrdersByColumns(\JSONstring  $data, integer  $start = 1, integer  $offset = 30) : array

Function to fetch orders with specified columns

Parameters

\JSONstring $data

json array with 'orders'=> required fields with (,) seperated and 'items'=> required fields with (,) seperated.

integer $start

start index for the results to fetch

integer $offset

offset index for the results to fetch

Returns

array

findOrderByColumns()

findOrderByColumns(\JSONstring  $data) : array

Function to find order based on orderid

Parameters

\JSONstring $data

json array with 'orderid'=> order id to be fetched, 'orders'=> required fields with (,) seperated and 'items'=> required fields with (,) seperated.

Returns

array

getShopRevenue()

getShopRevenue(string  $type = null) : array

Function to fetch shop revenue

Parameters

string $type

type of the request like today revenue, this month revenue, this week revenue, ...

Returns

array

getUserGroupOrders()

getUserGroupOrders(string  $groupId = "") : array

Function to fetch order details ordered by a specific user group based on groupid

Parameters

string $groupId

groupid to fetch their orders

Returns

array

getUserOrderHistory()

getUserOrderHistory(string  $userId = "") : array

Function to fetch order details ordered by a specific user based on groupid

Parameters

string $userId

userid to fetch their orders

Returns

array

getOrdersPerMonth()

getOrdersPerMonth(string  $ordYear = null) : array

Function to fetch number of orders and revenue details based on year

Parameters

string $ordYear

year number

Returns

array

fetchPreviousOrder()

fetchPreviousOrder(string  $oxid) : string

Function to fetch previous order details based on oxid

Parameters

string $oxid

oxid of an order to get its previous order details

Returns

string

fetchNextOrder()

fetchNextOrder(string  $oxid) : string

Function to get next order details based on oxid

Parameters

string $oxid

oxid of an order to get its next order details

Returns

string

getMonths()

getMonths() : array

Returns months of year

Returns

array