ZMObject
└─ZMOrderItem
public class ZMOrderItem
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| void | addAttribute(ZMAttribute attribute) Add an item attribute. |
| array | 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 | Get the product this item is associated to. |
| int | Get the order item product id. |
| int | getQty() Get the quantity. |
| float | Get the tax rate. |
| boolean | 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 | |
public void __construct()
Create new instance.
public void addAttribute(ZMAttribute attribute)
Add an item attribute.
ZMAttribute.public array getAttributes()
Get the item attributes.
ZMAttribute instances.public float getCalculatedPrice(boolean tax)
Get the calculated price.
true to include tax (if applicable); default is true.public int getId()
Get the order item id.
public string getModel()
Get the model.
public string getName()
Get the item name.
public ZMProduct getProduct()
Get the product this item is associated to.
public int getProductId()
Get the order item product id.
public int getQty()
Get the quantity.
public float getTaxRate()
Get the tax rate.
public boolean hasAttributes()
Checks if the item has associated attributes.
false if not.public void setAttributes(array attributes)
Set item attributes.
ZMAttribute instances.public void setCalculatedPrice(float price)
Set the calculated price.
public void setId(int id)
Set the order item id.
public void setModel(string model)
Set the model.
public void setName(string name)
Set the item name.
public void setProductId(int productId)
Set the order item product id.
public void setQty(int qty)
Set the quantity.
public void setTaxRate(float taxRate)
Set the tax rate.
A single order item