Din sökning
No hits.

Hittar inte det du söker efter?

Ta kontakt med en av våra säljare här så hjälper vi dig eller skriv till oss direkt i chatten nu!

Exception in template (eCom/Productlist/Prendo_ProductList-WithIndex.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.cbbafbdddf.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@{ if (GetString("Ecom:Group:Field.ForwardUrl") != "") { string url = @GetString("Ecom:Group:Field.ForwardUrl.Value.Clean"); System.Web.HttpContext.Current.Response.Redirect(url); } var showFrom = ""; var hideMenu = ""; var hideSideBar = ""; var productColumnWidth = "12"; //var productWidth = "col-xs-6 col-md-4 col-lg-4"; var productWidth = "col-xs-6 col-md-3 col-lg-3"; hideSideBar = "style='display:none'"; if (Convert.ToBoolean(@Pageview.Area.Item["ProductListHideSideBar"]) == true) { hideSideBar = "style='display:none'"; productColumnWidth = "12"; productWidth = "col-xs-6 col-md-3 col-lg-3"; } var queryString = System.Web.HttpContext.Current.Request.QueryString["eComQuery"]; } <div class="div-max1170-centered"> <div class="row"> <div class="col-sm-@productColumnWidth print-hide filter-wrapp"> <section class="content-intro"> <div class="div-max1170-centered"> <div class="row"> <div class="col-md-12 col-sm-12"> <h1>@GetValue("Ecom:Group.Name")</h1> <span class="yourFiltering">Din sökning på <strong>@queryString</strong> visar</span> <b class="cat-count">@GetValue("Ecom:ProductList.PageProdCnt") PRODUKTER</b> @if (!string.IsNullOrEmpty(@GetString("Ecom:Group.Description"))) { <div class="leadList"> @GetString("Ecom:Group.Description") </div> } </div> </div> <div class="row"> <div class="col-md-12 col-sm-12"> <div id="filterBox" class=""> <script> $(document).ready(function () { $(".menuFilterBox").click(function () { $(".menuFilterboxContent").toggle(); $(".priceFilterboxContent").hide(); $(".supplierFilterboxContent").hide(); $(".menuFilterBox").toggleClass("filterboxInView"); $(".priceFilterBox").removeClass("filterboxInView"); $(".supplierFilterBox").removeClass("filterboxInView"); }); $(".priceFilterBox").click(function () { $(".priceFilterboxContent").toggle(); $(".menuFilterboxContent").hide(); $(".supplierFilterboxContent").hide(); $(".priceFilterBox").toggleClass("filterboxInView"); $(".menuFilterBox").removeClass("filterboxInView"); $(".supplierFilterBox").removeClass("filterboxInView"); }); $(".supplierFilterBox").click(function () { $(".supplierFilterboxContent").toggle(); $(".menuFilterboxContent").hide(); $(".priceFilterboxContent").hide(); $(".supplierFilterBox").toggleClass("filterboxInView"); $(".menuFilterBox").removeClass("filterboxInView"); $(".priceFilterBox").removeClass("filterboxInView"); }); }); function SortProductsBy(sortcode) { var currentUrl = "<!--@Global:Pageview.Url-->"; var includesPriceAsc = currentUrl.includes("Price&SortOrder=Asc"); var includesPriceDesc = currentUrl.includes("Price&SortOrder=Desc"); var includesQuery = currentUrl.includes("?"); var newUrl = ""; if (includesPriceAsc == true) { newUrl = currentUrl.replace("Price&SortOrder=Asc", sortcode); } else if (includesPriceDesc == true) { newUrl = currentUrl.replace("Price&SortOrder=Desc", sortcode); } else if (includesQuery == true) { newUrl = currentUrl + "&SortBy=" + sortcode; } else { newUrl = currentUrl + "?SortBy=" + sortcode; } document.cookie = "sortby=" + sortcode; document.location.href = newUrl; } </script> <!--<div class="FilterHeader" style="width: 100%;">Kategorier</div>--> <div class="filterControls"> <div class="menuFilterBox filterBox"> <div class="filterBoxTitle FilterHeader">Kategorier</div> </div> @*<div class="priceFilterBox filterBox"> <div class="filterBoxTitle FilterHeader">Pris <span id="resetPrice" class="resetFilter">Återställ</span></div> </div>*@ <div class="supplierFilterBox filterBox"> <div class="filterBoxTitle FilterHeader">Varumärke</div> </div> <div class="dropdown sortPrice" style=""> <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> <span class="fa fa-arrows-v"></span>&nbsp;&nbsp;&nbsp;Sortera efter pris <span class="caret"></span> </button> <ul class="dropdown-menu"> <li><a onclick="SortProductsBy('Price&amp;SortOrder=Asc')" class="pill-left"><span class="fa fa-long-arrow-up"></span>&nbsp;&nbsp;&nbsp;Stigande pris</a></li> <li><a onclick="SortProductsBy('Price&amp;SortOrder=Desc')" class="pill-left"><span class="fa fa-long-arrow-down"></span>&nbsp;&nbsp;&nbsp;Fallande pris</a></li> </ul> </div> </div> @{ var brandsMainGroup = (Pageview.Area.Item["Brands_Group"] ?? "").ToString(); // This is the brands main groupID var brandsGroups = Dynamicweb.eCommerce.Products.Group.GetGroupByID(brandsMainGroup).Subgroups.Select(g => g.ID).ToList(); } @foreach (var fg in GetLoop("FacetGroups")) { foreach (var fs in fg.GetLoop("Facets")) { var facetOptions = fs.GetLoop("FacetOptions"); var groupList = facetOptions.Where(g => !brandsGroups.Contains(g.GetString("Ecom:Group.ID"))).ToList(); var brandsList = facetOptions.Where(g => brandsGroups.Contains(g.GetString("Ecom:Group.ID"))).ToList(); <div class="menuFilterboxContent"> <ul class="categories-list-container"> @foreach (var group in groupList) { var url = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(string.Format("Default.aspx?ID={0}&amp;GroupID={1}", Pageview.Area.Item["ProductPage"], group.GetString("Ecom:Group.ID"))); <li> <a href="@url">@group.GetString("Ecom:Group.Name")</a> </li> } </ul> </div> <div id="Supplier-filter" class="supplierFilterboxContent" style="display: none;"> <ul class="categories-list-container"> @foreach (var group in brandsList) { var url = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(string.Format("Default.aspx?ID={0}&amp;GroupID={1}", Pageview.Area.Item["ProductPage"], group.GetString("Ecom:Group.ID"))); <li> <a href="@url">@group.GetString("Ecom:Group.Name")</a> </li> } </ul> </div> } } </div> </div> </div> </section> <div class="col-sm-12 productlist-wrapp"> <div class="row productlist-images fixed-height-boxes"> <!-- BEGIN List products --> @{ //var sortByName = "Ecom:Product.Name"; //var sortByPrice = "Ecom:Product.ActualPrice"; } @* @foreach (LoopItem i in GetLoop("Products").OrderBy(g => g.GetString(@sortByPrice)).ToList()) *@ @foreach (LoopItem i in GetLoop("Products")) { var prodnumber = i.GetValue("Ecom:Product.Number"); var prodName = i.GetValue("Ecom:Product.Name"); var prodSymbol = i.GetString("Ecom:Product:Field.NIQSymbols.Value.Clean"); var imgsrc = "admin/public/getimage.ashx?Image=/Files/Images/produktbilder/" + @prodnumber + "/" + @prodnumber + "_1.jpg&Format=jpg&Compression=90&height=330&crop=0&altFmImage_path=/Files/Images/NoImageAvailable.png"; <div class="@productWidth"> @if ((prodSymbol) != "") { <div id="featuredProductIcons"> <div id="_@prodnumber-0"></div> <div id="_@prodnumber-1"></div> <div id="_@prodnumber-2"></div> <div id="_@prodnumber-3"></div> <div id="_@prodnumber-4"></div> <div id="_@prodnumber-5"></div> <script> // Print out all symbols - Variables = Symbolnames (comma separated) | product number | is product page | is new products | is featured product printFeaturedProductSymbol("@prodSymbol", "@prodnumber", false, false, false); </script> </div> } <div class="thumbnail dropdown-info"> <!-- Field values and tag names --> @if (i.GetString("Ecom:Product:Field.OnDemandProdukt.Value.Clean") == "True") { <div id="OnDemandSplashList"></div> } @if (i.GetString("Ecom:Product:Field.ReaProdukt.Value.Clean") == "True") { <div id="reaSplashList"></div> } @if (i.GetString("Ecom:Product:CustomFields.ReaProdukt.Value.Clean") == "kamp") { <div id="kampanjSplashList"></div> } <a href="Default.aspx?ID=@Pageview.Area.Item["Page_ProductPage"]&GroupID=@i.GetValue("Ecom:Product.PrimaryOrFirstGroupID")&ProductID=@i.GetValue("Ecom:Product.ID")"> <div class="display-img"> <img alt="@prodName" data-original="@imgsrc" class="img-responsive lazy originalThumb-@prodnumber"> </div> <div class="display-name"> <div class="name-info"> <div class="itemName">@prodName</div> @if (Convert.ToBoolean(@Pageview.Area.Item["ProductListShowFrom"]) == true) { showFrom = "style='display:inline-block'"; } <div class="itemPrice" id='id_@prodnumber'> <span @showFrom class="fromText">från </span><span class="fromPrice"></span> <b> </b> <script type="text/javascript"> var price; $(document).ready(function () { if (getCookie('vatsetting') == 'optionInkl') { price = "@i.GetString("Ecom:Product.Price.PriceWithVATFormatted").Replace('.', ' ').Replace(',', '.')"; } else { price = "@i.GetString("Ecom:Product.Price.PriceWithoutVATFormatted").Replace('.', ' ').Replace(',', '.')"; } //added this again if (price === "0.00 Kr") { price = "Kostnadsfri"; } $('#id_@prodnumber').find("b").html(price); $('.active-item').parent().parent().prev().addClass('active-item-level2'); $("ul.level-1 > li > a").addClass('level1-category'); }); </script> @if (i.GetValue("Ecom:Product.Price.Clean") != i.GetValue("Ecom:Product.ActualPrice.Clean")) { <span>(@i.GetString("Ecom:Product.ActualPrice").Replace('.', ' ').Replace(',', '.'))</span> } <!-- Field values and tag names --> <div id="Temp-div-move" style="display: none"> @if (i.GetString("Ecom:Product:Field.OnDemandProdukt.Value.Clean") == "True") { <span>On demand</span> } @if (i.GetString("Ecom:Product:Field.ReaProdukt.Value.Clean") == "True") { <span> rea </span> } <br /> <span> DeliveryTime: @i.GetValue("Ecom:Product:Field.DeliveryTime.Value.Clean") <br /> MinimumQuantity: @i.GetValue("Ecom:Product:Field.MinimumQuantity.Value.Clean") <br /> RecRetailPrice: @i.GetString("Ecom:Product:Field.RecRetailPrice.Value.Clean").Replace('.', ' ').Replace(',', '.') <br/> OnDemandProdukt: @i.GetString("Ecom:Product:Field.OnDemandProdukt.Value.Clean") </span> </div> </div> @{ var productId = i.GetString("Ecom:Product.ID"); //get labels for dim. var labelMeta = ""; var loopCombinationsExMeta = i.GetLoop("VariantCombinationsEx"); if (loopCombinationsExMeta != null && loopCombinationsExMeta.Count > 0) { var firstvariantMeta = loopCombinationsExMeta[0]; var productVariantMeta = Dynamicweb.eCommerce.Products.Product.GetProductByID(productId, firstvariantMeta.GetString("VariantID"), true); if (productVariantMeta != null) { labelMeta = productVariantMeta.GetProductFieldValue("VariantDim1Label").ToString(); } } var dim2loop = i.GetLoop("Dimension1"); var dim2Count = dim2loop.Count; if (labelMeta == "Färg" & dim2Count > 1) { var displayTheColours = i.GetLoop("Dimension1"); var displayTheColoursCount = displayTheColours.Count; if (displayTheColoursCount > 0) { <div class="vis-hide-colours"> <script> function colourNameToVariantCode(colour) { var colours = { "ABA PMS 2945C":"AB1", "ABA white":"AB2", "Vit":"C01", "Svart":"C02", "Röd":"C03", "Grön":"C04", "Blå":"C05", "Gul":"C06", "Grå":"C07", "Lila":"C08", "Orange":"C09", "Lime":"C0A", "Mörkblå":"C0B", "Mörkröd":"C0C", "Royalblå":"C0E", "Rosa":"C0F", "Cerise":"C0G", "Ljusblå":"C0H", "Ljus royalblå":"C0I", "Turkos":"C0J", "Khaki":"C0K", "Ljusgrön":"C0L", "Klargrön":"C0M", "Klargul":"C0N", "Mörkgrön":"C0O", "Vinröd":"C0P", "Mörklila":"C0Q", "Askgrå":"C0R", "Gråmelerad":"C0S", "Mörkgrå":"C0T", "Beige":"C0U", "Natur":"C0V", "Brun":"C0X", "Transparent":"C0Y", "Svart/Vit":"C0Z", "Guld":"C10", "Rostfri":"C11", "Matt svart":"C12", "Ljusgrå":"C13", "Ljuslila":"C14", "Koppar":"C15", "Rostfri blank":"C16", "Mässing":"C17", "Kopparbrun":"C18", "Matt lila":"C19", "Oceanblå":"C1A", "Patinagrön":"C1B", "Saffran":"C1C", "Svart/Sand":"C1D", "Sand/Vit":"C1E", "Vit/M.blå":"C1F", "Flerfärgad":"C1G", "Denim":"C1H", "Mönstrad":"C1J", "Blå/Vit":"C1K", "Vanilj":"C1L", "Svart/Röd":"C1M", "M.grå/Svart":"C1N", "Lj.grå/Svart":"C1O", "M.blå/Röd":"C1P", "Röd/Svart":"C1Q", "Sten":"C1R", "Sten/Svart":"C1S", "Sten/Mörkblå":"C1T", "Svart/Gul":"C1U", "Svart/Grå":"C1V", "Grön/Gul":"C1X", "Grön/Vit":"C1Y", "Gul/Svart":"C1Z", "Grå/Svart":"C20", "M.blå/Gul":"C21", "M.blå/Vit":"C22", "Röd/Vit":"C23", "Royal/Gul":"C24", "Royal/Vit":"C25", "Svart/Vit/Gul":"C26", "Svart/Vit/Grå":"C27", "Svart/Vit/Röd":"C28", "M.grå/Vit/Svart":"C29", "Mblå/Vit/Orange":"C2A", "M.blå/Vit/Röd":"C2B", "Sten/Vit/Svart":"C2C", "Sten/Vit/M.blå":"C2D", "Lera":"C2E", "Rost":"C2F", "Vit/Svart":"C2G", "Vit/Röd":"C2H", "Neongul":"C2I", "Bordeaux":"C2J", "Ljusrosa":"C2K", "Fransk blå":"C2L", "Lj.royalblå/Gul":"C2M", "Mörkblå/Vit":"C2N", "Gul/Lj.royalblå":"C2O", "Smaragd":"C2P", "Klarröd":"C2Q", "Indigo":"C2R", "Vit/Royal":"C2S", "Royal/Svart":"C2T", "Klarblå":"C2U", "M.blå/Grå":"C2V", "Koboltblå":"C2X", "Mörk orange":"C2Y", "Blå/Mörkblå":"C2Z", "Röd/Mörkblå":"C30", "Vit/Turkos":"C31", "Vit/Orange":"C32", "Turkos/Vit":"C33", "Benvit":"C34", "Orange/Vit":"C35", "Neongrön":"C36", "Neonrosa":"C37", "Svart/Grön":"C38", "Svart/Klarblå":"C39", "Svart/Klargrön":"C3A", "Sand":"C3B", "Azur":"C3C", "Buteljgrön":"C3D", "Cyan":"C3E", "Mocka":"C3F", "Koksgrå":"C3G", "Korall":"C3H", "Aqua":"C3I", "Mint":"C3J", "Grå/Mix":"C3K", "Röd/Mix":"C3L", "Snömelerad":"C3M", "Neonorange":"C3N", "Kitt":"C3O", "Grafitmelerad":"C3P", "Äppelgrön":"C3Q", "Kungsblå":"C3R", "Silver/Svart":"C3S", "Silver blank":"C3T", "Silver matt":"C3U", "Vit/Ljusblå":"C3V", "Chili Pepper":"C3X", "Crown Blue":"C3Y", "Stone Grey":"C3Z", "Canvas":"C40", "Salt":"C41", "Peppar":"C42", "1-färgstryck":"C43", "2-färgstryck":"C44", "3-färgstryck":"C45", "4-färgstryck":"C46", "Diamond check":"C47", "Season":"C48", "Grönska":"C49", "City":"C4A", "Sail lodge":"C4B", "Fauna":"C4C", "Farbror Blå":"C4D", "Pyrola":"C4E", "Fam. Jordgubbe":"C4F", "Videung":"C4G", "Maskrosor":"C4H", "Tant Gredelin":"C4I", "Tant Grön":"C4J", "Silver":"C4K", "Svart/Orange":"C4L", "Röd/Grå":"C4M", "Black Thunder":"C4N", "Vit/Grön/Svart":"C4O", "Svart/Orange/Vit":"C4P", "Röd/Svart/Grå":"C4Q", "Turkos/Svart":"C4R", "Vit/Blå/Röd":"C4S", "Fishboat":"C4T", "Berkshire":"C4U", "Seaside flags":"C4V", "Retro":"C4X", "Grå/Vit":"C4Y", "Stål":"C4Z", "Röd/Gul":"C50", "Silvergrå":"C51", "Petrolmelerad":"C52", "Orangemelerad":"C53", "Svart/Blå":"C54", "Vit/Blå":"C55", "Vit/Silver":"C56", "Mellanblå":"C57", "Alu/Svart":"C58", "Vit/Mörkgrå":"C59", "Grafit":"C5A", "Satin silver":"C5B", "Vinröd/Svart":"C5C", "Blå/Svart":"C5D", "Gunmetal/Svart":"C5E", "Satin nickle":"C5F", "Gunmetal":"C5G", "Svart/Silver":"C5H", "Vit/Roséguld":"C5I", "Svart/Guld":"C5J", "Vit/Vinröd":"C5K", "Matt silver":"C5L", "Vit/Grön":"C5M", "Silver/Vit":"C5N", "Antracitgrå":"C5O", "Aluminium":"C5P", "Svart/Alu":"C5Q", "Blå/Alu":"C5R", "Gul/Alu":"C5S", "Satin krom":"C5T", "Vit/Gul":"C5U", "Vit/Mellanblå":"C5V", "Vit/Lila":"C5X", "Grå/Vinröd":"C5Y", "Grå/Mörkgrå":"C5Z", "Grå/Mörkblå":"C60", "Grå/Petrol":"C61", "Grå/Grön":"C62", "Grå/Skogsgrön":"C63", "Grå/Röd":"C64", "Champagne":"C65", "Petrol":"C66", "Vit/Grå":"C67", "Skogsgrön":"C68", "Aprikos":"C69", "Pärlvit":"C6A", "Ljusgul":"C6B", "Vit/Transparent":"C6C", "Ljusblå/Turkos":"C6D", "Mörkorange":"C6E", "Babyblå":"C6F", "Blå frost":"C6G", "Vit frost":"C6H", "Röd frost":"C6I", "Grön frost":"C6J", "Orange frost":"C6K", "Gul frost":"C6L", "Rosa frost":"C6M", "Svart solid":"C6N", "Vit solid":"C6O", "Ljusgrön frost":"C6P", "Blå transparent":"C6Q", "Grön transparent":"C6R", "Svart transparent":"C6S", "Orange transparent":"C6T", "Röd transparent":"C6U", "Silver/Ljusblå":"C6V", "Silver/Röd":"C6X", "Mörkblå/Silver":"C6Y", "Ljusblå/Silver":"C6Z", "Vit transparent/Silver":"C71", "Grön/Silver":"C72", "Gul/Silver":"C73", "Orange/Silver":"C74", "Röd/Silver":"C75", "Vit solid/Silver":"C76", "Svart solid/Silver":"C77", "Blå/Transparent":"C78", "Grön/Transparent":"C79", "Orange/Transparent":"C7A", "Röd/Transparent":"C7B", "Lila/Transparent":"C7C", "Klar/Transparent":"C7D", "Ljusgrön/transparent":"C7E", "Rosa/Transparent":"C7F", "Gul solid":"C7G", "Mörkblå solid":"C7H", "Röd solid":"C7I", "Silver/Blå":"C7J", "Silver/Grön":"C7K", "Silver/Orange":"C7L", "Silver/Grå":"C7M", "Silver/Klar":"C7N", "Gul/Transparent":"C7O", "Lila transparent":"C7P", "Lila/Silver":"C7Q", "Silver/Lila":"C7R", "Rosa transparent":"C7S", "Gul transparent":"C7T", "Blå metallic":"C7U", "Röd metallic":"C7V", "Rosa metallic":"C7X", "Orange metallic":"C7Y", "Vit/Rosa":"C7Z", "Glasklar/Silver":"C81", "Svart transparent/Silver":"C82", "Silver solid":"C83", "Glasklar":"C84", "Mörkblå transparent":"C85", "Ljusblå transparent":"C86", "Mörkgrön transparent":"C87", "Vit solid (svart bläck)":"C88", "Silver (svart bläck)":"C89", "Vit/Svart/Transparent":"C8A", "Vit/Grå solid":"C8B", "Silver/Gul":"C8C", "Svart/Transparent":"C8D", "Grön/Svart":"C8E", "Guld/Svart":"C8F", "Grå frost":"C8G", "Silver metallic":"C8H", "Svart blank":"C8I", "Mörkblå blank":"C8J", "Lila blank":"C8K", "Grön blank":"C8L", "Vit blank":"C8M", "Titanium":"C8N", "Svart metallic":"C8O", "Aluminium/Svart":"C8P", "Ljusblå/Svart":"C8Q", "Orange/Svart":"C8R", "Mörkblå/Svart":"C8S", "Blandade transparenta färger":"C8T", "Blå/Grå":"C8U", "Orange/Grå":"C8V", "Grön/Grå":"C8X", "Svart frost":"C8Y", "Mörk cerise":"C8Z", "Vit/Vit":"C91", "Mörkblå frost":"C92", "Mörkgrön frost":"C93", "Isblå frost":"C94", "Vinröd frost":"C95", "Lila frost":"C96", "Mellanblå frost":"C97", "Transparent vit":"C98", "Stål/Svart":"C99", "Gul/Grå":"C9A", "Borstat stål":"C9B", "Krom":"C9C", "Mörkgrå/Silver":"C9D", "Blå/Silver":"C9E", "Grön metallic":"C9F", "Rosa/Lime":"C9G", "Orange/Turkos":"C9H", "Gul/Blå":"C9I", "Blå/Grön":"C9J", "Blandade färger":"C9K", "Bärnsten":"C9L", "Brun/Turkos":"C9M", "Turkos/Orange":"C9N", "Röd/Lila":"C9O", "Grön/Brun":"C9P", "Blå/Vit/Röd":"C9Q", "Röd/Svart/Vit":"C9R", "Grå/Ljusgrå":"C9S", "Svart/Krom":"C9T", "Svart/Oxid":"C9U", "Vit/Beige":"C9V", "Choklad":"C9X", "Svart marmor":"C9Y", "Ljusblå rutig":"CA1", "Ljusblå randig":"CA2", "Blå rutig":"CA3", "Grå rutig":"CA4", "Fossil brown":"CA5", "Blue sky":"CA6", "Svartmelerad":"CA7", "Denim melerad":"CA8", "Vinröd melerad":"CA9", "Chokladbrun":"CB1", "Kiwi":"CB3", "Lavendel":"CB4", "Ljus lime":"CB5", "Ljus Fuchsia":"CB6", "Mörkblå melerad":"CB7", "Hallon":"CB8", "Marin/Turkos":"CB9", "Korall/Mörkgrå":"CC1", "Flintstone":"CC2", "Svart/Kol":"CC3", "Atollblå":"CC4", "Divablå":"CC5", "Himmelsblå":"CC6", "Ljusgråmelerad":"CC7", "Pistachgrön":"CC8", "Ljusröd":"CC9", "Jeansblå":"CD1", "Lindblomsgrön":"CD2", "Mintgrön":"CD3", "Mörkgul":"CD4", "Mörkturkos":"CD5", "Svartgrå":"CD6", "Mörkbrun":"CD7", "Magenta":"CD8", "Gräsgrön":"CD9", "Klar turkos":"CE1", "Kornblå":"CE2", "Havsgrön":"CE3", "Limegul":"CE4", "Mossgrön":"CE5", "Senap":"CE6", "Olivgrön":"CE7", "Roströd":"CE8", "Plommon":"CE9", "Solgul":"CF1", "Stenblå":"CF2", "Solorange":"CF3", "Havsblå":"CF4", "Ljus turkos":"CF5", "Cosmos black":"CF6", "Flame red":"CF7", "Grå transparent":"CG1", "Svart/Lime":"CG2", "Vit/Lime":"CG3", "Gul metallic":"CG4", "Svart Bright":"CH1", "Blygrå":"CH2", "Rubinröd":"CH3", "Ljusblå/Lila":"CH4", "Kung Vinter":"CH5", "Sotare":"CH6", "Dimblå":"CH8", "Brons":"CH9", "Lavendelblå":"CI1", "Salviagrön":"CI2", "Pelargonrosa":"CI3", "Svart/Ljusgrå":"CI4", "Marin/Ljusblå":"CI5", "Grå/Antracit":"CI6", "Blåmelerad":"CI7", "Palermo":"CI8", "Pisa":"CI9", "Almalfi":"CIA", "Pacino":"CIB", "M.Blå/Svart":"CIC", "Olive/Svart":"CID", "Asfalt/Neongul":"CIF", "Asfalt/Neongul/Gråmelerad":"CIG", "Svart/Vit/Gråmelerad":"CIH", "Klarröd/Svart/Gråmelerad":"CII", "Khaki grön":"CIJ", "Mörkgråmelerad":"CIK", "Grön/Svart/Gråmelerad":"CIL", "Mörkblå/Vit/Gråmelerad":"CIM", "Gråmelerad/Vit":"CIN", "Grön marmor":"CIO", "Mauve":"CIP", "Ljusgrå/Blå":"CIQ", "Metallic":"CIR", "Rök Blå":"CIS", "Ljusgrå/Röd":"CIT", "Mörkgrå/Ljusgrå":"CIU", "MörkGrå/Vit":"CIV", "Röd/Gul/Blå":"CIX", "Gul/Grå":"CIY", "Blå/Svart/Röd":"CIZ", "Blå/Röd":"CJA", "Gul/Rosa/Blå/Grå":"CJB", "Jordgubbsröd":"CJD", "Citrusgul":"CJR", "Bubbelgum":"CJT", "Coral":"CJU", "Magenta":"CJV", "Rosrosa":"CJY", "Babyrosa":"CKA", "Midnattsblå":"CKC", "Himmelsblå":"CKF", "Stålgrå":"CKH", "Mellanbrun":"CKJ", "Armygrön":"CKL", "Grafit/Svart":"CKN", "Lime/Vit":"CKP", "Mörkblå/Röd":"CKQ", "Fuchsia melerad":"CKR", "Rödmelerad":"CKS", "GEMI PMS 172":"GM1", "GEMI white":"GM2", "NORMA GROUP PMS 287C":"NG1", "NORMA GROUP white":"NG2", "NORMA PMS 287C":"NO1", "NORMA white":"NO2", }; if (typeof colours[colour] != 'undefined') return colours[colour]; return false; } function changeThumbnail(prodnumber, variantColourName) { var variantColourCode = colourNameToVariantCode(variantColourName); var originalThumb = ".originalThumb-" + prodnumber; var variantImageUrl = "/admin/public/getimage.ashx?Image=/Files/Images/produktbilder/" + prodnumber + "/variants/" + variantColourCode + "/" + prodnumber + "_" + variantColourCode + "_1.jpg&Format=jpg&Compression=90&height=330&crop=0&altFmImage_path=/Files/Images/NoImageAvailable.png"; $(originalThumb).attr("src", variantImageUrl); //var folder = "/Files/Images/produktbilder/" + prodnumber + "/variants/" + variantColourCode + "/"; //$.ajax({ // url : folder, //success: function (data) { // $(data).find("a").attr("href", function (i, val) { // if( val.match(/\.(jpe?g|png|gif)$/) ) { // $("body").append( "<img src='"+ folder + val +"'>" ); // console.log("test"); //} //}); // } //}); } </script> @{ int counter = 1; } @foreach (var variant in displayTheColours) { var variantColourName = variant.GetValue("Value"); /* //First get the directory on which your all your images reside string strDirectory = System.Web.HttpContext.Current.Server.MapPath("/Files/Images/produktbilder/" + prodnumber); //Get all files on the directory and store it on string array string[] strFiles = System.IO.Directory.GetFiles(strDirectory); string strFileName = string.Empty; //Loop on each file and attach it on img tag foreach (var strFile in strFiles) { strFileName = System.IO.Path.GetFileName(strFile); <img id="myImg" src="@strFileName" /> } */ var spanID = @prodnumber + "-variantSpan-" + @counter; <span onmouseover="changeThumbnail('@prodnumber', '@variantColourName');" class="colourFor-@prodnumber-@variantColourName"> <span id="@spanID"></span> <script> // printVariantColour("@variantColourName", "@spanID"); </script> </span> counter++; } </div> } <div id="moreColours"><img src="Files/Images/Content/fler-farger.gif" />Fler färger</div> } } </div> </div> </a> <div class="vis-hide caption productlist-caption"> <div style="display:none"> @{ if (!string.IsNullOrEmpty(GetString("Ecom:Product.AddToFavorites")) && Dynamicweb.Modules.UserManagement.User.GetCurrentUser() != null) { <button tabindex="3" data-toggle="tooltip" data-placement="left" title="Lägg till som favorit" id="btnFav" href="javascript:;" onclick="addToFavorites('@i.GetValue("Ecom:Product.AddToFavorites")', this)" class="btn btn-primary btn-lg" type="button"> <i class="fa fa-heart"> </i> </button> } else if (Dynamicweb.Modules.UserManagement.User.GetCurrentUser() != null) { <button data-toggle="tooltip" data-placement="left" title="Lägg till som favorit" id="btnFav" href="javascript:;" onclick="addToFavorites('@i.GetValue("Ecom:Product.AddToFavorites")', this)" class="btn btn-primary btn-lg" type="button"> <i class="fa fa-heart"> </i> </button> } else { <button tabindex="3" data-toggle="tooltip" data-placement="left" title="Du måste vara inloggad för att kunna lägga till denna produkt som favorit" id="btnBuy" class="btn btn-primary btn-lg btnDisabled" type="button"> <i class="fa fa-heart"> </i> </button> } } </div> </div> <!-- PRENDO REMOVED 4 --> </div> </div> } <!-- END List products --> </div> @* Fix for when the productpage does not contain a GroupID *@ @{ string nextpage_link = GetString("Ecom:ProductList.NextPage.Clean"); int PageNum = GetInteger("Ecom:ProductList.CurrentPage") + 1; int total = GetInteger("Ecom:ProductList.TotalPages"); if (nextpage_link.Contains("GroupID=&")) { nextpage_link = "/Default.aspx?ID=" + @Pageview.Page.ID + "&eComQuery=" + System.Web.HttpContext.Current.Request.QueryString["eComQuery"] + "&PageNum=" + PageNum; } if (GetString("Ecom:ProductList.NextPage.Clean") != "") { <div class="text-center" id="nextTarget"> <a href="@nextpage_link" class="nextpage-link"></a> <a class="btn btn-default btn-lg btn-loadmore"> <i class="fa fa-refresh fa-spin"></i> Ladda fler... </a> </div> } else { <div class="text-center" id="nextTarget"> </div> } } </div> </div> </div> <script> var PageviewURL = '@GetGlobalValue("Global:Pageview.Url")'; var filteredByPrice = PageviewURL.indexOf("priceFilter") !== -1; var filteredBySupplier = PageviewURL.indexOf("supplier") !== -1; var filteredByColor = PageviewURL.indexOf("PrendoVariantColor") !== -1; if (filteredByPrice || filteredBySupplier || filteredByColor) { $("#CategoryFeatured").hide(); $(".yourFiltering").show(); } if (filteredByPrice) { $(".priceFilterBox").css("background", "#fef4f3 url(/Files/Templates/Designs/CapoStarter/assets/img/dropdown-arrow-sprite.png) 92% 15px no-repeat"); } if (filteredBySupplier) { $(".supplierFilterBox ").css("background", "#fef4f3 url(/Files/Templates/Designs/CapoStarter/assets/img/dropdown-arrow-sprite.png) 92% 15px no-repeat"); } if (filteredByColor) { $(".colourFilterBox ").css("background", "#fef4f3 url(/Files/Templates/Designs/CapoStarter/assets/img/dropdown-arrow-sprite.png) 92% 15px no-repeat"); } </script>
Prendo

Acceptera cookies på denna sida

Denna webbplats användar cookies för att förbättra sidans funktionalitet.

Vill du veta mer om hur vi använder cookies? Läs mer här