/// <summary> /// A collection of the tokens and the replaceable content for email templates. /// </summary> /// <param name="context">An instance of the Hotcakes Request context.</param> /// <returns>List of HtmlTemplateTag</returns> public List <HtmlTemplateTag> GetReplaceableTags(HccRequestContext context) { var result = new List <HtmlTemplateTag>(); var culture = context.MainContentCulture; result.Add(new HtmlTemplateTag("[[LineItem.AdjustedPrice]]", AdjustedPricePerItem.ToString("c"))); result.Add(new HtmlTemplateTag("[[LineItem.BasePrice]]", BasePricePerItem.ToString("c"))); result.Add(new HtmlTemplateTag("[[LineItem.LineTotalBeforeVAT]]", (LineTotal - TaxPortion).ToString("c"))); result.Add(new HtmlTemplateTag("[[LineItem.Discounts]]", DiscountDetailsAsHtml())); result.Add(new HtmlTemplateTag("[[LineItem.LineTotal]]", LineTotal.ToString("c"))); result.Add(new HtmlTemplateTag("[[LineItem.ProductId]]", ProductId)); result.Add(new HtmlTemplateTag("[[LineItem.VariantId]]", VariantId)); result.Add(new HtmlTemplateTag("[[LineItem.ProductName]]", ProductName)); result.Add(new HtmlTemplateTag("[[LineItem.ProductSku]]", ProductSku)); result.Add(new HtmlTemplateTag("[[LineItem.Sku]]", "Obsolete. Please use [[LineItem.ProductSku]] instead.", true)); result.Add(new HtmlTemplateTag("[[LineItem.ProductDescription]]", ProductShortDescription)); result.Add(new HtmlTemplateTag("[[LineItem.Quantity]]", Quantity.ToString("#"))); result.Add(new HtmlTemplateTag("[[LineItem.QuantityShipped]]", QuantityShipped.ToString("#"))); result.Add(new HtmlTemplateTag("[[LineItem.QuantityReturned]]", QuantityReturned.ToString("#"))); result.Add(new HtmlTemplateTag("[[LineItem.ShippingStatus]]", LocalizationUtils.GetOrderShippingStatus(ShippingStatus, culture))); result.Add(new HtmlTemplateTag("[[LineItem.TaxRate]]", decimal.Parse(TaxRate.ToString("p3").Replace("%", "")).ToString("G29") + " %")); result.Add(new HtmlTemplateTag("[[LineItem.ShippingPortion]]", ShippingPortion.ToString("c"))); result.Add(new HtmlTemplateTag("[[LineItem.TaxPortion]]", TaxPortion.ToString("c"))); result.Add(new HtmlTemplateTag("[[LineItem.ExtraShipCharge]]", ExtraShipCharge.ToString("c"))); result.Add(new HtmlTemplateTag("[[LineItem.ShipFromAddress]]", ShipFromAddress.ToHtmlString())); result.Add(new HtmlTemplateTag("[[LineItem.ShipSeparately]]", ShipSeparately ? "Yes" : "No")); return(result); }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (DueDate == default(DateTime) ? 0 : DueDate.GetHashCode()); hash = hash * 23 + (LineTotal == default(decimal) ? 0 : LineTotal.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (OrderQty == default(short) ? 0 : OrderQty.GetHashCode()); hash = hash * 23 + (ProductId == default(int) ? 0 : ProductId.GetHashCode()); hash = hash * 23 + (PurchaseOrderId == default(int) ? 0 : PurchaseOrderId.GetHashCode()); hash = hash * 23 + (ReceivedQty == default(decimal) ? 0 : ReceivedQty.GetHashCode()); hash = hash * 23 + (RejectedQty == default(decimal) ? 0 : RejectedQty.GetHashCode()); hash = hash * 23 + (StockedQty == default(decimal) ? 0 : StockedQty.GetHashCode()); hash = hash * 23 + (UnitPrice == default(decimal) ? 0 : UnitPrice.GetHashCode()); return(hash); } }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (CarrierTrackingNumber == null ? 0 : CarrierTrackingNumber.GetHashCode()); hash = hash * 23 + (LineTotal == default(decimal) ? 0 : LineTotal.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (OrderQty == default(short) ? 0 : OrderQty.GetHashCode()); hash = hash * 23 + (ProductId == default(int) ? 0 : ProductId.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); hash = hash * 23 + (SalesOrderId == default(int) ? 0 : SalesOrderId.GetHashCode()); hash = hash * 23 + (SpecialOfferId == default(int) ? 0 : SpecialOfferId.GetHashCode()); hash = hash * 23 + (UnitPrice == default(decimal) ? 0 : UnitPrice.GetHashCode()); hash = hash * 23 + (UnitPriceDiscount == default(decimal) ? 0 : UnitPriceDiscount.GetHashCode()); return(hash); } }