Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Plugin Shipping.ShippingPoint - change type of project to Microsoft.NET.Sdk.Razor
KrzysztofPajakb85278cb78fd
diff --git a/src/Plugins/Shipping.ShippingPoint/Controllers/ShippingPointController.cs b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Controllers/ShippingPointController.cssimilarity index 93%rename from src/Plugins/Shipping.ShippingPoint/Controllers/ShippingPointController.csrename to src/Plugins/Shipping.ShippingPoint/Areas/Admin/Controllers/ShippingPointController.csindex 9415dc822..614b99dd7 100644--- a/src/Plugins/Shipping.ShippingPoint/Controllers/ShippingPointController.cs+++ b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Controllers/ShippingPointController.cs@@ -51,7 +51,7 @@ namespace Shipping.ShippingPoint.Controllerspublic IActionResult Configure(){- return View("~/Plugins/Shipping.ShippingPoint/Views/Configure.cshtml");+ return View();}[HttpPost]@@ -97,7 +97,7 @@ namespace Shipping.ShippingPoint.Controllers{var model = new ShippingPointModel();await PrepareShippingPointModel(model);- return View("~/Plugins/Shipping.ShippingPoint/Views/Create.cshtml", model);+ return View(model);}[HttpPost]@@ -113,7 +113,7 @@ namespace Shipping.ShippingPoint.Controllersawait PrepareShippingPointModel(model);- return View("~/Plugins/Shipping.ShippingPoint/Views/Create.cshtml", model);+ return View(model);}public async Task<IActionResult> Edit(string id)@@ -121,7 +121,7 @@ namespace Shipping.ShippingPoint.Controllersvar shippingPoints = await _shippingPointService.GetStoreShippingPointById(id);var model = shippingPoints.ToModel();await PrepareShippingPointModel(model);- return View("~/Plugins/Shipping.ShippingPoint/Views/Edit.cshtml", model);+ return View(model);}[HttpPost]@@ -137,7 +137,7 @@ namespace Shipping.ShippingPoint.Controllersawait PrepareShippingPointModel(model);- return View("~/Plugins/Shipping.ShippingPoint/Views/Edit.cshtml", model);+ return View(model);}[HttpPost]diff --git a/src/Plugins/Shipping.ShippingPoint/Views/Configure.cshtml b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Configure.cshtmlsimilarity index 100%rename from src/Plugins/Shipping.ShippingPoint/Views/Configure.cshtmlrename to src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Configure.cshtmldiff --git a/src/Plugins/Shipping.ShippingPoint/Views/Create.cshtml b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Create.cshtmlsimilarity index 90%rename from src/Plugins/Shipping.ShippingPoint/Views/Create.cshtmlrename to src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Create.cshtmlindex 104fb7163..c06f454a1 100644--- a/src/Plugins/Shipping.ShippingPoint/Views/Create.cshtml+++ b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Create.cshtml@@ -26,7 +26,7 @@</div><div class="content"><div class="form-horizontal">- <partial name="~/Plugins/Shipping.ShippingPoint/Views/_CreateOrUpdate.cshtml" model="Model" />+ <partial name="_CreateOrUpdate" model="Model" /></div></div></form>\ No newline at end of filediff --git a/src/Plugins/Shipping.ShippingPoint/Views/Edit.cshtml b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Edit.cshtmlsimilarity index 90%rename from src/Plugins/Shipping.ShippingPoint/Views/Edit.cshtmlrename to src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Edit.cshtmlindex 3d15ae7b4..f8ed522c6 100644--- a/src/Plugins/Shipping.ShippingPoint/Views/Edit.cshtml+++ b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/Edit.cshtml@@ -26,7 +26,7 @@</div><div class="content"><div class="form-horizontal">- <partial name="~/Plugins/Shipping.ShippingPoint/Views/_CreateOrUpdate.cshtml" model="Model" />+ <partial name="_CreateOrUpdate" model="Model" /></div></div></form>\ No newline at end of filediff --git a/src/Plugins/Shipping.ShippingPoint/Views/_CreateOrUpdate.cshtml b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/_CreateOrUpdate.cshtmlsimilarity index 100%rename from src/Plugins/Shipping.ShippingPoint/Views/_CreateOrUpdate.cshtmlrename to src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/ShippingPoint/_CreateOrUpdate.cshtmldiff --git a/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/_ViewImports.cshtml b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/_ViewImports.cshtmlnew file mode 100644index 000000000..20cb126bd--- /dev/null+++ b/src/Plugins/Shipping.ShippingPoint/Areas/Admin/Views/_ViewImports.cshtml@@ -0,0 +1,8 @@+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers+@addTagHelper *, Grand.Web.Common+@addTagHelper *, Grand.Web++@using Microsoft.AspNetCore.Mvc.ViewFeatures+@using Grand.Infrastructure.Extensions+@using Grand.Web.Common+@inject Grand.Web.Common.Localization.LocService Locdiff --git a/src/Plugins/Shipping.ShippingPoint/Components/SelectedShippingPointViewComponent.cs b/src/Plugins/Shipping.ShippingPoint/Components/SelectedShippingPointViewComponent.csindex e8e6b3c18..07872d664 100644--- a/src/Plugins/Shipping.ShippingPoint/Components/SelectedShippingPointViewComponent.cs+++ b/src/Plugins/Shipping.ShippingPoint/Components/SelectedShippingPointViewComponent.cs@@ -39,7 +39,7 @@ namespace Shipping.ShippingPoint.ComponentsshippingPointsModel.Add(new SelectListItem() { Value = shippingPoint.Id, Text = shippingPoint.ShippingPointName });}- return View("~/Plugins/Shipping.ShippingPoint/Views/FormComboBox.cshtml", shippingPointsModel);+ return View(shippingPointsModel);}return Content("ShippingPointController: given Shipping Option doesn't exist");diff --git a/src/Plugins/Shipping.ShippingPoint/Controllers/SelectedShippingPointController.cs b/src/Plugins/Shipping.ShippingPoint/Controllers/SelectedShippingPointController.csindex 7f3c71108..3b8a9b1a7 100644--- a/src/Plugins/Shipping.ShippingPoint/Controllers/SelectedShippingPointController.cs+++ b/src/Plugins/Shipping.ShippingPoint/Controllers/SelectedShippingPointController.cs@@ -24,8 +24,7 @@ namespace Shipping.ShippingPoint.Controllersvar shippingPoint = await _shippingPointService.GetStoreShippingPointById(shippingOptionId);if (shippingPoint != null){- var viewModel = new PointModel()- {+ var viewModel = new PointModel() {ShippingPointName = shippingPoint.ShippingPointName,Description = shippingPoint.Description,PickupFee = _priceFormatter.FormatShippingPrice(shippingPoint.PickupFee),@@ -35,7 +34,7 @@ namespace Shipping.ShippingPoint.ControllersCountryName = (await _countryService.GetCountryById(shippingPoint.CountryId))?.Name,ZipPostalCode = shippingPoint.ZipPostalCode,};- return View("~/Plugins/Shipping.ShippingPoint/Views/FormShippingOption.cshtml", viewModel);+ return View(viewModel);}return Content("ShippingPointController: given Shipping Option doesn't exist");}diff --git a/src/Plugins/Shipping.ShippingPoint/Shipping.ShippingPoint.csproj b/src/Plugins/Shipping.ShippingPoint/Shipping.ShippingPoint.csprojindex bff8ec4d5..1be8c1a55 100644--- a/src/Plugins/Shipping.ShippingPoint/Shipping.ShippingPoint.csproj+++ b/src/Plugins/Shipping.ShippingPoint/Shipping.ShippingPoint.csproj@@ -1,4 +1,4 @@-<Project Sdk="Microsoft.NET.Sdk">+<Project Sdk="Microsoft.NET.Sdk.Razor"><PropertyGroup><TargetFramework>net5.0</TargetFramework>@@ -7,6 +7,7 @@<Authors>UNIT-SOFT Sp. z o.o.</Authors><PackageProjectUrl>https://grandnode.com/</PackageProjectUrl><TieredCompilation>true</TieredCompilation>+ <AddRazorSupportForMvc>true</AddRazorSupportForMvc></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">@@ -69,31 +70,9 @@</ProjectReference></ItemGroup>- <ItemGroup>+ <ItemGroup><None Update="logo.jpg"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></None>- <None Update="Views\Configure.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\Create.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\Edit.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\FormComboBox.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\FormShippingOption.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\_CreateOrUpdate.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\_ViewImports.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None></ItemGroup>-</Project>\ No newline at end of filediff --git a/src/Plugins/Shipping.ShippingPoint/Views/FormShippingOption.cshtml b/src/Plugins/Shipping.ShippingPoint/Views/SelectedShippingPoint/Get.cshtmlsimilarity index 95%rename from src/Plugins/Shipping.ShippingPoint/Views/FormShippingOption.cshtmlrename to src/Plugins/Shipping.ShippingPoint/Views/SelectedShippingPoint/Get.cshtmlindex e97f8779b..fae1ee58b 100644--- a/src/Plugins/Shipping.ShippingPoint/Views/FormShippingOption.cshtml+++ b/src/Plugins/Shipping.ShippingPoint/Views/SelectedShippingPoint/Get.cshtml@@ -1,5 +1,7 @@@model Shipping.ShippingPoint.Models.PointModel-+@{+ Layout = "";+}<div class="form-horizontal"><div class="form-body"><div class="row">diff --git a/src/Plugins/Shipping.ShippingPoint/Views/FormComboBox.cshtml b/src/Plugins/Shipping.ShippingPoint/Views/Shared/Components/ShippingPoint/Default.cshtmlsimilarity index 100%rename from src/Plugins/Shipping.ShippingPoint/Views/FormComboBox.cshtmlrename to src/Plugins/Shipping.ShippingPoint/Views/Shared/Components/ShippingPoint/Default.cshtml