OrderTotalFactory

Implements \OrderTotalFactoryInterface

Class OrderTotalFactory

category

System

package

Order

subpackage

Factories

Methods

Creates an OrderTotal object.

createOrderTotal(\StringType $title, \DecimalType $value, \StringType $valueText = null, \StringType $class = null, \IntType $sortOrder = null) : \OrderTotal

Arguments

$title

\StringType

The title of the order total item.

$value

\DecimalType

The decimal value of the order total item.

$valueText

\StringType

(optional) The formatted value as text with currency and so on.

$class

\StringType

(optional) The used order total class (e.g. ot_subtotal).

$sortOrder

\IntType

(optional) The sort order of the order total item.

Response

\OrderTotal

New order total object.

Create a StoredOrderTotal object.

createStoredOrderTotal(\IdType $orderTotalId) : \StoredOrderTotal

Arguments

$orderTotalId

\IdType

ID of the order total item.

Response

\StoredOrderTotal

New stored order total object.