ZenMagick 0.9.10


zenmagick.store.shared.model.checkout\ZMOrderTotalLineDetails
model\checkout\ZMOrderTotalLineDetails.php at line 44

Class ZMOrderTotalLineDetails

ZMObject
└─ZMOrderTotalLineDetails

public class ZMOrderTotalLineDetails
extends ZMObject

Order total line details as returned by a pluing implementing the ZMOrderTotal interface.

The title and amount are the minimum requirements for an order total. Other available properties are optional.

Order totals are not supposed to calculate tax on their own. Instead, each calculated detail includes a corresponding tax class id. That way tax can be calculated later on the subtotals for each tax class to avoid rounding errors. The tax, subtotal and total order totals are responsible for handling all of that.

The default value for the tax class id is 0 for no tax.

Author:
DerManoMann

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

__construct()

Create new instance.

float

getAmount()

Get the amount.

float

getDisplayValue()

Get the display value.

int

getTaxClassId()

Get the tax class id.

string

getTitle()

Get the title.

void

setAmount(float amount)

Set the amount.

void

setDisplayValue(float value)

Set the display value.

void

setTaxClassId(int taxClassId)

Set the tax class id.

void

setTitle(string title)

Set the title.

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

Method Detail

model\checkout\ZMOrderTotalLineDetails.php at line 54

__construct

public void __construct()

Create new instance.


model\checkout\ZMOrderTotalLineDetails.php at line 93

getAmount

public float getAmount()

Get the amount.

The amount to be used for subtotal/total calculation. This may be different from value.

Returns:
The amount.

model\checkout\ZMOrderTotalLineDetails.php at line 111

getDisplayValue

public float getDisplayValue()

Get the display value.

The money/value to be displayed. This will be different from the amount in the case of order totals that are purely for display. Examples are subtotal and total. In those cases the amount will be , while the value will the some calculated money amount.

Returns:
The value.

model\checkout\ZMOrderTotalLineDetails.php at line 125

getTaxClassId

public int getTaxClassId()

Get the tax class id.

Returns:
The tax class id.

model\checkout\ZMOrderTotalLineDetails.php at line 75

getTitle

public string getTitle()

Get the title.

Returns:
The title.

model\checkout\ZMOrderTotalLineDetails.php at line 100

setAmount

public void setAmount(float amount)

Set the amount.

Parameters:
amount - The amount.

model\checkout\ZMOrderTotalLineDetails.php at line 118

setDisplayValue

public void setDisplayValue(float value)

Set the display value.

Parameters:
value - The value.

model\checkout\ZMOrderTotalLineDetails.php at line 132

setTaxClassId

public void setTaxClassId(int taxClassId)

Set the tax class id.

Parameters:
taxClassId - The tax class id.

model\checkout\ZMOrderTotalLineDetails.php at line 84

setTitle

public void setTitle(string title)

Set the title.

The title is the text to disapppear in the order total display.

Parameters:
title - The title.

ZenMagick 0.9.10