Developer forum

Forum » Development » EcomLoyaltyUserTransaction stores the order id even for transactions of type EcomOrderLine

EcomLoyaltyUserTransaction stores the order id even for transactions of type EcomOrderLine

Emil Dumitrescu
Reply

Hello guys,

In the table EcomLoyaltyUserTransaction, for lines of type EcomOrderLine, Dynamicweb is storing the OrderId and not the OrderLineId. Why is that? Even in code there are contradictions:

When you create a transaction with the LoyaltyRepository.CreateTransaction method, you fill the ObjectElement with the order line id, and then before saving the object Dynamicweb overrides the value of ObjectElement by calling this method:

        Private Shared Function GetTransactionObjectElement(transaction As UserTransaction) As String
            ...

            Return transaction.Order.Id
        End Function

and the Order property on the transaction object is defined like this:
                If _objectType = TransactionObjectType.EcomOrderLine Then
                    Dim orderLine As OrderLine = Services.OrderLines.GetById(ObjectElement)
                    If orderLine IsNot Nothing Then
                        Return orderLine.Order
                    End If
                End If               

               Return Nothing

So, we are passing the OrderLineId in the ObjectElement property, and then Dynamicweb based on it overrides that value with its OrderId after getting the line, and then its order. Then, when someone will call again the Order property on that transaction, the order will not be found, as the Order property expects in the ObjectElement property to be an order line id, and not an order id.

Regards,

Emil


Replies

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Emil,

I register the bug #65419 to fix this asap.
Sorry for troubles!

Best regards,
Vladimir

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Emil

The problem regarding #65419 "EcomLoyaltyUserTransaction stores the order id instead orderline id" has now been resolved in Dynamicweb version 9.6.10

To upgrade please choose this version from download:

http://doc.dynamicweb.com/releases-and-downloads/releases

Let me know if you need any more help regarding this

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Emil Dumitrescu
Reply

All right, thanks!

 

You must be logged in to post in the forum