Order
- Type
- Class
- Namespace
- craft\commerce\helpers
- Inherits
- craft\commerce\helpers\Order
- Since
- 2.1
Order helper
View source (opens new window)
# Public Methods
Method | Description |
---|---|
mergeDuplicateLineItems() | |
mergeOrders() | Merges the contents of otherOrder into the primaryOrder |
# mergeDuplicateLineItems()
View source (opens new window)
Arguments
$order
(craft\commerce\elements\Order)
Returns
boolean (opens new window) – Were line items merged?
# mergeOrders()
Merges the contents of otherOrder into the primaryOrder
View source (opens new window)
Arguments
$primaryOrder
(craft\commerce\elements\Order) – The order that the other order will be merged into$otherOrder
$persistPrimary
$deleteOther
(boolean (opens new window)) – Should the other order be deleted, you can not delete if the primary order is not persisted.