ZenMagick 0.9.10


zenmagick.store.shared.model.order\ZMOrder
model\order\ZMOrder.php at line 33

Class ZMOrder

ZMObject
└─ZMOrder

public class ZMOrder
extends ZMObject

A single order.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create order.

ZMAccount

getAccount()

Get the account for this order.

int

getAccountId()

Get the account id.

ZMAddress

getBillingAddress()

Get the billing address.

int

getId()

Get the order id.

string

getOrderDate()

Get the order date.

array

getOrderItems()

Get the order items.

array

getOrderStatusHistory(int languageId)

Get the order status history.

int

getOrderStatusId()

Get the order status [id].

float

getOrderTotalLineAmountForType(mixed tpye, string type)

Get the total amount for a given total line type.

array

getOrderTotalLines()

Get all order total lines.

ZMOrderTotalLine

getOrderTotalLinesForType(string type, boolean force)

Get order total lines for the given type.

ZMPaymentType

getPaymentType()

Get the payment type.

ZMAddress

getShippingAddress()

Get the shipping address.

string

getStatusName()

Get the order status name [read only]

float

getTotal()

Get the order total.

boolean

hasShippingAddress()

Checks if the order has a shipping address.

boolean

isStorePickup()

Check if the order it pickup.

void

setAccount(ZMAccount account)

Set the account for this order.

void

setAccountId(int accountId)

Set the account id.

void

setBillingAddress(ZMAddress address)

Set the billing address.

void

setId(int id)

Set the order id.

void

setOrderDate(string date)

Set the order date.

void

setOrderStatusId(int statusId)

Set the order status [id].

void

setShippingAddress(ZMAddress address)

Set the shipping address.

void

setTotal(float total)

Set the order total.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

model\order\ZMOrder.php at line 47

__construct

public void __construct()

Create order.


model\order\ZMOrder.php at line 134

getAccount

public ZMAccount getAccount()

Get the account for this order.

NOTE: This contains the account information as of the time the order was placed. This might be different from the current account data.

Returns:
The account.

model\order\ZMOrder.php at line 89

getAccountId

public int getAccountId()

Get the account id.

Returns:
The account id.

model\order\ZMOrder.php at line 223

getBillingAddress

public ZMAddress getBillingAddress()

Get the billing address.

Returns:
The billing address or null.

model\order\ZMOrder.php at line 68

getId

public int getId()

Get the order id.

Returns:
The order id.

model\order\ZMOrder.php at line 117

getOrderDate

public string getOrderDate()

Get the order date.

Returns:
The order date.

model\order\ZMOrder.php at line 255

getOrderItems

public array getOrderItems()

Get the order items.

Returns:
A list of ZMOrderItem instances.

model\order\ZMOrder.php at line 265

getOrderStatusHistory

public array getOrderStatusHistory(int languageId)

Get the order status history.

Parameters:
languageId - The language id.
Returns:
A list of previous order stati.

model\order\ZMOrder.php at line 96

getOrderStatusId

public int getOrderStatusId()

Get the order status [id].

Returns:
The order status [id].

model\order\ZMOrder.php at line 319

getOrderTotalLineAmountForType

public float getOrderTotalLineAmountForType(mixed tpye, string type)

Get the total amount for a given total line type.

Parameters:
type - The total type (without the ot_ prefix).
Returns:
The total amount for all total lines with the given type.

model\order\ZMOrder.php at line 286

getOrderTotalLines

public array getOrderTotalLines()

Get all order total lines.

Returns:
A list of ZMOrderTotalLine instances.

model\order\ZMOrder.php at line 296

getOrderTotalLinesForType

public ZMOrderTotalLine getOrderTotalLinesForType(string type, boolean force)

Get order total lines for the given type.

Parameters:
type - The total type (without the ot_ prefix).
force - If set, a new order total will be created in case the order does not contain the one requested.
Returns:
A ZMOrderTotalLine or null.

model\order\ZMOrder.php at line 349

getPaymentType

public ZMPaymentType getPaymentType()

Get the payment type.

Returns:
A payment type or null if N/A.

model\order\ZMOrder.php at line 201

getShippingAddress

public ZMAddress getShippingAddress()

Get the shipping address.

Returns:
The shipping address or null.

model\order\ZMOrder.php at line 103

getStatusName

public string getStatusName()

Get the order status name [read only]

Returns:
The order status name.

model\order\ZMOrder.php at line 272

getTotal

public float getTotal()

Get the order total.

Returns:
The order total.

model\order\ZMOrder.php at line 245

hasShippingAddress

public boolean hasShippingAddress()

Checks if the order has a shipping address.

Returns:
true if a shipping address exists, false if not.

model\order\ZMOrder.php at line 332

isStorePickup

public boolean isStorePickup()

Check if the order it pickup.

Returns:
true if the order is store pickup, false if not.

model\order\ZMOrder.php at line 155

setAccount

public void setAccount(ZMAccount account)

Set the account for this order.

NOTE: This contains the account information as of the time the order was placed. This might be different from the current account data.

Parameters:
account - The account.

model\order\ZMOrder.php at line 82

setAccountId

public void setAccountId(int accountId)

Set the account id.

Parameters:
accountId - The account id.

model\order\ZMOrder.php at line 235

setBillingAddress

public void setBillingAddress(ZMAddress address)

Set the billing address.

Parameters:
address - The billing address.

model\order\ZMOrder.php at line 75

setId

public void setId(int id)

Set the order id.

Parameters:
id - The order id.

model\order\ZMOrder.php at line 124

setOrderDate

public void setOrderDate(string date)

Set the order date.

Parameters:
date - The order date.

model\order\ZMOrder.php at line 110

setOrderStatusId

public void setOrderStatusId(int statusId)

Set the order status [id].

Parameters:
statusId - The order status [id].

model\order\ZMOrder.php at line 213

setShippingAddress

public void setShippingAddress(ZMAddress address)

Set the shipping address.

Parameters:
address - The shipping address.

model\order\ZMOrder.php at line 279

setTotal

public void setTotal(float total)

Set the order total.

Parameters:
total - The order total.

ZenMagick 0.9.10