We have identified that products can only be checked in the shopping cart if they are standard products with AccProduct.
If we want to check multi-request resources (QERReuse), such as for duplicate checks or compliance checks, we cannot use the standard libraries of One Identity because the logic is embedded deeply within the Customizer DLL.
Currently, we have a script library that we can call as a customization in the shop, but we are unable to make any changes to it.
Our goal is to provide an alternative item to be checked instead of objectkeyorderd, as objectkeyorderd and AccProduct are always the same.
The code we have so far looks like this:
#If Not SCRIPTDEBUGGER Then References NLog.Dll #End If ''' <summary> ''' _CCC_ShoppingCartOrder_Check ''' </summary> ''' <param name="UID_ShoppingCartOrder"></param> ''' <param name="configJson"></param> ''' <returns></returns> Public Function _CCC_ShoppingCartOrder_Check(ByVal UID_ShoppingCartOrder As String, ByVal configJson As String) As String ' Variablen Dim counterror As Integer = 0 Dim countwarning As Integer = 0 Dim culLang As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("de-DE") VI.Base.LanguageManager.SetSystemCulture(culLang) Dim log As NLog.LogSession = New NLog.LogSession(NameOf(_CCC_ShoppingCartOrder_Check),"") ' Erste Variante mit Submit Dim check = New QER.CompositionApi.ITShop.ShoppingCartSubmit(UID_ShoppingCartOrder) Dim ConfigJsonParm As String = check.GetConfigJson check.Check.Config.CheckMode = QER.CompositionApi.ITShop.CheckMode.CheckOnly Dim tCartItemCheckResult As QER.CompositionApi.ITShop.CartItemCheckResult log.Info("Shopping Cart: " & UID_ShoppingCartOrder & " will be checked...") Dim checkResult = check.CheckAsync(Session).Result log.Info("Check Config: ") log.Info(ConfigJsonParm ) ' Für alle Bestellpositionen Dim items = checkResult.Items() For Each tCartItemCheckResult In items ' Bestellpositionen Prüfungen durchführen log.Info(" > Cart Item " & tCartItemCheckResult.ToString & " check result...") Dim itemsChecks = tCartItemCheckResult.checks() ' Für alle gefundenen Prüfungsresultate For Each checks In itemsChecks ' Resulatat ausgeben log.Info(" > ID : " + checks.id + ", Status :" + checks.Status.toString + ", Title :" + checks.title) Select Case checks.Status.toString Case "Warning" countwarning += 1 Case "Error" counterror += 1 Case Else End Select Next Next Return " In " & CStr(items.count) & " Cart Items, there are " & CStr(countwarning) & " warnings and " & CStr(counterror) & " errors." End Function
Any help would be appreciated!