From f60b007fddcbcde4550ff1bdb8995e264c505623 Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Mon, 16 Feb 2026 22:05:52 +0330 Subject: [PATCH] =?UTF-8?q?fix:=20show=20actual=20product=20discount=20per?= =?UTF-8?q?cent=20instead=20of=20misleading=20'100%=20=D8=AA=D8=AE=D9=81?= =?UTF-8?q?=DB=8C=D9=81=DB=8C'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/DiscountStore/Cart.razor | 4 ++-- .../Pages/DiscountStore/Checkout.razor | 7 +++++-- .../Pages/DiscountStore/ProductDetail.razor | 15 +++++++++------ .../Pages/DiscountStore/Products.razor | 11 +++++++---- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/FrontOffice.Main/Pages/DiscountStore/Cart.razor b/src/FrontOffice.Main/Pages/DiscountStore/Cart.razor index 2df1155..5b2ad42 100644 --- a/src/FrontOffice.Main/Pages/DiscountStore/Cart.razor +++ b/src/FrontOffice.Main/Pages/DiscountStore/Cart.razor @@ -40,7 +40,7 @@ @FormatPrice(context.UnitPrice) - ۱۰۰٪ تخفیفی + @context.MaxDiscountPercent% تخفیف @@ -86,7 +86,7 @@ @item.Title - ۱۰۰٪ تخفیفی + @item.MaxDiscountPercent% تخفیف diff --git a/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor b/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor index 47b8b1a..57ce153 100644 --- a/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor +++ b/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor @@ -88,7 +88,10 @@ @item.Quantity × @FormatPrice(item.UnitPrice) - ۱۰۰٪ تخفیفی + @if (item.MaxDiscountPercent > 0) + { + @item.MaxDiscountPercent% تخفیف + } @@ -107,7 +110,7 @@ - تخفیف ۱۰۰٪ از کیف تخفیفی اعمال می‌شود. + تخفیف هر محصول به‌صورت کامل از کیف تخفیفی اعمال می‌شود. diff --git a/src/FrontOffice.Main/Pages/DiscountStore/ProductDetail.razor b/src/FrontOffice.Main/Pages/DiscountStore/ProductDetail.razor index 2f031e4..2e37808 100644 --- a/src/FrontOffice.Main/Pages/DiscountStore/ProductDetail.razor +++ b/src/FrontOffice.Main/Pages/DiscountStore/ProductDetail.razor @@ -71,12 +71,15 @@ @($"{_product.Price:N0}") تومان - - قابل پرداخت از کیف تخفیفی: - - ۱۰۰٪ تخفیفی (@($"{_product.Price:N0}") تومان) - - + @if (_product.MaxDiscountPercent > 0) + { + + تخفیف از کیف تخفیفی: + + @_product.MaxDiscountPercent% (@($"{_product.Price * _product.MaxDiscountPercent / 100:N0}") تومان) + + + } diff --git a/src/FrontOffice.Main/Pages/DiscountStore/Products.razor b/src/FrontOffice.Main/Pages/DiscountStore/Products.razor index 4b996a1..edb5959 100644 --- a/src/FrontOffice.Main/Pages/DiscountStore/Products.razor +++ b/src/FrontOffice.Main/Pages/DiscountStore/Products.razor @@ -93,10 +93,13 @@ فقط @p.RemainingCount عدد } - - ۱۰۰٪ تخفیفی - + @if (p.MaxDiscountPercent > 0) + { + + @p.MaxDiscountPercent% تخفیف + + }
@p.Title