@inherits RazorTemplateBase> @using Dynamicweb.Rendering; @Translate("Order confirmation", "Order confirmation") @Include("../../../_wrap/EmailCssBase.cshtml") @EmailCssBase() @RenderHeaderSection() @RenderGiftcards() @RenderOrderList() @RenderOrderDetails() @RenderComments() @RenderFooter() @* CONTENT HELPERS *@ @helper RenderHeaderSection() { string logoimage = "http://" + GetGlobalValue("Global:Request.Host") + Pageview.Area.Item["GeneralLogo"].ToString(); string logotext = Pageview.Area.Item["GeneralLogoText"].ToString();
@if (!string.IsNullOrWhiteSpace(logoimage)) {
} @if (!string.IsNullOrWhiteSpace(logotext)) {
@logotext
}
@if (GetBoolean("Ecom:Order.IsRecurringOrder")) { } @if (GetBoolean("Ecom:Order.IsBasedOnRecurringOrder")) { }
@Translate("You have placed a subscription. This is a confirmation of the subscription not the actual order receipt.", "You have placed a subscription. This is a confirmation of the subscription not the actual order receipt.") @Translate("Your subscription order", "Your subscription order")
@Translate("Ordernumber", "Ordernumber") @GetString("Ecom:Order.ID")
@Translate("Orderdate", "Orderdate") @GetValue("Ecom:Order.Completed")
} @helper RenderOrderList() {
 
@Translate("Products", "Products")
@foreach (LoopItem orderline in GetLoop("OrderLines")) { var image = "http://" + GetGlobalValue("Global:Request.Host") + "/Admin/Public/GetImage.ashx?width=40&height=30&crop=0&image=" + orderline.GetString("Ecom:Product.ImageSmall.Default.Clean"); foreach (LoopItem bomitem in orderline.GetLoop("BOMItems")) { image = "http://" + GetGlobalValue("Global:Request.Host") + "/Admin/Public/GetImage.ashx?width=40&height=30&crop=0&image=" + bomitem.GetString("Ecom:Product.ImageSmall.Default.Clean"); } } @{ var freight = GetString("Ecom:Order.ShippingFee.PriceWithVATFormatted"); var totalVAT = GetString("Ecom:Order.Price.PriceWithVATFormatted") + " "; var totalNoVAT = GetString("Ecom:Order.Price.PriceWithoutVATFormatted"); var customerCountry = GetString("Ecom:Order.Customer.Country.Code"); var VAT = GetString("Ecom:Order.Price.VATFormatted"); var paymentMethod = GetString("Ecom:Order.PaymentMethod"); var paymentPrice = GetString("Ecom:Order.PaymentFee.PriceFormatted"); }
  @Translate("Product", "Product") @Translate("Qty", "Qty") @Translate("Total", "Total")
@orderline.GetValue("Ecom:Order:OrderLine.ProductName") @if (Dynamicweb.Core.Converter.ToBoolean(orderline.GetValue("Ecom:Order:OrderLine.ProductVariantText"))) {
(@orderline.GetValue("Ecom:Order:OrderLine.ProductVariantText"))
} @orderline.GetValue("Ecom:Order:OrderLine.ProductID")
@orderline.GetValue("Ecom:Order:OrderLine.Quantity") @orderline.GetValue("Ecom:Order:OrderLine.Price.PriceWithoutVATFormatted")
@bomitem.GetString("Ecom:Order:OrderLine.ProductName") @bomitem.GetString("Ecom:Order:OrderLine.Quantity") @bomitem.GetString("Ecom:Order:OrderLine.TotalPrice")
@Translate("Freight", "Freight") @freight
@paymentMethod @paymentPrice
@Translate("Price excl. VAT", "Price excl. VAT") @totalNoVAT
@Translate("VAT", "VAT") @VAT
@Translate("Total", "Total") @totalVAT
} @helper RenderComments() { if (!string.IsNullOrWhiteSpace(GetString("Ecom:Order.Customer.Comment"))) {
@Translate("Comment", "Comment")
@GetString("Ecom:Order.Customer.Comment")
} } @helper RenderGiftcards() { if (!string.IsNullOrWhiteSpace(GetString("Ecom:Order.HasUsedGiftCards"))) {
 
@Translate("Order used gift cards", "Order used gift cards")
@foreach (LoopItem usedgiftcards in GetLoop("UsedGiftCards")) { }
@Translate("Gift card name", "Gift card name") @Translate("Gift card code", "Gift card code") @Translate("Expiry date", "Expiry date") @Translate("Initial amount", "Initial amount") @Translate("Used amount", "Used amount") @Translate("Remaining balance", "Remaining balance")
@usedgiftcards.GetString("Ecom:Order.UsedGiftCard.Name") @usedgiftcards.GetString("Ecom:Order.UsedGiftCard.Code") @usedgiftcards.GetString("Ecom:Order.UsedGiftCard.ExpiryDate") @usedgiftcards.GetString("Ecom:Order.UsedGiftCard.InitialAmount") @usedgiftcards.GetString("Ecom:Order.UsedGiftCard.UsedAmountForTheOrder") @usedgiftcards.GetString("Ecom:Order.UsedGiftCard.RemainingBalance")
} if (!string.IsNullOrWhiteSpace(GetString("Ecom:Order.HasGiftCards"))) {
 
@Translate("Giftcards bought on this order", "Giftcards bought on this order")
@foreach (LoopItem giftcards in GetLoop("GiftCards")) { }
@Translate("Gift card name", "Gift card name") @Translate("Gift card code", "Gift card code") @Translate("Expiry date", "Expiry date") @Translate("Gift card amount", "Gift card amount")
@giftcards.GetString("Ecom:Order.GiftCard.Name") @giftcards.GetString("Ecom:Order.GiftCard.Code") @giftcards.GetString("Ecom:Order.GiftCard.ExpiryDate") @giftcards.GetString("Ecom:Order.GiftCard.Amount")@giftcards.GetString("Ecom:Order.GiftCard.Amount.Currency.Code")
} } @helper RenderOrderDetails() {
 
@Translate("Billing address", "Billing address")
@if (GetBoolean("Ecom:Order.Customer.Company")) {
@GetValue("Ecom:Order.Customer.Company")
} @if (GetBoolean("Ecom:Order.Customer.Name")) {
@GetValue("Ecom:Order.Customer.Name")
} @if (GetBoolean("Ecom:Order.Customer.Address")) {
@GetValue("Ecom:Order.Customer.Address")
} @if (GetBoolean("Ecom:Order.Customer.Address2")) {
@GetValue("Ecom:Order.Customer.Address2")
} @if (GetBoolean("Ecom:Order.Customer.City")) {
@GetValue("Ecom:Order.Customer.Zip") @GetValue("Ecom:Order.Customer.City")
} @if (GetBoolean("Ecom:Order.Customer.Country")) {
@GetValue("Ecom:Order.Customer.Country")
} @if (GetBoolean("Ecom:Order.Customer.EAN")) {
@GetString("Ecom:Order.Customer.EAN")
} @if (GetBoolean("Ecom:Order.Customer.Phone")) {
@GetString("Ecom:Order.Customer.Phone")
} @if (GetBoolean("Ecom:Order.Customer.Fax")) {
@GetValue("Ecom:Order.Customer.Fax")
} @if (GetBoolean("Ecom:Order.Customer.Cell")) {
@GetValue("Ecom:Order.Customer.Cell")
} @if (GetBoolean("Ecom:Order.Customer.Email")) {
@GetValue("Ecom:Order.Customer.Email")
} @GetValue("Ecom:Order.Customer.Address2")
@Translate("Att", "Att"): @GetValue("Ecom:Order.Customer.Name")
@GetValue("Ecom:Order.Customer.Address")
@GetValue("Ecom:Order.Customer.Zip") @GetValue("Ecom:Order.Customer.City")
@GetValue("Ecom:Order.Customer.Country")
@Translate("Phone", "Phone"): @GetValue("Ecom:Order.Customer.Phone")
@Translate("E-mail", "E-mail"): @GetValue("Ecom:Order.Customer.Email")
@Translate("Delivery address", "Delivery address")
@if (GetBoolean("Ecom:Order.Delivery.Company")) {
@GetValue("Ecom:Order.Delivery.Company")
} @if (GetBoolean("Ecom:Order.Delivery.Name")) {
@GetValue("Ecom:Order.Delivery.Name")
} @if (GetBoolean("Ecom:Order.Delivery.Address")) {
@GetValue("Ecom:Order.Delivery.Address")
} @if (GetBoolean("Ecom:Order.Delivery.Address2")) {
@GetValue("Ecom:Order.Delivery.Address2")
} @if (GetBoolean("Ecom:Order.Delivery.City")) {
@GetValue("Ecom:Order.Delivery.Zip") @GetValue("Ecom:Order.Delivery.City")
} @if (GetBoolean("Ecom:Order.Delivery.Country")) {
@GetValue("Ecom:Order.Delivery.Country")
} @if (GetBoolean("Ecom:Order.Delivery.EAN")) {
@GetString("Ecom:Order.Delivery.EAN")
} @if (GetBoolean("Ecom:Order.Delivery.Phone")) {
@GetString("Ecom:Order.Delivery.Phone")
} @if (GetBoolean("Ecom:Order.Delivery.Fax")) {
@GetValue("Ecom:Order.Delivery.Fax")
} @if (GetBoolean("Ecom:Order.Delivery.Cell")) {
@GetValue("Ecom:Order.Delivery.Cell")
} @if (GetBoolean("Ecom:Order.Delivery.Email")) {
@GetValue("Ecom:Order.Delivery.Email")
} @if (string.IsNullOrWhiteSpace(GetString("Ecom:Order.Delivery.Address"))) { @GetValue("Ecom:Order.Customer.Address2")
@Translate("Att", "Att"): @GetValue("Ecom:Order.Customer.Name")
@GetValue("Ecom:Order.Customer.Address")
@GetValue("Ecom:Order.Customer.Zip") @GetValue("Ecom:Order.Customer.City")
@GetValue("Ecom:Order.Customer.Country")
@Translate("Phone", "Phone"): @GetValue("Ecom:Order.Customer.Phone")
@Translate("E-mail", "E-mail"): @GetValue("Ecom:Order.Customer.Email")
} else { @GetValue("Ecom:Order.Delivery.Address2")
@Translate("Att", "Att"): @GetValue("Ecom:Order.Delivery.Name")
@GetValue("Ecom:Order.Delivery.Address")
@GetValue("Ecom:Order.Delivery.Zip") @GetValue("Ecom:Order.Delivery.City")
@GetValue("Ecom:Order.Delivery.Country")
@Translate("Phone", "Phone"): @GetValue("Ecom:Order.Delivery.Phone")
@Translate("E-mail", "E-mail"): @GetValue("Ecom:Order.Delivery.Email")
}
 
} @helper RenderFooter() {
@Translate("Click here to see your order in a browser", "Click here to see your order in a browser")
 
} @{ @functions { string BodyStyle = "" + "background-color: #f5f5f5;"; string ContainerStyle = "" + "background-color: #fff; "; string LogoStyle = "" + "padding: 10px; "; string HeadingH1Style = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 24px; " + "color: #333; " + "text-align: left; " + "line-height: 48px; "; string BodyTextStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 14px; " + "line-height: 1.4; "; string HeaderInfoStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 12px; " + "font-weight: normal; " + "color: #333; " + "text-align: right; " + "line-height: 22px; " + "display: block;" + "padding-right: 10px;"; string ColumnHeaderStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 16px; " + "font-weight: bold; " + "color: #0B486B; " + "line-height: 24px; "; string ListInfoStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 14px; " + "color: #333; " + "text-align: left; " + "line-height: 22px; "; string TableStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 14px; " + "color: #333; " + "line-height: 22px; " + "width: 100%;"; string TableHeaderThStyle = "" + "font-weight: bold; " + "border-top: 1px solid #d3d2d1; " + "padding: 10px; "; string TableTdStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "border-bottom: 1px solid #d3d2d1; " + "padding: 10px; "; string TableTdNoBorderStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "padding: 10px; "; string TableTdFocusedStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "padding: 10px; " + "font-weight: bold; " + "background-color: #fafafa; "; string TableTdDimmedStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "padding: 10px; " + "color: #d3d2d1; "; string SubTableStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 14px; " + "color: #333; " + "line-height: 18px; " + "width: 100%; " + "border: 0; "; string SmallTextStyle = "" + "display: block; " + "line-height: 1; " + "color: #d3d2d1; "; string ButtonStyle = "" + "font-family: Helvetica, arial, sans-serif; " + "font-size: 14px; " + "color: #fff; " + "background-color: #FF9800; " + "text-align: center; " + "font-weight: bold; " + "padding: 5px 10px; "; } }