Class OrderLineService
- Namespace
- Dynamicweb.Ecommerce.Orders
- Assembly
- Dynamicweb.Ecommerce.dll
- Inheritance
-
Order
Line Service
- Inherited Members
Methods
AddOrderLineCopy(Order, OrderLine, bool)
Adds a copy of the specified order line.
Parameters
order
OrderThe Order.
orderLineToCopy
OrderLine The order line.
doMerge
boolif set to
true
try to merge.
CanBeMerged(OrderLine, OrderLine)
Determines whether the orderLine
can be merged with the another
order line.
Parameters
Returns
- bool
true
if theorderLine
can be merged withanother
order line; otherwise,false
.
ClearCachedPrices(OrderLine)
Clears the cached price.
Parameters
orderLine
OrderLine The Order line.
Create(Order, Product, double, StockUnit, PriceInfo)
Adds a new Order
public OrderLine Create(Order order, Product product, double quantity, StockUnit unit, PriceInfo unitPrice)
Parameters
order
OrderThe Order.
product
ProductThe Product.
quantity
doubleThe quantity.
unit
StockUnit The stock uint.
unitPrice
PriceInfo The unit price.
Returns
Create(Order, string, double, PriceInfo, OrderLineType, string, string)
Adds a new Order
public OrderLine Create(Order order, string text, double quantity, PriceInfo unitPrice, OrderLineType type, string parentOrderLineId, string discountId)
Parameters
order
OrderThe Order.
text
stringThe line text.
quantity
doubleThe quantity.
unitPrice
PriceInfo The unit price.
type
OrderLine Type The order line price.
parentOrderLineId
stringThe parent order line ID.
discountId
stringThe discount ID.
Returns
Delete(string)
Deletes the Order line from database.
Parameters
orderLineId
stringThe Order line ID.
DeleteAll(string)
Deletes all order lines from database for a given order including discounts, etc..
Parameters
orderId
stringThe Order ID.
GetById(string)
Gets the order line by ID.
Parameters
orderLineId
stringThe Order line ID.
Returns
GetById(string, Order)
Gets the order line by ID.
Parameters
Returns
GetByOrder(Order)
Gets the lines of the specified order.
Parameters
order
OrderThe Order.
Returns
- IEnumerable<Order
Line > The collection of the Order
Line .
GetOrderLineType(int)
Gets the Order
Parameters
orderLineType
intThe integer equivalent of Order
Line .Type
Returns
GetOrderLineType(string)
Gets the Order
Parameters
orderLineType
stringThe string equivalent of Order
Line .Type
Returns
GetOrderLineUniqueKey(OrderLine)
Parameters
orderLine
OrderLine
Returns
Save(OrderLine)
Saves the order line.
Parameters
orderLine
OrderLine The Order line.
Save(string, IEnumerable<OrderLine>)
Saves the order lines.
Parameters
orderId
stringThe Order ID of the order lines.
orderLines
IEnumerable<OrderLine >The Order lines.
SetProductInformation(OrderLine, Product)
Sets the product information. Usually used for BOM products.
Parameters
SetUnitPrice(OrderLine, PriceInfo)
Sets the unit price.
Parameters
SetUnitPrice(OrderLine, PriceInfo, bool)
Sets the unit price.
Parameters
orderLine
OrderLine The Order line.
priceInfo
PriceInfo The unit price.
forcePriceRecalculation
boolDetermines 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
doubleThe unit price.
applyToCurrentProductSettings
boolDetermines 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)