Rank: Administration
Groups: Administration
Joined: 10/8/2008(UTC) Posts: 190  Was thanked: 1 time(s) in 1 post(s)
|
If you want to use delivery costs in other places without typing the code again, You can use this code, this prevents troubles when changing the delivery-costs code. Code:Try
Dim Errorstring As String
If Not pbw.UserEscape_Shop_Calculate_AdditionalCosts("SOURCESHOP05", UserEscapeIndex, cid, False, pbw.Get_RunSource_CreateAssembly, pbw.Get_RunSource_RunFromAssembly(), Server, Request, ShopTotaalprijs, type, Bezorgkosten, Session, constring, "", "", response, Errorstring) Then
Dim pinc, Errstring As String
Dim bzkindex = 0
bzkindex = pbw.UserEscape_Shop_AdditionalCosts_Index("SOURCESHOP06", UserEscapeIndex, cid, False, pbw.Get_RunSource_CreateAssembly, pbw.Get_RunSource_RunFromAssembly(), Server, Request, Session, ShopTotaalprijs, type, constring, "", "", response, Errstring)
pbw.Get_Config(cid, bzkindex, "SHOPBEZORGKOSTEN", pinc, constring)
Bezorgkosten = Val(pinc)
If Bezorgkosten < 0 Then
Bezorgkosten = 0
End If
End If
Catch ex As Exception
Bezorgkosten = 0
End Try
|