{asp} set colProductVariationJsonObject93d = Server.CreateObject("scripting.dictionary") function GetProductVariationJsonObject(ProductVariationId93d) set GetProductVariationJsonObject = nothing if not colProductVariationJsonObject93d.Exists(cstr(ProductVariationId93d)) then set colProductVariationJsonObject93d(cstr(ProductVariationId93d)) = nothing for i93d = 1 to 2 loc93d = server.Mappath("/shared/Resources/ProductVariations/" & ProductVariationId93d & ".json") set oJsonFromDisk93d = Server.CreateObject("Chilkat_9_5_0.JsonObject") if len(GetFileContent(loc93d)) > 0 then if Int2Bool(oJsonFromDisk93d.Load(loc93d)) then exit for end if if i93d = 1 then sleepms 500 else Err.raise 13431, "ExtendProductVariation Error", "Failed to read extended Json file '" & loc93d & "'" & vbcrlf & oJsonFromDisk93d.LastErrorText next set colProductVariationJsonObject93d(cstr(ProductVariationId93d)) = oJsonFromDisk93d end if set GetProductVariationJsonObject = colProductVariationJsonObject93d(cstr(ProductVariationId93d)) end function function GetProductVariationCardMarkup(oPageData23d, ProductVariationId23d) CurrentLanguageId23d = oPageData23d.StringOf("CurrentLanguageId") GetProductVariationCardMarkup = "" set ProdVarJsonObj23d = GetProductVariationJsonObject(ProductVariationId23d) if not ProdVarJsonObj23d is nothing then with oPageData.ObjectOf("ProductVariationsAvailability") 'isDeleted23d = Int2Bool(.ObjectOf(ProductVariationId23d).BoolOf("IsDeleted")) isActive23d = Int2Bool(.ObjectOf(ProductVariationId23d).BoolOf("IsActive")) isAvailable23d = Int2Bool(.ObjectOf(ProductVariationId23d).BoolOf("IsAvailable")) end with if isActive23d then salechannelIndex23d = ProdVarJsonObj23d.ArrayOf("SaleChannels").FindString(oPageData23d.StringOf("SaleChannelId"), 0) if salechannelIndex23d > -1 then mainImageIndex23d = ProdVarJsonObj23d.ArrayOf("Images").FindObject("IsMainImage", "true", 0) if mainImageIndex23d > -1 then set mainImageObj23d = ProdVarJsonObj23d.ArrayOf("Images").ObjectAt(mainImageIndex23d) GetProductVariationCardMarkup = _ "
" & vbcrlf if JsonType(ProdVarJsonObj23d, "ScreenRibbon") = "Object" then with ProdVarJsonObj23d.ObjectOf("ScreenRibbon") GetProductVariationCardMarkup = GetProductVariationCardMarkup & _ "
" & vbcrlf & _ "
" & vbcrlf & _ htmlencode(.ObjectOf("Text").StringOf(CurrentLanguageId23d)) & vbcrlf & _ "
" & vbcrlf & _ "
" & vbcrlf end with end if GetProductVariationCardMarkup = GetProductVariationCardMarkup & _ "" & vbcrlf & _ "" & vbcrlf & _ "" & vbcrlf & _ "
" & vbcrlf & _ "" & htmlencode(ProdVarJsonObj23d.ObjectOf("DescriptionFull").StringOf(CurrentLanguageId23d)) & "" & vbcrlf & _ "
" & vbcrlf & _ "
" & vbcrlf & _ FormatCurrencyEur(ProdVarJsonObj23d.StringOf("Price")) & vbcrlf if Int2Bool(ProdVarJsonObj23d.BoolOf("DiscountApplicable")) then GetProductVariationCardMarkup = GetProductVariationCardMarkup & _ "  " & FormatCurrencyEur(ProdVarJsonObj23d.StringOf("OriginalPrice")) & "" & vbcrlf end if GetProductVariationCardMarkup = GetProductVariationCardMarkup & _ "
" & vbcrlf & _ "
" & vbcrlf if isAvailable23d then GetProductVariationCardMarkup = GetProductVariationCardMarkup & _ "" & vbcrlf else GetProductVariationCardMarkup = GetProductVariationCardMarkup & _ "" & vbcrlf end if isInWishList = false if JsonType(oPageData, "WishList") = "Object" then isInWishList = (oPageData23d.ObjectOf("WishList").ArrayOf("Items").FindString(ProductVariationId23d, 1) > -1) end if GetProductVariationCardMarkup = GetProductVariationCardMarkup & _ "
" & vbcrlf & _ "" & vbcrlf & _ "
" end if end if end if end if end function {/asp}{asp} 'asp2 include class clsRenderedPage public PageTitle private p_HeaderTitle private p_HeaderDescription public Breadcrumbs public ActiveMenuItem private sub class_initialize() set me.Breadcrumbs = new clsBreadcrumbs end sub public property Let HeaderTitle(val22d) p_HeaderTitle = val22d end property public property Get HeaderTitle() HeaderTitle = "pittigepepers.nl - " & notnull(p_HeaderTitle, me.PageTitle) end property public property Let HeaderDescription(val22e) p_HeaderDescription = val22e end property public property Get HeaderDescription() HeaderDescription = notnull(p_HeaderDescription, "Zelf gemakkelijk hete pepers kweken! Vind hier veel soorten chilipeper zaden. Van mild tot extreem heet.") end property end class class clsBreadcrumbs public BackButtonApplicable public Items private sub class_initialize() me.BackButtonApplicable = false set me.Items = Server.CreateObject("Scripting.Dictionary") end sub public sub Add(title28w, icon28w, url28w) PrivateAdd title28w, icon28w, url28w, false end sub public sub AddCurrent(title28v, icon28v, url28v) 'remove IsCurrent from all other items for each item28v in me.Items set thisItem28v = me.Items.Item(item28v) thisItem28v.IsCurrent = false next PrivateAdd title28v, icon28v, url28v, true end sub private sub PrivateAdd(title28u, icon28u, url28u, isCurrent28u) if me.Items.Count = 0 then set oBreadcrumb28u = new clsBreadcrumb oBreadcrumb28u.Title = null oBreadcrumb28u.Icon = "bi-house-door" oBreadcrumb28u.Url = "/" me.Items.Add cstr(me.Items.Count), oBreadcrumb28u end if set oBreadcrumb28u = new clsBreadcrumb oBreadcrumb28u.Title = title28u oBreadcrumb28u.Icon = icon28u oBreadcrumb28u.Url = url28u oBreadcrumb28u.IsCurrent = isCurrent28u me.Items.Add cstr(me.Items.Count), oBreadcrumb28u end sub end class class clsBreadcrumb public Title, Icon, Url, IsCurrent end class {/asp} {asp} Response.Charset = "utf-8" Response.Codepage = 65001 session.LCID = 1034 set oPageData = Server.CreateObject("Chilkat_9_5_0.JsonObject") oPageData.load session("PageData") set oRenderedPage = new clsRenderedPage {/asp} {asp} oRenderedPage.PageTitle = "Verlanglijst" oRenderedPage.Breadcrumbs.AddCurrent "Verlanglijst", null, null oRenderedPage.ActiveMenuItem = "Wishlist" {/asp} {asp}=htmlencode(oRenderedPage.HeaderTitle){/asp} {asp} set colSitemapPages = Server.CreateObject("scripting.dictionary") colSitemapPages.add "webshop_nl", Server.CreateObject("scripting.dictionary") colSitemapPages.Item("webshop_nl").add "AccWis", "https://www.pittigepepers.nl/account/verlanglijst/||nl-nl" colSitemapPages.add "webshop_be", Server.CreateObject("scripting.dictionary") colSitemapPages.Item("webshop_be").add "AccWis", "https://www.pittigepepers.be/account/verlanglijst/||nl-be" colSitemapPages.add "webshop_eu", Server.CreateObject("scripting.dictionary") colSitemapPages.Item("webshop_eu").add "AccWis", "https://www.valenciaseedfarm.com/account/wishlist/||en" set oURL = new clsURL oURL.SetCurrentURL() curUrl = oURL.CompleteUrl() set oURL = nothing sitemapPageIdentifier = GetSitemapPageIdentifier(curUrl) set colUsedHrefLangLanguages = server.createobject("scripting.dictionary") for each iSitemapSaleChannel in colSitemapPages set thisSitemapSaleChannel = colSitemapPages(iSitemapSaleChannel) if thisSitemapSaleChannel.Exists(sitemapPageIdentifier) then url = split(thisSitemapSaleChannel(sitemapPageIdentifier), "||")(0) hreflang = split(thisSitemapSaleChannel(sitemapPageIdentifier), "||")(1) {/asp} {asp} if instr(hreflang, "-") > 0 then languagecode = split(hreflang, "-")(0) regioncode = split(hreflang, "-")(1) else languagecode = hreflang regioncode = "" end if if not colUsedHrefLangLanguages.exists(languagecode) then colUsedHrefLangLanguages.Add languagecode, server.createobject("scripting.dictionary") colUsedHrefLangLanguages(languagecode).Add regioncode, url if strcomp(hreflang, "nl-NL", vbTextCompare) = 0 then currentSaleChannelUrl = url end if next for each hrefLangLanguage in colUsedHrefLangLanguages if not colUsedHrefLangLanguages(hrefLangLanguage).Exists("") then 'region independent code has already been written saleChannelUrl = "" 'choose region code to also use as region independent if colUsedHrefLangLanguages(hrefLangLanguage).Exists(hrefLangLanguage) then 'region same as language, then use this saleChannelUrl = colUsedHrefLangLanguages(hrefLangLanguage).Item(hrefLangLanguage) else 'choose first for each region in colUsedHrefLangLanguages(hrefLangLanguage) saleChannelUrl = colUsedHrefLangLanguages(hrefLangLanguage).Item(region) exit for next end if {/asp} {asp} end if next {/asp}
{asp} with oRenderedPage if len(.PageTitle) > 0 then {/asp}

{asp}=htmlencode(.PageTitle){/asp}

{asp} end if end with {/asp}
{asp} if JsonType(oPageData, "WishList") = "Object" then set oWishlist = oPageData.ObjectOf("Wishlist") else set oWishlist = Server.CreateObject("Chilkat_9_5_0.JsonObject") oWishlist.AddArrayAt -1, "Items" end if CurrentLanguageId = "nl-NL" {/asp}
{asp} for iProdVar = 0 to oWishlist.ArrayOf("Items").Size -1 ProductVariationId = oWishlist.ArrayOf("Items").StringAt(iProdVar) set thisProductVariation = GetProductVariationJsonObject(ProductVariationId) if not thisProductVariation is nothing then with oPageData.ObjectOf("ProductVariationsAvailability") isDeleted = Int2Bool(.ObjectOf(ProductVariationId).BoolOf("IsDeleted")) isActive = Int2Bool(.ObjectOf(ProductVariationId).BoolOf("IsActive")) isAvailable = Int2Bool(.ObjectOf(ProductVariationId).BoolOf("IsAvailable")) end with mainImageIndex = thisProductVariation.ArrayOf("Images").FindObject("IsMainImage", "true", 0) if mainImageIndex > -1 then set mainImageObj = thisProductVariation.ArrayOf("Images").ObjectAt(mainImageIndex) if isActive then {/asp}
{asp}=htmlencode(mainImageObj.ObjectOf(

{asp}=htmlencode(thisProductVariation.ObjectOf("DescriptionFull").StringOf(CurrentLanguageId)){/asp}

{asp}=FormatCurrencyEur(thisProductVariation.StringOf("Price")){/asp}
Beschikbaarheid: {asp}if isAvailable then{/asp} Op voorraad {asp}else{/asp} Niet op voorraad {asp}end if{/asp}
{asp} end if end if end if next {/asp}
0 then{/asp} hiddenelement{asp}end if{/asp}">Er zitten geen producten in je verlanglijst
{asp} set formMessagesJson = Server.CreateObject("Chilkat_9_5_0.JsonArray") if JsonType(oPageData, "Form") = "Object" then if Int2Bool(oPageData.ObjectOf("Form").HasMember("Errors")) then with oPageData.ObjectOf("Form").ArrayOf("Errors") for iErr = 0 to .Size -1 set thisErr = .ObjectAt(iErr) formMessagesJson.AddObjectAt -1 with formMessagesJson.ObjectAt(formMessagesJson.Size - 1) .AddStringAt -1, "HtmlId", thisErr.StringOf("HtmlId") .AddStringAt -1, "MessageType", "Error" .AddStringAt -1, "Message", thisErr.StringOf("ErrorMessage") end with next end with end if end if {/asp} {asp} set messagesJson = Server.CreateObject("Chilkat_9_5_0.JsonArray") ShowMessageInfo = notnull(oPageData.StringOf("ShowMessageInfo"), request("ShowMessageInfo")) if len(ShowMessageInfo) > 0 then messagesJson.AddObjectAt -1 with messagesJson.ObjectAt(messagesJson.Size - 1) .AddStringAt -1, "MessageType", "Info" .AddStringAt -1, "Message", ShowMessageInfo end with end if ShowMessageSuccess = notnull(oPageData.StringOf("ShowMessageSuccess"), request("ShowMessageSuccess")) if len(ShowMessageSuccess) > 0 then messagesJson.AddObjectAt -1 with messagesJson.ObjectAt(messagesJson.Size - 1) .AddStringAt -1, "MessageType", "Success" .AddStringAt -1, "Message", ShowMessageSuccess end with end if ShowMessageError = notnull(oPageData.StringOf("ShowMessageError"), request("ShowMessageError")) if len(ShowMessageError) > 0 then messagesJson.AddObjectAt -1 with messagesJson.ObjectAt(messagesJson.Size - 1) .AddStringAt -1, "MessageType", "Error" .AddStringAt -1, "Message", ShowMessageError end with end if {/asp} {asp} set geoJson = Server.CreateObject("Chilkat_9_5_0.JsonObject") if JsonType(oPageData, "Session") = "Object" then if JsonType(oPageData.ObjectOf("Session"), "SessionData") = "Object" then geoJson.AddBoolAt -1, "GetGeoCountryCalled", oPageData.ObjectOf("Session").ObjectOf("SessionData").BoolOf("GetGeoCountryCalled") geoJson.AddStringAt -1, "ShippingCountryId", oPageData.ObjectOf("Session").ObjectOf("SessionData").StringOf("ShippingCountryId") end if end if if geoJson.Size = 0 then geoJson.AddBoolAt -1, "GetGeoCountryCalled", false geoJson.AddStringAt -1, "ShippingCountryId", "" end if {/asp} {asp} set sessionJson = Server.CreateObject("Chilkat_9_5_0.JsonObject") sessionJson.AddBoolAt -1, "isVerified", Bool2Int(JsonType(oPageData, "Session") = "Object") sessionJson.AddStringAt -1, "token", SHA512(Session.SessionId) {/asp}