6 changed files with 121 additions and 21 deletions
@ -0,0 +1,59 @@ |
|||
@page "{orderNo:int}" |
|||
@using System.Globalization |
|||
@model EShopOnAbp.PublicWeb.Pages.OrderReceivedModel |
|||
@{ |
|||
decimal orderTotal = 0; |
|||
Model.ReceivedOrder.Items.ForEach(q => orderTotal += q.Units * q.UnitPrice); |
|||
string orderTotalString = orderTotal.ToString("C", new CultureInfo("en-US")); // We work with USD any ways |
|||
string orderNoString = Model.ReceivedOrder.OrderNo.ToString("N0", new NumberFormatInfo() {NumberGroupSeparator = " "}); |
|||
} |
|||
|
|||
@section styles{ |
|||
<abp-style src="/Pages/orderReceived.css"/> |
|||
} |
|||
|
|||
@{ |
|||
var paymentIcon = Model.ReceivedOrder.PaymentType == "paypal" ? "fa-cc-paypal" : "fa-credit-card"; |
|||
} |
|||
<abp-row class="justify-content-center p-5"> |
|||
<abp-card class="col-lg-10 col-md-10 col-sm-12 shadow"> |
|||
<abp-card-body> |
|||
<abp-row class="p-5"> |
|||
<abp-column size="_1"> |
|||
<i class="fa fa-3x fa-check-circle" style="color: greenyellow"></i> |
|||
</abp-column> |
|||
<abp-column> |
|||
<div> |
|||
<h4>Sipariş alındı!</h4> |
|||
<p>Siparişiniz ile ilgili detaylar <strong>@Model.ReceivedOrder.Buyer.Email</strong> adresine gönderildi. <a href="/MyOrders">Siparişlerime git</a></p> |
|||
</div> |
|||
</abp-column> |
|||
|
|||
</abp-row> |
|||
<abp-row> |
|||
<abp-column> |
|||
<div class="ro-title">Sipariş Numarası</div> |
|||
<div class="ro-body ro-ono"> |
|||
@orderNoString |
|||
</div> |
|||
</abp-column> |
|||
<abp-column> |
|||
<div class="ro-title">Teslimat Adresi</div> |
|||
<div class="ro-body ro-large"> |
|||
@Model.ReceivedOrder.Address.Description |
|||
</div> |
|||
<div>@Model.ReceivedOrder.Address.Street - @Model.ReceivedOrder.Address.ZipCode</div> |
|||
<div>@Model.ReceivedOrder.Address.City / @Model.ReceivedOrder.Address.Country</div> |
|||
</abp-column> |
|||
<abp-column> |
|||
<div class="ro-title">Ödenen Tutar</div> |
|||
<div class="ro-body ro-large">@orderTotalString</div> |
|||
<div class="pt-2"> |
|||
<i class="fa fa-5x @paymentIcon" style="color:indigo"></i> |
|||
</div> |
|||
</abp-column> |
|||
</abp-row> |
|||
<abp-row class="p-5"></abp-row> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
</abp-row> |
|||
@ -0,0 +1,23 @@ |
|||
using System.Threading.Tasks; |
|||
using EShopOnAbp.OrderingService.Orders; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
|||
|
|||
namespace EShopOnAbp.PublicWeb.Pages; |
|||
|
|||
public class OrderReceivedModel : AbpPageModel |
|||
{ |
|||
private readonly IOrderAppService _orderAppService; |
|||
[BindProperty(SupportsGet = true)] public int OrderNo { get; set; } |
|||
public OrderDto ReceivedOrder { get; set; } |
|||
|
|||
public OrderReceivedModel(IOrderAppService orderAppService) |
|||
{ |
|||
_orderAppService = orderAppService; |
|||
} |
|||
|
|||
public async Task OnGet(int orderNo) |
|||
{ |
|||
ReceivedOrder = await _orderAppService.GetByOrderNoAsync(orderNo); |
|||
} |
|||
} |
|||
@ -1,24 +1,16 @@ |
|||
@page |
|||
@model EShopOnAbp.PublicWeb.Pages.PaymentCompletedModel |
|||
|
|||
@section styles{ |
|||
} |
|||
|
|||
<div class="container"> |
|||
|
|||
@if (Model.IsSuccessful) |
|||
{ |
|||
<abp-row class="justify-content-center p-5"> |
|||
<abp-card class="col-lg-6 col-md-6 col-sm-8 shadow" style="text-align: center; line-height: 3rem"> |
|||
@* <img class="card-img-top" src="..." alt="Card image cap"> *@ |
|||
<abp-card-body> |
|||
<h4 class="card-title" style="text-align: center">Order Recieved!</h4> |
|||
<p class="card-text">Thank you for your payment. Your purchase is completed. </p> |
|||
<p class="card-text">You can check our recommended products below.</p> |
|||
<a href="/" class="btn btn-primary">Continue Shopping</a> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
</abp-row> |
|||
} |
|||
|
|||
<abp-row class="justify-content-center p-5"> |
|||
<abp-card class="col-lg-6 col-md-6 col-sm-8 shadow" style="text-align: center; line-height: 3rem"> |
|||
@* <img class="card-img-top" src="..." alt="Card image cap"> *@ |
|||
<abp-card-body> |
|||
<h4 class="card-title" style="text-align: center">Order Failed!</h4> |
|||
<p class="card-text">It seems there is a problem with your payment </p> |
|||
<p class="card-text">Please check your payment method!</p> |
|||
<a href="/" class="btn btn-primary">Continue Shopping</a> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
</abp-row> |
|||
</div> |
|||
@ -0,0 +1,19 @@ |
|||
.ro-title { |
|||
text-transform: uppercase; |
|||
font-weight: 500; |
|||
color: crimson; |
|||
padding-bottom: .5em; |
|||
} |
|||
|
|||
.ro-body { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.ro-ono { |
|||
font-size: x-large; |
|||
} |
|||
|
|||
.ro-large { |
|||
font-size: larger; |
|||
padding-bottom: .5rem; |
|||
} |
|||
Loading…
Reference in new issue