Browse Source

updated payment widget

pull/47/head
Galip Tolga Erdem 5 years ago
parent
commit
caef12877d
  1. 3
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Basket/Default.cshtml
  2. 15
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml
  3. 10
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetViewComponent.cs
  4. 4
      apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Basket.cshtml
  5. 4
      apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Payment.cshtml

3
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Basket/Default.cshtml

@ -49,9 +49,6 @@
<div class="col-lg-3">
@await Component.InvokeAsync(typeof(PurchaseWidgetViewComponent),
new { Basket = Model, ButtonDescription = "CompletePurchase"})
</div>
</div>
}

15
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml

@ -1,6 +1,19 @@
@using EShopOnAbp.Localization
@using EShopOnAbp.PublicWeb.Components.Purchase
@using Microsoft.Extensions.Localization
@inject IStringLocalizer<EShopOnAbpResource> L
<div>
<div class="row">
<div class="col-lg-9">
<div class="address-list">
<h3>Select Address</h3>
</div>
<div class="payment-list">
<h3>Select Payment Method</h3>
</div>
</div>
<div class="col-lg-3">
@await Component.InvokeAsync(typeof(PurchaseWidgetViewComponent),
new {Basket = Model, ButtonDescription = "CompleteOrder"})
</div>
</div>

10
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetViewComponent.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using EShopOnAbp.PublicWeb.Basket;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
@ -13,8 +14,15 @@ namespace EShopOnAbp.PublicWeb.Components.Payment;
)]
public class PaymentWidgetViewComponent: AbpViewComponent
{
private readonly UserBasketProvider _userBasketProvider;
public PaymentWidgetViewComponent(UserBasketProvider userBasketProvider)
{
_userBasketProvider = userBasketProvider;
}
public async Task<IViewComponentResult> InvokeAsync()
{
return await Task.FromResult(View("~/Components/Payment/Default.cshtml"));
return View("~/Components/Payment/Default.cshtml", await _userBasketProvider.GetBasketAsync());
}
}

4
apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Basket.cshtml

@ -11,8 +11,8 @@
@inject IStringLocalizer<EShopOnAbpResource> L
<div class="row">
<h3 class="pt-5 pb-4 text-center">@L["YourBasket"]</h3>
<div id="BasketArea">
@* <h3 class="pt-5 pb-4 text-center">@L["YourBasket"]</h3> *@
<div id="BasketArea" class="pt-5">
@await Component.InvokeAsync(typeof(BasketWidgetViewComponent))
</div>
</div>

4
apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Payment.cshtml

@ -7,8 +7,8 @@
@inject IStringLocalizer<EShopOnAbpResource> L
<div class="row">
<h3 class="pt-5 pb-4 text-center">@L["Payment"]</h3>
<div id="PaymentArea">
@* <h3 class="pt-5 pb-4 text-center">@L["Payment"]</h3> *@
<div id="PaymentArea" class="pt-5">
@await Component.InvokeAsync(typeof(PaymentWidgetViewComponent))
</div>
</div>
Loading…
Cancel
Save