Dynamicweb.eCommerce.Orders Namespace : OrderLineTemplateExtender Class |
'Declaration
Public MustInherit Class OrderLineTemplateExtender Inherits Dynamicweb.Extensibility.TemplateExtender
public abstract class OrderLineTemplateExtender : Dynamicweb.Extensibility.TemplateExtender
using Dynamicweb.eCommerce.Frontend; using Dynamicweb.eCommerce.Orders; public class SampleOrderLineTemplateExtender : OrderLineTemplateExtender { public override void ExtendTemplate(Dynamicweb.Rendering.Template template) { if (RenderingState == TemplateExtenderRenderingState.Before) { template.SetTag("Ecom:Order.OrderLine.BeforeRenderTag", "BEFORE THE ORDERLINE WAS RENDERED (" + OrderLine.Quantity + " x " + OrderLine.UnitPrice.PriceFormatted + ")"); } else { template.SetTag("Ecom:Order.OrderLine.AfterRenderTag", "AFTER THE ORDERLINE WAS RENDERED (" + OrderLine.Quantity + " x " + OrderLine.UnitPrice.PriceFormatted + ")"); } } }
Imports Dynamicweb.eCommerce.Orders Imports Dynamicweb.eCommerce.Frontend Public Class OrderLineTemplateExtender1 Inherits OrderLineTemplateExtender Public Overrides Sub ExtendTemplate(ByVal template As Rendering.Template) If RenderingState = TemplateExtenderRenderingState.Before Then 'TODO: Add code here. Fires before the orderline gets rendered template.SetTag("Ecom:Order.OrderLine.BeforeRenderTag", "BEFORE THE ORDERLINE WAS RENDERED (" & OrderLine.Quantity & " x " & OrderLine.UnitPrice.PriceFormatted & ")") Else 'TODO: Add code here. Fires after the orderline has been rendered template.SetTag("Ecom:Order.OrderLine.AfterRenderTag", "AFTER THE ORDERLINE WAS RENDERED (" & OrderLine.Quantity & " x " & OrderLine.UnitPrice.PriceFormatted & ")") End If End Sub End Class
System.Object
Dynamicweb.Extensibility.TemplateExtender
Dynamicweb.eCommerce.Orders.OrderLineTemplateExtender
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2