Table of Contents

Class OrderLineService

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll
public class OrderLineService
Inheritance
OrderLineService
Inherited Members

Methods

AddOrderLineCopy(Order, OrderLine, bool)

Adds a copy of the specified order line.

public void AddOrderLineCopy(Order order, OrderLine orderLineToCopy, bool doMerge)

Parameters

order Order

The Order.

orderLineToCopy OrderLine

The order line.

doMerge bool

if set to true try to merge.

CanBeMerged(OrderLine, OrderLine)

Determines whether the orderLine can be merged with the another order line.

public bool CanBeMerged(OrderLine orderLine, OrderLine another)

Parameters

orderLine OrderLine
another OrderLine

The other order line.

Returns

bool

true if the orderLine can be merged with another order line; otherwise, false.

ClearCachedPrices(OrderLine)

Clears the cached price.

public void ClearCachedPrices(OrderLine orderLine)

Parameters

orderLine OrderLine

The Order line.

Create(Order, Product, double, StockUnit, PriceInfo)

Adds a new OrderLine to the OrderLineCollection of the Order based on the given Product.

public OrderLine Create(Order order, Product product, double quantity, StockUnit unit, PriceInfo unitPrice)

Parameters

order Order

The Order.

product Product

The Product.

quantity double

The quantity.

unit StockUnit

The stock uint.

unitPrice PriceInfo

The unit price.

Returns

OrderLine

The OrderLine that was added to the Order.

Create(Order, string, double, PriceInfo, OrderLineType, string, string)

Adds a new OrderLine to the OrderLineCollection of the Order with the given OrderLineType and the given text.

public OrderLine Create(Order order, string text, double quantity, PriceInfo unitPrice, OrderLineType type, string parentOrderLineId, string discountId)

Parameters

order Order

The Order.

text string

The line text.

quantity double

The quantity.

unitPrice PriceInfo

The unit price.

type OrderLineType

The order line price.

parentOrderLineId string

The parent order line ID.

discountId string

The discount ID.

Returns

OrderLine

The OrderLine that was added to the Order.

Delete(string)

Deletes the Order line from database.

public void Delete(string orderLineId)

Parameters

orderLineId string

The Order line ID.

DeleteAll(string)

Deletes all order lines from database for a given order including discounts, etc..

public void DeleteAll(string orderId)

Parameters

orderId string

The Order ID.

GetById(string)

Gets the order line by ID.

public OrderLine GetById(string orderLineId)

Parameters

orderLineId string

The Order line ID.

Returns

OrderLine

The OrderLine.

GetById(string, Order)

Gets the order line by ID.

public OrderLine GetById(string orderLineId, Order order)

Parameters

orderLineId string

The order line ID.

order Order

The order.

Returns

OrderLine

GetByOrder(Order)

Gets the lines of the specified order.

public IEnumerable<OrderLine> GetByOrder(Order order)

Parameters

order Order

The Order.

Returns

IEnumerable<OrderLine>

The collection of the OrderLine.

GetOrderLineType(int)

Gets the OrderLineType of the OrderLine.

public OrderLineType GetOrderLineType(int orderLineType)

Parameters

orderLineType int

The integer equivalent of OrderLineType.

Returns

OrderLineType

The OrderLineType.

GetOrderLineType(string)

Gets the OrderLineType of the OrderLine.

public OrderLineType GetOrderLineType(string orderLineType)

Parameters

orderLineType string

The string equivalent of OrderLineType.

Returns

OrderLineType

The OrderLineType.

GetOrderLineUniqueKey(OrderLine)

public static string GetOrderLineUniqueKey(OrderLine orderLine)

Parameters

orderLine OrderLine

Returns

string

GetProductImage(OrderLine, int?)

Returns the path to the product image.

public string GetProductImage(OrderLine orderLine, int? areaId)

Parameters

orderLine OrderLine
areaId int?

The ID of the area.

Returns

string

The path to the product image.

Save(OrderLine)

Saves the order line.

public void Save(OrderLine orderLine)

Parameters

orderLine OrderLine

The Order line.

Save(string, IEnumerable<OrderLine>)

Saves the order lines.

public void Save(string orderId, IEnumerable<OrderLine> orderLines)

Parameters

orderId string

The Order ID of the order lines.

orderLines IEnumerable<OrderLine>

The Order lines.

SetProductInformation(OrderLine, Product)

Sets the product information. Usually used for BOM products.

public void SetProductInformation(OrderLine orderLine, Product product)

Parameters

orderLine OrderLine

The Order line.

product Product

The product.

SetUnitPrice(OrderLine, PriceInfo)

Sets the unit price.

public void SetUnitPrice(OrderLine orderLine, PriceInfo priceInfo)

Parameters

orderLine OrderLine

The Order line.

priceInfo PriceInfo

The unit price.

SetUnitPrice(OrderLine, PriceInfo, bool)

Sets the unit price.

public void SetUnitPrice(OrderLine orderLine, PriceInfo priceInfo, bool forcePriceRecalculation)

Parameters

orderLine OrderLine

The Order line.

priceInfo PriceInfo

The unit price.

forcePriceRecalculation bool

Determines whether the order line price should be recalculated.

SetUnitPrice(OrderLine, double, bool)

Sets the unit price.

public void SetUnitPrice(OrderLine orderLine, double theUnitPrice, bool applyToCurrentProductSettings)

Parameters

orderLine OrderLine

The Order line.

theUnitPrice double

The unit price.

applyToCurrentProductSettings bool

Determines whether price should be applied to the order line product.

SetUnitPrice(OrderLine, double, bool, bool)

Sets the unit price.

public void SetUnitPrice(OrderLine orderLine, double theUnitPrice, bool applyToCurrentProductSettings, bool priceIsWithVat)

Parameters

orderLine OrderLine

The Order line.

theUnitPrice double

The unit price.

applyToCurrentProductSettings bool

Determines whether price should be applied to the order line product.

priceIsWithVat bool

If set, decides if the price provided is with or without vat included

To top