Skip to content

Commit df4693f

Browse files
committed
dateCompleted -> dateOrdered for 4.x+
1 parent 494f41a commit df4693f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/commerce/4.x/orders-carts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ updatedVersion: commerce/5.x/system/orders-carts.md
88

99
Variants are added to a _cart_ that can be completed to become an _order_. Carts and orders are both listed in the control panel under **Commerce****Orders**.
1010

11-
When we use the terms “cart” and “order”, we’re always referring to an [Order](commerce4:craft\commerce\elements\Order) element; a cart is simply an order that hasn’t been completed—meaning its `isCompleted` property is `false` and its `dateCompleted` is `null`.
11+
When we use the terms “cart” and “order”, we’re always referring to an [Order](commerce4:craft\commerce\elements\Order) element; a cart is simply an order that hasn’t been completed—meaning its `isCompleted` property is `false` and its `dateOrdered` is `null`.
1212

1313
Typically, a cart is completed in response to a customer [making a payment](./making-payments.md)—or by satisfying other requirements you’ve defined through [configuration](./config-settings.md) or an [extension](./extend/README.md).
1414

@@ -515,7 +515,7 @@ This number is usually best used as the customer-facing identifier of the order,
515515
The “Order Reference Number Format” is a mini Twig template that’s rendered when the order is completed. It can use order attributes along with Twig filters and functions. For example:
516516

517517
```twig
518-
{{ object.dateCompleted|date('Y') }}-{{ id }}
518+
{{ object.dateOrdered|date('Y') }}-{{ id }}
519519
```
520520

521521
Output:
@@ -534,7 +534,7 @@ The `seq()` function takes the following parameters:
534534
For example:
535535

536536
```twig
537-
{{ object.dateCompleted|date('Y') }}-{{ seq(object.dateCompleted|date('Y'), 8) }}
537+
{{ object.dateOrdered|date('Y') }}-{{ seq(object.dateOrdered|date('Y'), 8) }}
538538
```
539539

540540
Ouput:

docs/commerce/5.x/system/orders-carts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ The _order reference_ is generated upon completing a cart using the store’s **
135135
The “Order Reference Number Format” is an [object template](/5.x/system/object-templates.md) that’s rendered when the order is completed. It can use order attributes along with Twig filters and functions. For example:
136136

137137
```twig
138-
{{ dateCompleted|date('Y') }}-{{ id }}
138+
{{ dateOrdered|date('Y') }}-{{ id }}
139139
```
140140

141141
Output:
@@ -154,7 +154,7 @@ The `seq()` function takes the following parameters:
154154
For example:
155155

156156
```twig
157-
{{ dateCompleted|date('Y') }}-{{ seq(dateCompleted|date('Y'), 8) }}
157+
{{ dateOrdered|date('Y') }}-{{ seq(dateOrdered|date('Y'), 8) }}
158158
```
159159

160160
Output:
@@ -168,7 +168,7 @@ In this example we’ve used the current year as the sequence name so we automat
168168
Sequences are global, so constructing keys that will not collide with others you may use in other fields or templates is essential to avoid gaps.
169169

170170
::: tip
171-
Order references cannot be relied upon for sorting. Use `.orderBy('dateCompleted DESC')` if you wish to display orders in reverse-chronological order.
171+
Order references cannot be relied upon for sorting. Use `.orderBy('dateOrdered DESC')` if you wish to display orders in reverse-chronological order.
172172
:::
173173

174174
### Creating Orders

0 commit comments

Comments
 (0)