ZenMagick 0.9.10


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

Class ZMOrderItem

ZMObject
└─ZMOrderItem

public class ZMOrderItem
extends ZMObject

A single order item

Author:
DerManoMann

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

__construct()

Create new instance.

void

addAttribute(ZMAttribute attribute)

Add an item attribute.

array

getAttributes()

Get the item attributes.

float

getCalculatedPrice(boolean tax)

Get the calculated price.

int

getId()

Get the order item id.

string

getModel()

Get the model.

string

getName()

Get the item name.

ZMProduct

getProduct()

Get the product this item is associated to.

int

getProductId()

Get the order item product id.

int

getQty()

Get the quantity.

float

getTaxRate()

Get the tax rate.

boolean

hasAttributes()

Checks if the item has associated attributes.

void

setAttributes(array attributes)

Set item attributes.

void

setCalculatedPrice(float price)

Set the calculated price.

void

setId(int id)

Set the order item id.

void

setModel(string model)

Set the model.

void

setName(string name)

Set the item name.

void

setProductId(int productId)

Set the order item product id.

void

setQty(int qty)

Set the quantity.

void

setTaxRate(float taxRate)

Set the tax rate.

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

Method Detail

model\order\ZMOrderItem.php at line 46

__construct

public void __construct()

Create new instance.


model\order\ZMOrderItem.php at line 196

addAttribute

public void addAttribute(ZMAttribute attribute)

Add an item attribute.

Parameters:
attribute - A ZMAttribute.

model\order\ZMOrderItem.php at line 140

getAttributes

public array getAttributes()

Get the item attributes.

Returns:
A list of ZMAttribute instances.

model\order\ZMOrderItem.php at line 124

getCalculatedPrice

public float getCalculatedPrice(boolean tax)

Get the calculated price.

Parameters:
tax - Set to true to include tax (if applicable); default is true.
Returns:
The calculated price.

model\order\ZMOrderItem.php at line 65

getId

public int getId()

Get the order item id.

Returns:
The order item id.

model\order\ZMOrderItem.php at line 102

getModel

public string getModel()

Get the model.

Returns:
The item model.

model\order\ZMOrderItem.php at line 95

getName

public string getName()

Get the item name.

Returns:
The item name.

model\order\ZMOrderItem.php at line 79

getProduct

public ZMProduct getProduct()

Get the product this item is associated to.

Returns:
The product.

model\order\ZMOrderItem.php at line 72

getProductId

public int getProductId()

Get the order item product id.

Returns:
The order item product id.

model\order\ZMOrderItem.php at line 88

getQty

public int getQty()

Get the quantity.

Returns:
The quantity for this item.

model\order\ZMOrderItem.php at line 109

getTaxRate

public float getTaxRate()

Get the tax rate.

Returns:
The tax rate.

model\order\ZMOrderItem.php at line 133

hasAttributes

public boolean hasAttributes()

Checks if the item has associated attributes.

Returns:
true if attributes exist, false if not.

model\order\ZMOrderItem.php at line 203

setAttributes

public void setAttributes(array attributes)

Set item attributes.

Parameters:
attributes - A list of ZMAttribute instances.

model\order\ZMOrderItem.php at line 189

setCalculatedPrice

public void setCalculatedPrice(float price)

Set the calculated price.

Parameters:
price - The calculated price.

model\order\ZMOrderItem.php at line 147

setId

public void setId(int id)

Set the order item id.

Parameters:
id - The order item id.

model\order\ZMOrderItem.php at line 175

setModel

public void setModel(string model)

Set the model.

Parameters:
model - The item model.

model\order\ZMOrderItem.php at line 168

setName

public void setName(string name)

Set the item name.

Parameters:
name - The item name.

model\order\ZMOrderItem.php at line 154

setProductId

public void setProductId(int productId)

Set the order item product id.

Parameters:
productId - The order item product id.

model\order\ZMOrderItem.php at line 161

setQty

public void setQty(int qty)

Set the quantity.

Parameters:
qty - The quantity for this item.

model\order\ZMOrderItem.php at line 182

setTaxRate

public void setTaxRate(float taxRate)

Set the tax rate.

Parameters:
taxRate - The tax rate.

ZenMagick 0.9.10