|
| 1 | +Special type of [Order](comOrder) that represents the contents of a cart, before the order is marked as ready for processing. |
| 2 | + |
| 3 | +## Meta |
| 4 | + |
| 5 | +- Extends: [`comOrder`](comOrder) |
| 6 | +- Table: `modx_commerce_order` |
| 7 | + |
| 8 | +## Descendant Classes |
| 9 | + |
| 10 | +- [`comSessionCartOrder`](comSessionCartOrder) |
| 11 | + |
| 12 | + |
| 13 | +## Relations |
| 14 | + |
| 15 | +- `Context`: one `modContext` object (`comCartOrder.context = modContext.key`) |
| 16 | +- `Status`: one [`comStatus`](comStatus) object (`comCartOrder.status = comStatus.id`) |
| 17 | +- `CreatedBy`: one `modUser` object (`comCartOrder.created_by = modUser.id`) |
| 18 | +- `LastUpdatedBy`: one `modUser` object (`comCartOrder.last_updated_by = modUser.id`) |
| 19 | +- `StatusUpdatedBy`: one `modUser` object (`comCartOrder.status_updated_by = modUser.id`) |
| 20 | +- `ShippingMethod`: one [`comShippingMethod`](comShippingMethod) object (`comCartOrder.shipping_method = comShippingMethod.id`) |
| 21 | +- `Parent`: one [`comOrder`](comOrder) object (`comCartOrder.parent = comOrder.id`) |
| 22 | +- `User`: one `modUser` object (`comCartOrder.user = modUser.id`) |
| 23 | +- `Descendants`: many [`comOrder`](comOrder) objects (`comCartOrder.id = comOrder.parent`) |
| 24 | +- `Items`: many [`comOrderItem`](comOrderItem) objects (`comCartOrder.id = comOrderItem.order`) |
| 25 | +- `Addresses`: many [`comOrderAddress`](comOrderAddress) objects (`comCartOrder.id = comOrderAddress.order`) |
| 26 | +- `Transactions`: many [`comTransaction`](comTransaction) objects (`comCartOrder.id = comTransaction.order`) |
| 27 | +- `Logs`: many [`comOrderLog`](comOrderLog) objects (`comCartOrder.id = comOrderLog.order`) |
| 28 | + |
| 29 | +## Fields |
| 30 | + |
| 31 | + |
| 32 | +| Field | Type | Description | |
| 33 | +| ----- | ---- | ----------- | |
| 34 | +| **id** | integer (`INTEGER`) | Primary key | |
| 35 | +| **class_key** | string (`varchar[100]`) | Type of object | |
| 36 | +| **properties** | array (`text`)<br>may be null | Serialized arbitrary data stored with an object. Use utility methods instead of directly accessing these values: `getProperty($key, $default)`, `getProperties()`, `setProperty($key, $value)`, `setProperties($properties, $merge)`, `unsetProperty($key)`, `unsetProperties($keys)` | |
| 37 | +| **secret** | string (`varchar[191]`) | | |
| 38 | +| **test** | boolean (`tinyint[1]`) | | |
| 39 | +| **status** | integer (`int[10]`) | | |
| 40 | +| **currency** | string (`varchar[3]`) | | |
| 41 | +| **context<br>Default: `web`** | string (`varchar[190]`)<br>may be null | | |
| 42 | +| **reference** | string (`varchar[190]`)<br>may be null | | |
| 43 | +| **reference_incr** | integer (`int[10]`)<br>may be null | | |
| 44 | +| **subtotal** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 45 | +| **subtotal_formatted** | | `subtotal` passed through the [financial formatter](../Formatters/financial) | |
| 46 | +| **discount** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 47 | +| **discount_formatted** | | `discount` passed through the [financial formatter](../Formatters/financial) | |
| 48 | +| **shipping** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 49 | +| **shipping_formatted** | | `shipping` passed through the [financial formatter](../Formatters/financial) | |
| 50 | +| **transaction** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 51 | +| **transaction_formatted** | | `transaction` passed through the [financial formatter](../Formatters/financial) | |
| 52 | +| **total_before_tax** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 53 | +| **total_before_tax_formatted** | | `total_before_tax` passed through the [financial formatter](../Formatters/financial) | |
| 54 | +| **total_ex_tax** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 55 | +| **total_ex_tax_formatted** | | `total_ex_tax` passed through the [financial formatter](../Formatters/financial) | |
| 56 | +| **tax** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 57 | +| **tax_formatted** | | `tax` passed through the [financial formatter](../Formatters/financial) | |
| 58 | +| **total** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 59 | +| **total_formatted** | | `total` passed through the [financial formatter](../Formatters/financial) | |
| 60 | +| **total_due** | integer (`int[20]`) | Integer number in the currency base unit (e.g. cents) | |
| 61 | +| **total_due_formatted** | | `total_due` passed through the [financial formatter](../Formatters/financial) | |
| 62 | +| **total_quantity** | integer (`int[20]`) | | |
| 63 | +| **created_on** | int (`int[20]`) | UNIX timestamp | |
| 64 | +| **created_on_formatted** | | `created_on` passed through the [datetime formatter](../Formatters/datetime) | |
| 65 | +| **received_on** | int (`int[20]`) | UNIX timestamp | |
| 66 | +| **received_on_formatted** | | `received_on` passed through the [datetime formatter](../Formatters/datetime) | |
| 67 | +| **last_updated_on** | int (`int[20]`) | UNIX timestamp | |
| 68 | +| **last_updated_on_formatted** | | `last_updated_on` passed through the [datetime formatter](../Formatters/datetime) | |
| 69 | +| **status_updated_on** | int (`int[20]`) | UNIX timestamp | |
| 70 | +| **status_updated_on_formatted** | | `status_updated_on` passed through the [datetime formatter](../Formatters/datetime) | |
| 71 | +| **created_by** | int (`int[10]`) | | |
| 72 | +| **last_updated_by** | int (`int[10]`) | | |
| 73 | +| **status_updated_by** | int (`int[10]`) | | |
| 74 | +| **shipping_method** | integer (`int[10]`) | | |
| 75 | +| **parent** | int (`int[10]`)<br>may be null | | |
| 76 | +| **user** | int (`int[10]`)<br>may be null | | |
0 commit comments