diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml index ecb4e0f5..e426ef10 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml @@ -6,13 +6,16 @@ @model EShopOnAbp.PublicWeb.Components.UserOrders.UserOrderWidgetViewComponent.UserOrderViewModel @inject IStringLocalizer L @inject IOptions options + @if (Model.ServiceError) {
SERVICE ERROR
} + @L["UserOrders:TotalOrderCount"] @Model.UserOrders.Count + @foreach (var order in Model.UserOrders) { var orderTotalString = order.Items.Sum(q => q.UnitPrice * q.Units).ToString("C", new CultureInfo("en-US")); @@ -51,24 +54,32 @@ - @{ - string imageUrl = $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{item.PictureUrl}"; - - } + + @{ + string imageUrl = $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{item.PictureUrl}"; + + } + - -
@item.ProductName
-
@L["UserOrders:ProductReturnDate"] @order.OrderDate.AddMonths(1).ToString("dd MMMM yyyy")
+ + +
@item.ProductName
+
@L["UserOrders:ProductReturnDate"] @order.OrderDate.AddMonths(1).ToString("dd MMMM yyyy")
+
- @L["UserOrders:ReturnProducts"] + + @L["UserOrders:ReturnProducts"] + - @L["UserOrders:AddReview"] + + @L["UserOrders:AddReview"] +
diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Index.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Index.cshtml index e19737e6..24b58a5d 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Index.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Index.cshtml @@ -14,12 +14,12 @@ } @section styles{ - + } @section scripts { - - + + } @if (Model.HasRemoteServiceError) @@ -44,13 +44,15 @@ string productImage = !product.ImageName.IsNullOrEmpty() ? $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{product.ImageName}" : $"{options.Value.RemoteServices.Default.BaseUrl}product-images/@product.ImageName"; string buyText = L["Index:AddToBasket"];
-
-
-
@product.Name
- @product.Code - @L["StockCount"]: @product.StockCount + +
+
+
@product.Name
+ @product.Code - @L["StockCount"]: @product.StockCount +
-
- + +
@if (product.StockCount > 0) { diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml new file mode 100644 index 00000000..d9876bda --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml @@ -0,0 +1,55 @@ +@page "/products/{id:guid}" +@using EShopOnAbp.Localization +@using Microsoft.Extensions.Localization +@using System.Globalization +@using Microsoft.Extensions.Options +@using Volo.Abp.Http.Client +@model EShopOnAbp.PublicWeb.Pages.ProductDetailModel +@inject IStringLocalizer L +@inject IOptions options + +@section styles{ + +} + +@section scripts { + + +} + +
+
+
+
+ @{ + var product = Model.Product; + var productPrice = product.Price.ToString("C", new CultureInfo("en-US")); + string productImage = !product.ImageName.IsNullOrEmpty() ? $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{product.ImageName}" : $"{options.Value.RemoteServices.Default.BaseUrl}product-images/@product.ImageName"; + string buyText = L["Index:AddToBasket"]; +
+
+
+
@product.Name
+ @product.Code - @L["StockCount"]: @product.StockCount +
+
+ +
+ @if (product.StockCount > 0) + { + + } + else + { + + } +
+ @productPrice +
+
+
+ } +
+
+
+
\ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs new file mode 100644 index 00000000..99ad7431 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs @@ -0,0 +1,28 @@ +using EShopOnAbp.CatalogService.Products; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Threading.Tasks; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace EShopOnAbp.PublicWeb.Pages +{ + public class ProductDetailModel : AbpPageModel + { + [BindProperty(SupportsGet = true)] + public int OrderNo { get; set; } + + public ProductDto Product { get; private set; } + + private readonly IPublicProductAppService _productAppService; + + public ProductDetailModel(IPublicProductAppService productAppService) + { + _productAppService = productAppService; + } + + public async Task OnGet(Guid id) + { + Product = await _productAppService.GetAsync(id); + } + } +} \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/index.css b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/index.css index fea3c70f..9b2c3929 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/index.css +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/index.css @@ -2,6 +2,11 @@ background-color: #f9f9f9; } +a, a:hover, a:visited, a:active { + color: inherit; + text-decoration: none; +} + .product-list-item { background-color: #fff; padding: 2em; diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/user-orders/user-order-widget.css b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/user-orders/user-order-widget.css index e69de29b..bfa23e93 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/user-orders/user-order-widget.css +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/user-orders/user-order-widget.css @@ -0,0 +1,4 @@ +a, a:hover, a:visited, a:active { + color: inherit; + text-decoration: none; +}