diff --git a/src/Presentation/Nop.Web/Areas/Admin/Views/Order/AddProductToOrderDetails.cshtml b/src/Presentation/Nop.Web/Areas/Admin/Views/Order/AddProductToOrderDetails.cshtml index afa450cd393..d4c81b8303b 100644 --- a/src/Presentation/Nop.Web/Areas/Admin/Views/Order/AddProductToOrderDetails.cshtml +++ b/src/Presentation/Nop.Web/Areas/Admin/Views/Order/AddProductToOrderDetails.cshtml @@ -1,4 +1,4 @@ -@model AddProductToOrderModel +@model AddProductToOrderModel @using Nop.Core.Domain.Catalog @@ -10,7 +10,6 @@ } @*we add enctype = "multipart/form-data" because "File upload" attribute control type requires it*@ -
@@ -53,7 +52,7 @@
- +
@@ -142,4 +141,24 @@
- \ No newline at end of file + + + diff --git a/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Info.cshtml b/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Info.cshtml index 109e5ce220c..dcbf7b00adf 100644 --- a/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Info.cshtml +++ b/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Info.cshtml @@ -1,4 +1,4 @@ -@model OrderModel +@model OrderModel @using Nop.Core.Domain.Tax; @using Nop.Core.Domain.Orders; @@ -6,13 +6,81 @@ @if (!Model.IsLoggedInAsVendor) { - } -
+
+ @await Component.InvokeAsync("AdminWidget", new { widgetZone = "admin_order_details_info_top", additionalData = Model.Id })
@if (!Model.IsLoggedInAsVendor) @@ -402,7 +471,7 @@
-
@($"{Model.RedeemedRewardPoints}{T("Admin.Orders.Fields.RedeemedRewardPoints.Points")} {Model.RedeemedRewardPointsAmount}")
+
@Model.RedeemedRewardPoints + @T("Admin.Orders.Fields.RedeemedRewardPoints.Points").Text + "/" + @Model.RedeemedRewardPointsAmount
} @@ -822,4 +891,5 @@
- \ No newline at end of file + @await Component.InvokeAsync("AdminWidget", new { widgetZone = "admin_order_details_info_bottom", additionalData = Model.Id }) + diff --git a/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Products.cshtml b/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Products.cshtml index 56ef3801de2..0bc6eb67fda 100644 --- a/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Products.cshtml +++ b/src/Presentation/Nop.Web/Areas/Admin/Views/Order/_OrderDetails.Products.cshtml @@ -1,391 +1,416 @@ -@model OrderModel +@model OrderModel @using Nop.Core.Domain.Tax; @using Nop.Core.Domain.Catalog; -
-
-
- @foreach (var item in Model.Items) - { - - - - } - - - - - @if (Model.HasDownloadableProducts) - { - - } - - - - - @if (!Model.IsLoggedInAsVendor) - { - - } - - - - - @if (Model.HasDownloadableProducts) - { - - } - - - - - @if (!Model.IsLoggedInAsVendor) - { - - } - - - +
+ @await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.OrderDetailsProductsTop, additionalData = Model }) +
+
+
+
@foreach (var item in Model.Items) { -
- - + } + + } + +
- @T("Admin.Orders.Products.Picture") - - @T("Admin.Orders.Products.ProductName") - - @T("Admin.Orders.Products.Download") - - @T("Admin.Orders.Products.Price") - - @T("Admin.Orders.Products.Quantity") - - @T("Admin.Orders.Products.Discount") - - @T("Admin.Orders.Products.Total") - - @T("Admin.Common.Edit") -
- - - @item.ProductName - @if (!string.IsNullOrEmpty(item.AttributeInfo)) - { -

- @Html.Raw(item.AttributeInfo) -

- } - @if (!string.IsNullOrEmpty(item.RecurringInfo)) - { -

- @Html.Raw(item.RecurringInfo) -

- } - @if (!string.IsNullOrEmpty(item.RentalInfo)) - { -

- @Html.Raw(item.RentalInfo) -

- } - @if (!string.IsNullOrEmpty(item.Sku)) - { -

- @T("Admin.Orders.Products.SKU"): - @item.Sku -

+ + + + } + + + + + @if (Model.HasDownloadableProducts) + { + + } + + + + + @if (!Model.IsLoggedInAsVendor) + { + + } + + + + + @if (Model.HasDownloadableProducts) + { + + } + + + + + @if (!Model.IsLoggedInAsVendor) + { + + } + + + + @foreach (var item in Model.Items) { -

- @T("Admin.Orders.Products.ReturnRequests"): - @for (var i = 0; i < item.ReturnRequests.Count; i++) - { - @item.ReturnRequests[i].CustomNumber - if (i != item.ReturnRequests.Count - 1) +

+ + + @if (!string.IsNullOrEmpty(item.RentalInfo)) + { +

+ @Html.Raw(item.RentalInfo) +

+ } + @if (!string.IsNullOrEmpty(item.Sku)) + { +

+ @T("Admin.Orders.Products.SKU"): + @item.Sku +

+ } + @if (!string.IsNullOrEmpty(item.VendorName)) + { +

+ @T("Admin.Orders.Products.Vendor"): + @item.VendorName +

+ } + @if (item.ReturnRequests.Count > 0) + { +

+ @T("Admin.Orders.Products.ReturnRequests"): + @for (var i = 0; i < item.ReturnRequests.Count; i++) + { + @item.ReturnRequests[i].CustomNumber + if (i != item.ReturnRequests.Count - 1) + { + , + } + } +

+ } + @if (item.PurchasedGiftCardIds.Count > 0) + { +

+ @T("Admin.Orders.Products.GiftCards"): + @for (var i = 0; i < item.PurchasedGiftCardIds.Count; i++) + { + @item.PurchasedGiftCardIds[i] + if (i != item.PurchasedGiftCardIds.Count - 1) + { + , + } + } +

+ } + - @if (Model.HasDownloadableProducts) - { - } -
-
- - @T("Admin.Orders.Products.License") - -
- @if (item.LicenseDownloadGuid != Guid.Empty) +
+ + - } - - - - + + @if (!Model.IsLoggedInAsVendor) { - @item.SubTotalInclTax - } - break; - default: - break; - } - } -
-
-
- @T("Admin.Orders.Products.Edit.InclTax") -
-
- -
-
-
-
- @T("Admin.Orders.Products.Edit.ExclTax") -
-
- -
-
-
- - @if (!Model.IsLoggedInAsVendor) - { - - } - - } - -
+ @T("Admin.Orders.Products.Picture") + + @T("Admin.Orders.Products.ProductName") + + @T("Admin.Orders.Products.Download") + + @T("Admin.Orders.Products.Price") + + @T("Admin.Orders.Products.Quantity") + + @T("Admin.Orders.Products.Discount") + + @T("Admin.Orders.Products.Total") + + @T("Admin.Common.Edit") +
+ + + @item.ProductName + @if (!string.IsNullOrEmpty(item.AttributeInfo)) { - , +

+ @Html.Raw(item.AttributeInfo) +

} - } -

- } - @if (item.PurchasedGiftCardIds.Count > 0) - { -

- @T("Admin.Orders.Products.GiftCards"): - @for (var i = 0; i < item.PurchasedGiftCardIds.Count; i++) - { - @item.PurchasedGiftCardIds[i] - if (i != item.PurchasedGiftCardIds.Count - 1) + @if (!string.IsNullOrEmpty(item.RecurringInfo)) { - , +

+ @Html.Raw(item.RecurringInfo) +

} - } -

- } -
- @if (item.IsDownload) - { -
- @string.Format(T("Admin.Orders.Products.Download.DownloadCount").Text, item.DownloadCount) - -
-
- if (item.DownloadActivationType == DownloadActivationType.Manually) + @if (Model.HasDownloadableProducts) { -
- -
-
+
+ @if (item.IsDownload) + { +
+ @string.Format(T("Admin.Orders.Products.Download.DownloadCount").Text, item.DownloadCount) + +
+
+ if (item.DownloadActivationType == DownloadActivationType.Manually) + { +
+ +
+
+ } +
+
+ + @T("Admin.Orders.Products.License") + +
+ @if (item.LicenseDownloadGuid != Guid.Empty) + { + + } + +
+ } +
+ @if (Model.AllowCustomersToSelectTaxDisplayType) { -
- @T("Admin.Orders.Products.License.DownloadLicense") +
@item.UnitPriceInclTax
+
@item.UnitPriceExclTax
+ } + else + { + switch (Model.TaxDisplayType) + { + case TaxDisplayType.ExcludingTax: + { + @item.UnitPriceExclTax + } + break; + case TaxDisplayType.IncludingTax: + { + @item.UnitPriceInclTax + } + break; + default: + break; + } + } +
+
+
+ @T("Admin.Orders.Products.Edit.InclTax") +
+
+ +
+
+
+
+ @T("Admin.Orders.Products.Edit.ExclTax") +
+
+ +
+
+
+
@item.Quantity
+
+
+
+ +
+
+
+
+ @if (Model.AllowCustomersToSelectTaxDisplayType) + { +
@item.DiscountInclTax
+
@item.DiscountExclTax
} - - - } -
- @if (Model.AllowCustomersToSelectTaxDisplayType) - { -
@item.UnitPriceInclTax
-
@item.UnitPriceExclTax
- } - else - { - switch (Model.TaxDisplayType) - { - case TaxDisplayType.ExcludingTax: - { - @item.UnitPriceExclTax - } - break; - case TaxDisplayType.IncludingTax: - { - @item.UnitPriceInclTax - } - break; - default: - break; - } - } -
-
-
- @T("Admin.Orders.Products.Edit.InclTax") -
-
- -
-
-
-
- @T("Admin.Orders.Products.Edit.ExclTax") -
-
- -
-
-
-
-
@item.Quantity
-
-
-
- -
-
-
-
- @if (Model.AllowCustomersToSelectTaxDisplayType) - { -
@item.DiscountInclTax
-
@item.DiscountExclTax
- } - else - { - switch (Model.TaxDisplayType) - { - case TaxDisplayType.ExcludingTax: + else { - @item.DiscountExclTax - } - break; - case TaxDisplayType.IncludingTax: - { - @item.DiscountInclTax - } - break; - default: - break; - } - } -
-
-
- @T("Admin.Orders.Products.Edit.InclTax") -
-
- -
-
-
-
- @T("Admin.Orders.Products.Edit.ExclTax") -
-
- -
-
-
-
- @if (Model.AllowCustomersToSelectTaxDisplayType) - { -
@item.SubTotalInclTax
-
@item.SubTotalExclTax
- } - else - { - switch (Model.TaxDisplayType) - { - case TaxDisplayType.ExcludingTax: + switch (Model.TaxDisplayType) + { + case TaxDisplayType.ExcludingTax: + { + @item.DiscountExclTax + } + break; + case TaxDisplayType.IncludingTax: + { + @item.DiscountInclTax + } + break; + default: + break; + } + } +
+
+
+ @T("Admin.Orders.Products.Edit.InclTax") +
+
+ +
+
+
+
+ @T("Admin.Orders.Products.Edit.ExclTax") +
+
+ +
+
+
+
+ @if (Model.AllowCustomersToSelectTaxDisplayType) { - @item.SubTotalExclTax - } - break; - case TaxDisplayType.IncludingTax: +
@item.SubTotalInclTax
+
@item.SubTotalExclTax
+ } + else + { + switch (Model.TaxDisplayType) + { + case TaxDisplayType.ExcludingTax: + { + @item.SubTotalExclTax + } + break; + case TaxDisplayType.IncludingTax: + { + @item.SubTotalInclTax + } + break; + default: + break; + } + } +
+
+
+ @T("Admin.Orders.Products.Edit.InclTax") +
+
+ +
+
+
+
+ @T("Admin.Orders.Products.Edit.ExclTax") +
+
+ +
+
+
+
- + + - - + + - - + + - -
- - - @if (!string.IsNullOrEmpty(Model.CheckoutAttributeInfo) && !Model.IsLoggedInAsVendor) - { -
-
- @Html.Raw(Model.CheckoutAttributeInfo) -
-
- } - @if (!Model.IsLoggedInAsVendor) - { -
-
- + +
+
+ @if (!string.IsNullOrEmpty(Model.CheckoutAttributeInfo) && !Model.IsLoggedInAsVendor) + { +
+
+ @Html.Raw(Model.CheckoutAttributeInfo) +
+
+ } + @if (!Model.IsLoggedInAsVendor) + { +
+
+ +
+
+ }
- } + + @await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.OrderDetailsProductsBottom, additionalData = Model })