Skip to content

Commit 55ddcb5

Browse files
authored
Merge pull request #6859 from mattbrailsford/uc-v15.1.0
Umbraco Commerce v15.1.0-rc release notes
2 parents e36751f + 1a1a4a2 commit 55ddcb5

File tree

7 files changed

+195
-0
lines changed

7 files changed

+195
-0
lines changed

15/umbraco-commerce/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* [Umbraco Commerce Documentation](README.md)
44
* [Release Notes](release-notes/README.md)
5+
* [v15.1.0-Rc](release-notes/v15.1.0-rc.md)
56
* [v15.0.0-Rc](release-notes/v15.0.0-rc.md)
67

78
## Commerce Products
@@ -36,6 +37,7 @@
3637
* [Update Cart](how-to-guides/update-cart.md)
3738
* [Delete item from Cart](how-to-guides/delete-item.md)
3839
* [Customizing Templates](how-to-guides/customizing-templates.md)
40+
* [Configuring Store Cleanup](how-to-guides/configuring-cart-cleanup.md)
3941

4042
## Key Concepts
4143

@@ -71,6 +73,7 @@
7173
* [UI Extensions](key-concepts/ui-extensions/README.md)
7274
* [Analytics Widgets](key-concepts/ui-extensions/analytics-widgets.md)
7375
* [Entity Quick Actions](key-concepts/ui-extensions/entity-quick-actions.md)
76+
* [Order Line Actions](key-concepts/ui-extensions/order-line-actions.md)
7477
* [Order Properties](key-concepts/ui-extensions/order-properties.md)
7578
* [Order Collection Properties](key-concepts/ui-extensions/order-collection-properties.md)
7679
* [Order Line Properties](key-concepts/ui-extensions/order-line-properties.md)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
description: Learn how to configure a cart cleanup routine.
3+
---
4+
5+
# Configuring Cart Cleanup
6+
7+
{% hint style="info" %}
8+
Available from Umbraco Commerce 15.1.0
9+
{% endhint %}
10+
11+
By default Umbraco Commerce will keep all created carts indefinately. Over time this can become an issue. To assist with this is it possible to configure a cart cleanup routine to delete carts older than a pre-configured time interval.
12+
13+
14+
This service can be enabled and configured in the `appSettings.json`
15+
16+
```json
17+
{
18+
"Umbraco" : {
19+
"Commerce": {
20+
"CartCleanupPolicy": {
21+
"EnableCleanup": true,
22+
"KeepCartsForDays": 800,
23+
// Optional settings
24+
"FirstRunTime": "* 4 * * *",
25+
"Period": "1.00:00:00",
26+
"PerStorePolicies": {
27+
"{STORE_ALIAS}": {
28+
"KeepCartsForDays": 800,
29+
}
30+
}
31+
}
32+
}
33+
}
34+
}
35+
```
36+
37+
The configuration supports the followin keys.
38+
39+
| Key | Description |
40+
| -- | -- |
41+
| `EnableCleanup` | Enables or disabled the cart cleanup service. `false` by default. |
42+
| `KeepCartsForDays` | The number of days to keep carts after the carts last modification date. |
43+
| `FirstRunTime` | The time to first run the scheduled cleanup task, in crontab format. If empty, runs imediately on app startup. |
44+
| `Period` | How often to run the task, in timespan format. Defaults to every 24 hours. |
45+
| `PerStorePolicies` | Define store specific policies. |
46+
| `PerStorePolicies.{STORE_ALAIS}.KeepCartsForDays` | The number of days to keep carts after the carts last modification date for the given store. |
47+
48+
## Cart Conversion Rates Widget
49+
50+
When enabling the cart cleanup service, it's important to know that this can affect the cart conversion rates widget in the analytics section. If the widget is configured to show a time period that exceeds the cleanup policies time frame then a warning will be displayed.
51+
52+
![Cart Conversion Rate date range exceeds the cart cleanup policy configuration warning](../media/v14/cart-conversion-rates-warning.png)
53+
54+
55+
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
description: Order Line Actions UI Extension for Umbraco Commerce
3+
---
4+
5+
# Order Line Actions
6+
7+
{% hint style="info" %}
8+
Available from Umbraco Commerce 15.1.0
9+
{% endhint %}
10+
11+
Order Line Actions allow you to display buttons against each order line of a cart/order enabling you to perform custom actions per order line.
12+
13+
14+
![Custom Order Line Action](../../media/v14/order-line-action.png)
15+
16+
## Registering an Order Line Action
17+
18+
```typescript
19+
import { UcManifestOrderLineAction } from "@umbraco-commerce/backoffice";
20+
21+
export const manifests : UcManifestOrderLineAction[] = [
22+
{
23+
type: 'ucOrderLineAction',
24+
kind: 'default',
25+
alias: 'My.OrderLineAction.MyOrderLineAction',
26+
name: 'My Order Line Action',
27+
weight: 300,
28+
forEntityTypes: [ 'uc:cart', 'uc:order' ],
29+
api: () => import('./my-order-line-action.api.js'),
30+
meta: {
31+
label: "#orderLineActions_myOrderLineAction",
32+
icon: 'icon-star'
33+
}
34+
}
35+
];
36+
37+
extensionRegistry.register(manifests);
38+
```
39+
40+
Each entry must have a type of `ucOrderLineAction` along with a unique `alias` and `name`. Unless you wish to override the button, the `kind` key should be set to `default`. An `api` key that imports the implementation of the `UcOrderLineActionApi` interface, should be defined.
41+
42+
43+
A `meta` entry provides configuration options for order line actions:
44+
45+
| Name | Description |
46+
| -- | -- |
47+
| `label` | A label for this action (supports the `#` prefix localization string syntax) |
48+
| `icon` | In icon to display for the action |
49+
50+
## The Order Line Action API
51+
52+
In order to define the logic to perform when an order line action button is clicked, you'll need to implement the `UcOrderLineActionApi` interface. This interface is defined as
53+
54+
```typescript
55+
export interface UcOrderLineActionApi extends UmbApi {
56+
manifest: UcManifestOrderLineAction;
57+
storeId: string;
58+
orderId: string;
59+
orderLineId: string;
60+
execute(): Promise<void>;
61+
}
62+
```
63+
64+
This provides order line action implementations with access to the defined `manifest` and contextual information via the `storeId`, `orderId` and `orderLineId` properties. It expects the implementation of an `execute` method to act.
65+
66+
67+
An example implementation would be
68+
69+
```typescript
70+
// my-order-line-action.api.js
71+
72+
import { UcOrderLineActionApi, UcManifestOrderLineAction } from "@umbraco-commerce/backoffice";
73+
import { UmbControllerBase } from "@umbraco-cms/backoffice/class-api";
74+
75+
export default class MyOrderLineActionApi extends UmbControllerBase implements UcOrderLineActionApi {
76+
manifest!: UcManifestOrderLineAction;
77+
storeId!: string;
78+
orderId!: string;
79+
orderLineId!: string;
80+
async execute() {
81+
console.log(`You clicked ${this.manifest!.meta.label} for order line ${this.orderLineId}`);
82+
return Promise.resolve();
83+
}
84+
}
85+
```
43.6 KB
Loading
19.5 KB
Loading

15/umbraco-commerce/release-notes/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ If you are upgrading to a new major version, check the breaking changes in the [
1717

1818
This section contains the release notes for Umbraco Commerce 14 including all changes for this version.
1919

20+
#### 15.1.0-rc1 (7th Feb 2025)
21+
22+
Read the [v15.1.0-rc release post](./v15.1.0-rc.md) for further background on this release.
23+
24+
* Added cart cleanup service
25+
* Added order line actions UI extension point
26+
2027
#### 15.0.1 (5th Feb 2025)
2128

2229
* Fixed `TranslatedValue` erroring if the language key was `null`, instead of falling back to the default value.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
description: Umbraco Commerce v15.1.0-RC release notes.
3+
---
4+
5+
# v15.1.0-RC
6+
7+
## Key Takeaways
8+
9+
* [Cart Cleanup Service](v15.1.0-rc.md#cart-cleanup-service).
10+
* [Order Line Actions](v15.1.0-rc.md#order-line-actions)
11+
12+
## Cart Cleanup Service
13+
14+
The cart cleanup service is a new background service that periodically cleans up old abandoned carts. This service is off by default, but can be enabled via app settings.
15+
16+
```json
17+
{
18+
"Umbraco" : {
19+
"Commerce": {
20+
"CartCleanupPolicy": {
21+
"EnableCleanup": true,
22+
"KeepCartsForDays": 800
23+
}
24+
}
25+
}
26+
}
27+
```
28+
29+
See the [Configuring Cart Cleanup guide](../how-to-guides/configuring-cart-cleanup.md) for more details.
30+
31+
## Order Line Actions
32+
33+
Order line actions are a new UI extension point that lets you register custom buttons to display against each order line of a cart/order.
34+
35+
36+
![Custom Order Line Action](../media/v14/order-line-action.png)
37+
38+
See the [Order Line Actions article](../key-concepts/ui-extensions/order-line-actions.md) for more details.
39+
40+
41+
## What to Test and How to Give Feedback
42+
43+
We welcome any feedback on installation or upgrade issues, as well as any bugs found in the sections mentioned above.
44+
45+
Issues can be raised on the Umbraco Commerce issue tracker at [https://github.com/umbraco/Umbraco.Commerce.Issues/issues](https://github.com/umbraco/Umbraco.Commerce.Issues/issues).

0 commit comments

Comments
 (0)