@using Microsoft.AspNetCore.Mvc.Localization @using System.Threading @using gehGassi.Web.Controllers @using gehGassi.Web.Helper @using gehGassi.Web.Models @using Microsoft.AspNetCore.Mvc.TagHelpers @using Microsoft.Extensions.Localization @inject IViewLocalizer Localizer @model CheckoutOrderVm @{ IStringLocalizer annotationsLocalizer = ViewBag.AnnotationsLocalizer; CartListVm cartModel = ViewBag.CartModel; List validationList = ViewBag.ValidationList; RecalculationResult recalculationResult = ViewBag.RecalculationResult; CheckoutAddressVm checkoutAddress = ViewBag.AddressModel; CheckoutPaymentVm checkoutPayment = ViewBag.PaymentModel; var termsLink = Url.Action("TermsAndConditions", "Shop"); var gdrpLink = Url.Action("Privacy", "Shop"); var termsTag = $"{Localizer["Common_TermsAndconditions"].Value}"; var gdprTag = $"{Localizer["Common_Gdpr"].Value}"; var termsText = string.Format(Localizer["Shop_TermsAndConditions"].Value, termsTag); var gdprText = string.Format(Localizer["Shop_Gdpr"].Value, gdprTag); }
@await Html.PartialAsync("_CheckoutHeader", new CheckoutHeaderVm() { Step = 4 })

@Localizer["Checkout_Step_4"]

@foreach (var cartItem in cartModel.CartItems) { var quantityInfo = ""; if (cartItem.Quantity >= cartItem.OrderMaximumQuantity) { quantityInfo = string.Format(Localizer["Cart_QuantityInfo"].Value, cartItem.OrderMaximumQuantity); }
@cartItem.ProductName
@cartItem.ProductSku @cartItem.ProductName
@if (!string.IsNullOrWhiteSpace(cartItem.ProductSpecialInfo)) {
@cartItem.ProductSpecialInfo
}
€ @cartItem.TotalGross.ToString("N2") @quantityInfo
Stück: @cartItem.Quantity
}
@if (checkoutAddress.DeliveryAddressIsBilling) { @Localizer["Checkout_Address_Both"] } else { @Localizer["Checkout_Address_Billing"] }
@checkoutAddress.Company
@if (!string.IsNullOrWhiteSpace(checkoutAddress.Title)) { @checkoutAddress.Title } @checkoutAddress.FirstName @checkoutAddress.LastName
@checkoutAddress.BillingAddress.AddressLine1
@if (!string.IsNullOrWhiteSpace(checkoutAddress.BillingAddress.AddressLine2)) {
@checkoutAddress.BillingAddress.AddressLine2
}
@checkoutAddress.BillingAddress.Zip @checkoutAddress.BillingAddress.City
@checkoutAddress.BillingCountryName
@if (!checkoutAddress.DeliveryAddressIsBilling) {
@Localizer["Checkout_Address_Delivery"]
@checkoutAddress.DeliveryCompany
@if (!string.IsNullOrWhiteSpace(checkoutAddress.DeliveryTitle)) { @checkoutAddress.DeliveryTitle } @checkoutAddress.DeliveryFirstName @checkoutAddress.DeliveryLastName
@checkoutAddress.DeliveryAddress.AddressLine1
@if (!string.IsNullOrWhiteSpace(checkoutAddress.DeliveryAddress.AddressLine2)) {
@checkoutAddress.DeliveryAddress.AddressLine2
}
@checkoutAddress.DeliveryAddress.Zip @checkoutAddress.DeliveryAddress.City
@checkoutAddress.DeliveryCountryName
}
@Localizer["Checkout_Step_3"]
@checkoutPayment.PaymentType.GetDisplayName(annotationsLocalizer)
@if (cartModel.TaxRates.Any()) { foreach (var modelTaxRate in cartModel.TaxRates) { } }
@Localizer["Cart_Subtotal"]: € @cartModel.TotalGross.ToString("N2")
@Localizer["Cart_ShipmentCost"]: € @cartModel.ShipmentGross.ToString("N2")

@Localizer["Cart_Total"]: € @((cartModel.TotalGross + cartModel.ShipmentGross).ToString("N2"))
@Localizer["Cart_Tax"] @modelTaxRate.Key%: € @modelTaxRate.Value.ToString("N2")

@**@
@**@

@functions { string GetImage(CartItemListVm model) { if (!string.IsNullOrWhiteSpace(model.ProductImage)) return $"/file/documents/thumbnails/200/{model.ProductImage}"; return "/images/product_generic_200.png"; } }