-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
539 additions
and
58 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
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,11 +1,11 @@ | ||
# v3.200.36 | ||
# v3.800.0 | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.200.36 | ||
uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.800.0 | ||
secrets: | ||
envPAT: ${{ secrets.REPO_TOKEN }} |
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,4 @@ | ||
{ | ||
"$schema": "./build.schema.json", | ||
"Solution": "VirtoCommerce.OrdersModule.sln" | ||
} |
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,61 @@ | ||
# Order Extension Sample Module | ||
|
||
This sample demonstrates the Virto Commerce Extensibility Framework in action by extending the native Order Module. It includes various scenarios to showcase extensibility features for REST API contracts, database contracts, and Admin Back Office extension points. | ||
|
||
**Note:** This sample is intended for demo purposes, training sessions, etc. We recommend following a 3-tier architecture (Core, Data, Web, or XApi) for custom modules, as well as for Virto Commerce. | ||
|
||
**Note:** The sample doesn't support the `vc-build` command. | ||
|
||
## Extension Scenarios | ||
|
||
1. **Extend CustomerOrder with Invoices and NewField:** Demonstrates how to extend REST API contracts. | ||
2. **Extend CustomerOrder2Entity and Order2DbContext:** Demonstrates how to extend database contracts. | ||
3. **Extend LineItem2Entity with OuterId custom property.** | ||
4. **Override implementation with AbstractTypeFactory and DI:** Demonstrates initialization with dependency injection. | ||
5. **Line Item Validator:** Demonstrates how to create a custom line item validator. | ||
6. **Create CustomOrderAuthorizationHandler.** | ||
7. **Admin Back Office Extension Points:** | ||
* Register Invoice Order Document with the ability to create, view, edit, and delete. | ||
* Extend CustomerOrder blade with NewField via Virto Commerce MetaFields. | ||
* Extend Custom Order Grid View with NewField column. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
1. Download and run the latest Virto Commerce Edge Release with ECommerce Bundle. | ||
|
||
### Installation | ||
|
||
1. Download and open the `VirtoCommerce.OrdersModule` solution in Visual Studio 2022. | ||
2. Compile `VirtoCommerce.OrdersModule2.Web`. | ||
3. Build Admin UI code by running the following commands in the `VirtoCommerce.OrdersModule2.Web` folder: | ||
|
||
```cmd | ||
npm ci | ||
``` | ||
|
||
```cmd | ||
npm run webpack:dev | ||
``` | ||
|
||
4. Rename `_module.manifest` to `module.manifest`. | ||
5. Install the module by creating a symbolic link in the Virto Commerce Modules folder using the following command (change the path): | ||
|
||
```cmd | ||
mklink /D "c:\vc-platform-3-demo\platform\modules\Order.Ext" "c:\Projects\git\VirtoCommerce\vc-module-order\samples\VirtoCommerce.OrdersModule2.Web" | ||
``` | ||
|
||
6. Run Virto Commerce Platform and enjoy the Virto Commerce Extensibility Framework. | ||
|
||
## Screenshots | ||
|
||
![image](https://github.com/VirtoCommerce/vc-module-order/assets/7639413/e9c320e7-611b-47ad-9df5-e08e4862c7e1) | ||
![image](https://github.com/VirtoCommerce/vc-module-order/assets/7639413/ec24497d-62e4-4622-ace3-60f0e220a0d2) | ||
![image](https://github.com/VirtoCommerce/vc-module-order/assets/7639413/03338cd7-02ab-4473-bde2-5712a09c4b16) | ||
![image](https://github.com/VirtoCommerce/vc-module-order/assets/7639413/70dbd44c-19d1-4db2-9842-802a0b4471a7) | ||
![image](https://github.com/VirtoCommerce/vc-module-order/assets/7639413/fe10182c-b304-4dac-a492-57fa44ba3167) | ||
|
||
|
||
|
||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 2 additions & 5 deletions
7
src/VirtoCommerce.OrdersModule.Core/Model/Search/CustomerOrderIndexedSearchCriteria.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,10 +1,7 @@ | ||
using System; | ||
using VirtoCommerce.Platform.Core.Common; | ||
|
||
namespace VirtoCommerce.OrdersModule.Core.Model.Search | ||
{ | ||
[Obsolete("Use CustomerOrderSearchCriteria", DiagnosticId = "VC0008", UrlFormat = "https://docs.virtocommerce.org/products/products-virto3-versions/")] | ||
public class CustomerOrderIndexedSearchCriteria : SearchCriteriaBase | ||
public class CustomerOrderIndexedSearchCriteria : CustomerOrderSearchCriteria | ||
{ | ||
public string Facet { get; set; } | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/VirtoCommerce.OrdersModule.Core/Model/Search/CustomerOrderIndexedSearchResult.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace VirtoCommerce.OrdersModule.Core.Model.Search | ||
{ | ||
public class CustomerOrderIndexedSearchResult : CustomerOrderSearchResult | ||
{ | ||
public virtual IList<OrderAggregation> Aggregations { get; set; } | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/VirtoCommerce.OrdersModule.Core/Model/Search/OrderAggregation.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace VirtoCommerce.OrdersModule.Core.Model.Search | ||
{ | ||
public class OrderAggregation | ||
{ | ||
/// <summary> | ||
/// Gets or sets the value of the aggregation type | ||
/// </summary> | ||
/// <value> | ||
/// "Attribute", "Range" | ||
/// </value> | ||
public string AggregationType { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the value of the aggregation field | ||
/// </summary> | ||
public string Field { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the collection of the aggregation labels | ||
/// </summary> | ||
public IList<OrderAggregationLabel> Labels { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the collection of the aggregation items | ||
/// </summary> | ||
public IList<OrderAggregationItem> Items { get; set; } | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/VirtoCommerce.OrdersModule.Core/Model/Search/OrderAggregationItem.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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace VirtoCommerce.OrdersModule.Core.Model.Search | ||
{ | ||
public class OrderAggregationItem | ||
{ | ||
/// <summary> | ||
/// Gets or sets the aggregation item value | ||
/// </summary> | ||
public object Value { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the aggregation item count | ||
/// </summary> | ||
public int Count { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the flag for aggregation item is applied | ||
/// </summary> | ||
public bool IsApplied { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the collection of the aggregation item labels | ||
/// </summary> | ||
public IList<OrderAggregationLabel> Labels { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the request lower bound for range aggregation value | ||
/// </summary> | ||
public string RequestedLowerBound { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the request lower bound for range aggregation value | ||
/// </summary> | ||
public string RequestedUpperBound { get; set; } | ||
|
||
/// <summary> | ||
/// Is lower bound for range included | ||
/// </summary> | ||
public bool IncludeLower { get; set; } | ||
|
||
/// <summary> | ||
/// Is upper bound for range included | ||
/// </summary> | ||
public bool IncludeUpper { get; set; } | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/VirtoCommerce.OrdersModule.Core/Model/Search/OrderAggregationLabel.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace VirtoCommerce.OrdersModule.Core.Model.Search | ||
{ | ||
public class OrderAggregationLabel | ||
{ | ||
public string Language { get; set; } | ||
public string Label { get; set; } | ||
} | ||
} |
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.