Order ​
- Type
- Class
- Namespace
- craft\commerce\helpers
- Inherits
- craft\commerce\helpers\Order
- Since
- 2.1
Order helper
Public Methods ​
| Method | Description |
|---|---|
| mergeDuplicateLineItems() | |
| normalizeLineItemPurchasableAvailability() | Removes any line items from the cart that are no longer available. |
mergeDuplicateLineItems() ​
Arguments ​
$order
Returns ​
boolean – Were any line items merged?
normalizeLineItemPurchasableAvailability() ​
- Since
- 4.9.3
Removes any line items from the cart that are no longer available.
If a line item is available but the quantity is more than the available stock, the quantity will be reduced to the available stock. A notice will be added to the cart for each change.
Arguments ​
$order(craft\commerce\elements\Order)
Returns ​
void