Class OrderLineTemplateExtender
- Namespace
- Dynamicweb.Ecommerce.Orders
- Assembly
- Dynamicweb.Ecommerce.dll
OrderLine template extender. Extends the rendering of a OrderLine.
public abstract class OrderLineTemplateExtender : TemplateExtender
- Inheritance
-
OrderLineTemplateExtender
- Inherited Members
Examples
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 + ")");
}
}
}
Properties
Order
Gets or sets the order.
public Order Order { get; set; }
Property Value
- Order
- The order.
OrderLine
Gets or sets the order line.
public OrderLine OrderLine { get; set; }
Property Value
- OrderLine
- The order line.
RenderingState
Gets the state of the rendering.
public TemplateExtenderRenderingState RenderingState { get; }
Property Value
- TemplateExtenderRenderingState
- The state of the rendering.