Developer forum

Forum » Development » Import favorites with the api

Import favorites with the api

Anders Ebdrup
Reply

Hi Dynamicweb,

 

When trying to import favorites with the api I have a bit of a problem with the line marked with red:

        Public Shared Sub AddToFavorites(ByVal ProductID As String, ByVal VariantID As String,
                                         ByVal LanguageID As String, ByVal listName As String,
                                         ByVal listType As String,
                                         ByVal listDescription As String,
                                         ByVal FavoriteListID As Integer)

            Dim uID As Integer = New Dynamicweb.Frontend.Extranet().UserID
            If uID = 0 Then Exit Sub

            Dim defaultFavoritesList As Integer = 0

 

Could you please make an overloaded method with takes the userId as a parameter instead of relying on the session in the method?

 

Best regards, Anders


Replies

 
Nicolai Høeg Pedersen
Reply

Added the overload (TFS#19084) for branches 8.6.1, 8.7 and 8.7.1. Due with next release of each of them.

 

You must be logged in to post in the forum