-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCC-194: Upgrade to Orchard Core 2.0 once it's released and remove Ne…
…wtonsoft.Json from the code base (#502) * OCC-245: Upgrade to latest OC preview to test System.Text.Json (#454) Co-authored-by: Mike Alhayek <[email protected]> Co-authored-by: Zoltán Lehóczky <[email protected]> * Upgrade OC packages and drivers (#480) * Upgrade OC packages and drivers * Update src/Modules/OrchardCore.Commerce/Drivers/PriceDisplaySettingsDisplayDriver.cs Co-authored-by: Sára El-Saig <[email protected]> * Update src/Modules/OrchardCore.Commerce.ContentFields/Settings/AddressFieldSettingsDriver.cs Co-authored-by: Sára El-Saig <[email protected]> * Update src/Modules/OrchardCore.Commerce.ContentFields/Settings/PriceFieldSettingsDriver.cs Co-authored-by: Sára El-Saig <[email protected]> * Update src/Modules/OrchardCore.Commerce.Payment.Stripe/Drivers/StripeApiSettingsDisplayDriver.cs Co-authored-by: Sára El-Saig <[email protected]> * Fix all drivers --------- Co-authored-by: Sára El-Saig <[email protected]> * OCC-280: Use new HL extension methods (#482) * Post merge fixup. * NEST-536: Update OC version (#474) * Update OC version. * Update OC preview version again (sigh). * Delete temporary extension. * Use the new AddDeployment extension that registers the underlying polymorphic JSON type too. * Suppress. * Update OC previews. * Update OC preview version. * Update OC preview version. * Rename to localizer. * Update OC preview version. * Update OC preview version. * Add new line --------- Co-authored-by: Hisham Bin Ateya <[email protected]> * Re-enabling non preview packages and upgrading to OC 2.0.0 * Using System.Text.Json. * Setting the .Web project to OC 2.0.2. * Update src/OrchardCore.Commerce.Web/OrchardCore.Commerce.Web.csproj --------- Co-authored-by: Sára El-Saig <[email protected]> Co-authored-by: Mike Alhayek <[email protected]> Co-authored-by: Zoltán Lehóczky <[email protected]> Co-authored-by: Hisham Bin Ateya <[email protected]>
- Loading branch information
1 parent
002223b
commit d3cb2bf
Showing
157 changed files
with
4,923 additions
and
4,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!-- Ignore global configuration --> | ||
<clear /> | ||
<add key="LombiqPreview" value="https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json" /> | ||
<add key="OrchardCorePreview" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" /> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
<packageSourceMapping> | ||
<packageSource key="nuget.org"> | ||
<package pattern="*" /> | ||
<!-- OrchardCore.Translations.All is on a separate repo and doesn't have a preview --> | ||
<package pattern="OrchardCore.Translations.*" /> | ||
</packageSource> | ||
<!-- Enable these to use preview versions of Orchard Core packages. | ||
<packageSource key="OrchardCorePreview"> | ||
<package pattern="OrchardCore*" /> | ||
OrchardCore theme packages | ||
<package pattern="SafeMode" /> | ||
<package pattern="TheAgencyTheme" /> | ||
<package pattern="TheBlogTheme" /> | ||
<package pattern="TheComingSoonTheme" /> | ||
<package pattern="TheTheme" /> | ||
<package pattern="TheAdmin" /> | ||
</packageSource>--> | ||
<!-- Enable these to use the Lombiq packages from Cloudsmith instead of NuGet. | ||
<packageSource key="LombiqPreview"> | ||
<package pattern="Lombiq.HelpfulLibraries*" /> | ||
<package pattern="Lombiq.Tests.UI*" /> | ||
</packageSource> | ||
--> | ||
</packageSourceMapping> | ||
</configuration> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Orchard Core Commerce 3.0.0 | ||
|
||
Release date: Not yet released | ||
|
||
## 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](https://docs.orchardcore.net/en/latest/releases/2.0.0/), 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](https://www.newtonsoft.com/json) and the switch to the [System.Text.Json](https://www.nuget.org/packages/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`](https://github.com/OrchardCMS/OrchardCore.Commerce/blob/34ae00470e954459f19f688c9bfc51d196c386ca/src/Libraries/OrchardCore.Commerce.Abstractions/Abstractions/IPayment.cs) 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. | ||
|
||
## Change Logs | ||
|
||
Please check the GitHub release entry [here](https://github.com/OrchardCMS/OrchardCore.Commerce/releases/tag/v3.0.0). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
src/Libraries/OrchardCore.Commerce.Abstractions/Abstractions/IPayment.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Libraries/OrchardCore.Commerce.Abstractions/Abstractions/IProductAttributeValue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...rdCore.Commerce.Payment/Models/Payment.cs → ...e.Commerce.Abstractions/Models/Payment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
using OrchardCore.Commerce.Abstractions.Abstractions; | ||
using OrchardCore.Commerce.MoneyDataType; | ||
using System; | ||
|
||
namespace OrchardCore.Commerce.Payment.Models; | ||
namespace OrchardCore.Commerce.Abstractions.Models; | ||
|
||
public record Payment( | ||
string Kind, | ||
string TransactionId, | ||
string ChargeText, | ||
Amount Amount, | ||
DateTime CreatedUtc) | ||
: IPayment; | ||
DateTime CreatedUtc); |
5 changes: 2 additions & 3 deletions
5
src/Libraries/OrchardCore.Commerce.Abstractions/Models/PrioritizedPrice.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.