|
| 1 | +--- |
| 2 | +description: >- |
| 3 | + Umbraco Commerce v15.0.0-rc release notes. |
| 4 | +--- |
| 5 | + |
| 6 | +# Umbraco Commerce v15.0.0-rc |
| 7 | + |
| 8 | +Umbraco Commerce v15.0.0-rc is the initial release of Umbraco Commerce for Umbraco CMS v15. Because of |
| 9 | + |
| 10 | +## Key Takeaways |
| 11 | + |
| 12 | +* Everything is now [async](#async). |
| 13 | +* [Storefront API](#storefront-api) aligned with Management API |
| 14 | +* A number of [Umbraco v15 updates](#umbraco-v15-updates). |
| 15 | + |
| 16 | +## Async |
| 17 | + |
| 18 | +The key focus of this release is the move to a fully asyncronus code base. In order to reduce the maintenance burden, the decision was made to go fully async without maintaining backwards compatibility. This will therfore require code updates to use the new async methods. |
| 19 | + |
| 20 | +### Previous behavior |
| 21 | +Previously all C# API's were synchronous and thus blocking by nature. |
| 22 | + |
| 23 | +```csharp |
| 24 | + // Fluent API example |
| 25 | + order.AddProduct(productRef, 1) |
| 26 | + .SetPaymentMethod(paymentMethodId) |
| 27 | + .SetShippingMethod(shippingMethodId); |
| 28 | + |
| 29 | + // Service method examples |
| 30 | + orderService.SaveOrder(order); |
| 31 | + emailTemplateService.SendEmail(emailTemplateId, order); |
| 32 | + |
| 33 | + // Notification events |
| 34 | + public class MyNotification : NotificationEventHandlerBase<OrderFinalizedNotification> |
| 35 | + { |
| 36 | + public override void Handle(OrderFinalizedNotification evt) |
| 37 | + { |
| 38 | + // Implement your custom logic here |
| 39 | + } |
| 40 | + } |
| 41 | +``` |
| 42 | + |
| 43 | +### New behavior |
| 44 | +All API's are now asynchronous and thus are suffixed with Async and return a Task<T> result |
| 45 | + |
| 46 | + // Fluent API example |
| 47 | + await order.AddProductAsync(productRef, 1) |
| 48 | + .SetPaymentMethodAsync(paymentMethodId) |
| 49 | + .SetShippingMethodAsync(shippingMethodId); |
| 50 | + |
| 51 | + // Service method examples |
| 52 | + await orderService.SaveOrderAsync(order); |
| 53 | + await emailTemplateService.SendEmailAsync(emailTemplateId, order); |
| 54 | + |
| 55 | + // Notification events |
| 56 | + public class MyNotification : NotificationEventHandlerBase<OrderFinalizedNotification> |
| 57 | + { |
| 58 | + public override Task HandleAsync(OrderFinalizedNotification evt, CancelationToken cancelationToken) |
| 59 | + { |
| 60 | + // Implement your custom logic here |
| 61 | + } |
| 62 | + } |
| 63 | + |
| 64 | +## Storefront API |
| 65 | + |
| 66 | +When implementing the Management API in v14 we learnt a lot about API structure, and also found some common models between the Management API and the Storefront API. To aid with maintenance, and align approaches, the Storefront API was updated to similar patterns. |
| 67 | + |
| 68 | +For the most part the API should stay the same, the key different being changes in operation IDs allowing the Storefront API to be used with client generators. |
| 69 | + |
| 70 | +## Umbraco v15 updates |
| 71 | + |
| 72 | +As well as the async works, Umbraco Commerce v15 has also been updated to depend on Umbraco v15 which consists of the following updates. |
| 73 | + |
| 74 | +* Runs against .NET 9 |
| 75 | +* Variants property editor supports content variants |
| 76 | + |
| 77 | +## What to Test and How to Give Feedback |
| 78 | + |
| 79 | +We would welcome feedback on any installation / upgrade issues along with bugs found in any of the completed sections as detailed above. |
| 80 | + |
| 81 | +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