ZenMagick 0.9.1


org.zenmagick.service.ZMOrders

Class ZMOrders

ZMObject
|
+--ZMOrders

public class ZMOrders
extends ZMObject

Orders.

Author:
mano
Version:
$Id: ZMOrders.php 1029 2008-04-10 08:30:07Z DerManoMann $

Constructor Summary

ZMOrders()

Create new instance.

Method Summary
ZMOrderStatus

createOrderStatusHistory(ZMOrderStatus orderStatus)

Create new order status history entry.

ZMOrder

getOrderForId(mixed orderId, int languageId, int id)

Get order for the given id.

void

getOrderStatusHistoryForId(int orderId, int languageId)

Get order status history for order id.

array

getOrderTotals(int orderId)

Get order totals.

array

getOrdersForAccountId(int accountId, int limit, int languageId)

Get all orders for the given account id.

array

getOrdersForStatusId(int statusId, int languageId)

Get all orders for a given order status.

static void

instance()

Get instance.

ZMOrder

updateOrder(mixed order, ZMOrder The)

Update an existing order.

Methods inherited from org.zenmagick.ZMObject
backtrace, create, log, singleton

Constructor Detail

ZMOrders

public ZMOrders()

Create new instance. /


Method Detail

createOrderStatusHistory

public ZMOrderStatus createOrderStatusHistory(ZMOrderStatus orderStatus)

Create new order status history entry.

Parameters:
orderStatus - The new order status.
Returns:
The created order status (incl id).

getOrderForId

public ZMOrder getOrderForId(mixed orderId, int languageId, int id)

Get order for the given id.

Parameters:
id - The order id.
languageId - Optional language id; default is null for session language.
Returns:
A order or null.

getOrderStatusHistoryForId

public void getOrderStatusHistoryForId(int orderId, int languageId)

Get order status history for order id.

Parameters:
orderId - The order id.
languageId - Optional language id; default is null for session language.

getOrderTotals

public array getOrderTotals(int orderId)

Get order totals.

Parameters:
orderId - The order id.
Returns:
List of ZMOrderItem instances.

getOrdersForAccountId

public array getOrdersForAccountId(int accountId, int limit, int languageId)

Get all orders for the given account id.

Parameters:
accountId - The account id.
limit - Optional result limit.
languageId - Optional language id; default is null for session language.
Returns:
List of ZMOrder instances.

getOrdersForStatusId

public array getOrdersForStatusId(int statusId, int languageId)

Get all orders for a given order status.

Parameters:
statusId - The order status.
languageId - Optional language id; default is null for session language.
Returns:
List of ZMOrder instances.

instance

public static void instance()

Get instance. /


updateOrder

public ZMOrder updateOrder(mixed order, ZMOrder The)

Update an existing order.

NOTE: Currently not all properties are supported!

Parameters:
The - order.
Returns:
The updated order.

ZenMagick 0.9.1