Hi Dynamicweb,
I have at problem where the cart is cleared after the session is expired. It is due to this code part in: Order.vb
For Each orderLine As OrderLine In OrderLines
If orderLine.Type = Base.ChkString(Base.ChkInteger(orderLine.OrderLineType.Product)) Then
If Not String.IsNullOrEmpty(orderLine.Product.ID) Then
ids.Add(orderLine.Product.ID)
End If
productLines.Add(orderLine)
End If
Next
'Get the products that match the ids
Dim productsFromDatabase As ProductCollection
If ids.Count() = 0 Then
productsFromDatabase = New ProductCollection()
Else
productsFromDatabase = Product.GetProductsByProductIDs(ids.ToArray(), False)
End If
If productsFromDatabase.Count() = 0 Then
If Me.IsCart Then
Me.Delete()
Context.CartSession.Remove(Context.SessionCartKey)
End If
Else
All products is removed as the SetUnitPrice on the orderline sets the "Type" as "fixed" and then all products will be removed due this check:
If orderLine.Type = Base.ChkString(Base.ChkInteger(orderLine.OrderLineType.Product)) Then
Please help me to fix this problem as I get some other troubles when forcing the type back to "Product" after setting the unitprice.
Best regards, Anders