ZenMagick 0.9.8


org.zenmagick.store.model.order.ZMOrder
\store\model\order\ZMOrder.php at line 34

Class ZMOrder

ZMObject
└─ZMOrder

public class ZMOrder
extends ZMObject

A single order.

Author:
DerManoMann
Version:
$Id: ZMOrder.php 2764 2009-12-18 09:13:44Z dermanomann $

Field Summary
mixed

$accountId_

mixed

$orderDate_

mixed

$totalValue_

mixed

$total_

mixed

$zenOrder_

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMOrder()

Create order.

Method Summary
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()

Get the order status history.

int

getOrderStatusId()

Get the order status [id].

ZMOrderTotal

getOrderTotal(string name, boolean force)

Get order total for the given name.

array

getOrderTotals()

Get all order totals.

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
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Field Detail

\store\model\order\ZMOrder.php at line 35

accountId_

public mixed $accountId_

\store\model\order\ZMOrder.php at line 37

orderDate_

public mixed $orderDate_

\store\model\order\ZMOrder.php at line 38

totalValue_

public mixed $totalValue_

\store\model\order\ZMOrder.php at line 42

total_

public mixed $total_

\store\model\order\ZMOrder.php at line 45

zenOrder_

public mixed $zenOrder_

Constructor Detail

\store\model\order\ZMOrder.php at line 51

ZMOrder

public ZMOrder()

Create order.


Method Detail

\store\model\order\ZMOrder.php at line 139

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.

\store\model\order\ZMOrder.php at line 94

getAccountId

public int getAccountId()

Get the account id.

Returns:
The account id.

\store\model\order\ZMOrder.php at line 228

getBillingAddress

public ZMAddress getBillingAddress()

Get the billing address.

Returns:
The billing address or null.

\store\model\order\ZMOrder.php at line 73

getId

public int getId()

Get the order id.

Returns:
The order id.

\store\model\order\ZMOrder.php at line 122

getOrderDate

public string getOrderDate()

Get the order date.

Returns:
The order date.

\store\model\order\ZMOrder.php at line 260

getOrderItems

public array getOrderItems()

Get the order items.

Returns:
A list of ZMOrderItem instances.

\store\model\order\ZMOrder.php at line 269

getOrderStatusHistory

public array getOrderStatusHistory()

Get the order status history.

Returns:
A list of previous order stati.

\store\model\order\ZMOrder.php at line 101

getOrderStatusId

public int getOrderStatusId()

Get the order status [id].

Returns:
The order status [id].

\store\model\order\ZMOrder.php at line 300

getOrderTotal

public ZMOrderTotal getOrderTotal(string name, boolean force)

Get order total for the given name.

Parameters:
name - The total name (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 ZMOrderTotal or null.

\store\model\order\ZMOrder.php at line 290

getOrderTotals

public array getOrderTotals()

Get all order totals.

Returns:
A list of ZMOrderTotal instances.

\store\model\order\ZMOrder.php at line 334

getPaymentType

public ZMPaymentType getPaymentType()

Get the payment type.

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

\store\model\order\ZMOrder.php at line 206

getShippingAddress

public ZMAddress getShippingAddress()

Get the shipping address.

Returns:
The shipping address or null.

\store\model\order\ZMOrder.php at line 108

getStatusName

public string getStatusName()

Get the order status name [read only]

Returns:
The order status name.

\store\model\order\ZMOrder.php at line 276

getTotal

public float getTotal()

Get the order total.

Returns:
The order total.

\store\model\order\ZMOrder.php at line 250

hasShippingAddress

public boolean hasShippingAddress()

Checks if the order has a shipping address.

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

\store\model\order\ZMOrder.php at line 317

isStorePickup

public boolean isStorePickup()

Check if the order it pickup.

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

\store\model\order\ZMOrder.php at line 160

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.

\store\model\order\ZMOrder.php at line 87

setAccountId

public void setAccountId(int accountId)

Set the account id.

Parameters:
accountId - The account id.

\store\model\order\ZMOrder.php at line 240

setBillingAddress

public void setBillingAddress(ZMAddress address)

Set the billing address.

Parameters:
address - The billing address.

\store\model\order\ZMOrder.php at line 80

setId

public void setId(int id)

Set the order id.

Parameters:
id - The order id.

\store\model\order\ZMOrder.php at line 129

setOrderDate

public void setOrderDate(string date)

Set the order date.

Parameters:
date - The order date.

\store\model\order\ZMOrder.php at line 115

setOrderStatusId

public void setOrderStatusId(int statusId)

Set the order status [id].

Parameters:
statusId - The order status [id].

\store\model\order\ZMOrder.php at line 218

setShippingAddress

public void setShippingAddress(ZMAddress address)

Set the shipping address.

Parameters:
address - The shipping address.

\store\model\order\ZMOrder.php at line 283

setTotal

public void setTotal(float total)

Set the order total.

Parameters:
total - The order total.

ZenMagick 0.9.8