Orchard Core Commerce 3.0.0¶
Release date: January 31, 2025.
Important Upgrade Instructions¶
Prior to making the leap to Orchard Core Commerce 3.0.0, please read and follow the instructions for the Orchard Core 2.0.0 release, as it contains several major breaking changes.
Breaking Changes¶
Dropped Newtonsoft.Json
Support¶
The most important breaking change in OC 2.0 is the end of support for Newtonsoft Json.NET and the switch to the System.Text.Json (STJ) library. For OCC, all Newtonsoft converters are removed, STJ converters were written or updated as necessary. Any models and interfaces that use JToken
or JObject
(such as OrderPart.AdditionalData
and IUserService.AlterUserSettingAsync()
) now use JsonNode
and JsonObject
respectively.
Replaced IPayment
with Payment
Everywhere¶
We've dropped the IPayment
interface, now services and models use Payment
directly, which was also moved into the OrchardCore.Commerce.Abstractions
library. Migrating to STJ meant that to retain the polymorphic deserialization support for models using IPayment
would've taken on some additional complexity, while we already found the separate interface unnecessary.
Update using references to OrchardCore.Commerce.Abstractions.Models
. If you have a custom payment processor integration, update it to use Payment
.
Liquid Filters¶
The order_line_item_view_models_and_tax_rates
Liquid filter has been removed. A new order_part_to_order_summary
filter has been added instead, which can be treated as a drop-in replacement. It has additional Amount
type properties: UnitTax
, SubTotal
, TaxTotal
, and Total
. These contain the calculated and appropriately rounded values.
The new amount_to_string
filter processes the input object as Amount
(like the amount
filter) and correctly formats it just like the Amount.ToString()
override in C#. You can use amount_to_string: dot: ","
to make it display a comma as the decimal separator when it would use a dot. Unlike amount
, you can also use this filter on a number with the currency: "three-letter-code""
argument (e.g. {{ value | amount_to_string: currency: "EUR" }}
). This will display any numeric value as the given currency.
Stripe Controllers and Endpoints¶
- The
PaymentConfirmationMiddleware
action with thecheckout/middleware/Stripe
path inStripeController
was changed toPaymentConfirmation
and its path tostripe/middleware
. - The
ConfirmPaymentParameters
action with thecheckout/params/Stripe
path inStripeController
was change tostripe/params
path.
New Features¶
Subscriptions¶
We have added a new feature "Orchard Core Commerce - Subscription" with some basic support for subscription type products. Currently, it's only for Stripe which natively supports this payment model. Any feedback, suggestions and contributions to this feature are welcome.
Minimal API Endpoints¶
We have added minimal APIs for some shopping cart and payment activities. The following were added:
~/api/shoppingcart/{shoppingCartId?}
(GET/POST/PUT/DELETE) : Get the contents of the shopping cart, update it, add/remove items to it. For more details, see the implementation.~/api/checkout/free/{shoppingCartId?}
(POST) : Order the contents of a shopping cart that only contains free items, skipping the payment process.~/api/checkout/payment-request/{orderId}
(GET) : Returns information about a provided Order - whether it needs to be paid or not.~/api/stripe/*
: These endpoints allow you to fully interact with our Stripe implementation in a headless manner.
Change Logs¶
Please check the GitHub release entry here.