Logo
Exception in template (\Designs\Dwsimple\Paragraph\SavedConfigurations.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.ecaafcadcfddeaf.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System; @using System.Web; @using System.Configuration; @using System.Web.Helpers; @using Pagunette.CustomModules; @using Pagunette.CustomModules.Classes; @using System.Dynamic; @using System.Text.RegularExpressions @using Pagunette.CustomModules.Classes.Perfion; @using Pagunette.CustomModules.Classes.Perfion.XmlAbstractions; @using Pagunette.CustomModules.Utils; @using Pagunette.Models; @using Newtonsoft.Json; @{ Layout = null; /* * /\___/\ ________ * (() . ()) < Quack | * (_v v_) ¯¯¯¯¯¯¯¯¯ */ bool hasSavedConf = false; List<string> lstSavedConfiguration = new List<string>(); if (!string.IsNullOrEmpty(Pageview.User.CustomFieldValues.Find(x => x.CustomField.Name == "ConfSaved").Value.ToString())) { hasSavedConf = true; foreach (string queryString in Pageview.User.CustomFieldValues.Find(x => x.CustomField.Name == "ConfSaved").Value.ToString().Split('~')) { lstSavedConfiguration.Add(queryString); } } var currency = Pageview.User != null && !string.IsNullOrEmpty(Pageview.User.Currency) ? Pageview.User.Currency : Pageview.Area.EcomCurrencyId; int savedConfigurationIndex = 0; int currUserId = Pageview.User.ID; var varer = ConfiguratorPerfionTasks.GetConfiguratorVarer(PerfionSettings.PerfionLanguageID); } <script> function loader() { //Spinner var opts = { lines: 9, // The number of lines to draw length: 0, // The length of each line width: 10, // The line thickness radius: 18, // The radius of the inner circle corners: 1, // Corner roundness (0..1) rotate: 0, // The rotation offset direction: 1, // 1: clockwise, -1: counterclockwise color: '#000', // #rgb or #rrggbb or array of colors speed: 1, // Rounds per second trail: 35, // Afterglow percentage shadow: false, // Whether to render a shadow hwaccel: false, // Whether to use hardware acceleration className: 'spinner', // The CSS class to assign to the spinner zIndex: 2e9, // The z-index (defaults to 2000000000) top: '50%', // Top position relative to parent left: '50%' // Left position relative to parent }; var target = document.getElementById('orderlist'); var spinner = new Spinner(opts).spin(target); document.getElementById('savedConfiguratationList').style.visibility = "hidden"; } </script> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.0/css/bootstrap-datepicker.min.css" media="screen"> <section> <form name="ordersubmit" id="ordersubmit" class="form-light form-horizontal"> <div class="w-section inverse shop"> <div class="saved-config"> <br /> <h5>@Translate("SavedConfigurations price change warning", "Pris ændringer kan forkomme for de enkelte konfigurationer, ved ændringer af konfigurationen, eller ved pris ændringer på de enkelte elementer.")</h5> <br /> <table class="table table-cart table-responsive" id="orderlist"> <tbody id="savedConfiguratationList"> @if (hasSavedConf) { foreach (string str in lstSavedConfiguration) { string image = string.Empty; string comment = ""; string[] commaFix = Regex.Split(str, "&C="); string queryStr = commaFix[0].Replace(',', '.') + "&C=" + commaFix[1]; Dictionary<string, string> dictConfigurations = new Dictionary<string, string>(); string[] xCor = str.Split('&'); for (int yCor = 0; yCor < xCor.Length; yCor++) { string[] param = xCor[yCor].Split('='); if (param.Length == 1) { dictConfigurations.Add(param[0], ""); } else { dictConfigurations.Add(param[0], param[1]); } } if (dictConfigurations.ContainsKey("C")) { comment = dictConfigurations["C"]; } if (dictConfigurations.ContainsKey("PIU") && dictConfigurations["PIU"] != "") { image = PIMComUtilities.GetPerfionImageUrl(dictConfigurations["PIU"], "100x100"); } <tr class="orderline-product-row orderline-product-row--header"> <th colspan="4" class="dw-table-title"> <strong> @if (!string.IsNullOrEmpty(image)) { <img src="@image" class="col-md-1 col-sm-2 p-0" /> } <span class="col-md-9"> @if (dictConfigurations.ContainsKey("V")) { ConfiguratorVareModel vareName = varer.FirstOrDefault(x => x.ID == dictConfigurations["V"]); @vareName.RelProductName } </span> <span class="col-md-2"> @if (dictConfigurations.ContainsKey("CName")) { @dictConfigurations["CName"] <br /> } @if (dictConfigurations.ContainsKey("D")) { @dictConfigurations["D"] } </span> </strong> </th> </tr> <tr> <th> <button data-bind="click: addToBasket.bind($data, '@queryStr')" class="btn btn-dw-cart pull-left"><strong>@Translate("Add to cart", "Add to cart")</strong></button> </th> <th> <a href="" onclick="loader();" data-bind="click: removeProduct.bind($data, @(savedConfigurationIndex++), @currUserId) " title=""><i class="fa fa-trash-o"></i></a> </th> </tr> <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Metervare", "Metervare:")</td> <td colspan="3" class="text-left">@dictConfigurations["P"]</td> </tr> if (dictConfigurations.ContainsKey("CB")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("IsTurned", "Vendes vandret:")</td> @if (dictConfigurations["CB"] == "1") { <td colspan="3" class="text-left">@Translate("Ja", "Ja")</td> } else { <td colspan="3" class="text-left">@Translate("Nej", "Nej")</td> } </tr> <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Bredde", "Bredde:")</td> <td colspan="3" class="text-left">@dictConfigurations["W"] cm</td> </tr> } if (dictConfigurations.ContainsKey("H")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Højde", "Højde:")</td> <td colspan="3" class="text-left">@dictConfigurations["H"] cm</td> </tr> } if (dictConfigurations["VT"] == "G") { if (dictConfigurations.ContainsKey("QL") || dictConfigurations.ContainsKey("QR")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("QuantityHalvBreddeLeft", "Antal Halv bredde venstre side:")</td> @if (dictConfigurations.ContainsKey("QL")) { <td colspan="3" class="text-left">@(dictConfigurations["QL"])</td> } else { <td colspan="3" class="text-left">0</td> } </tr> <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("QuantityHalvBreddeRight", "Antal Halv bredde højre side:")</td> @if (dictConfigurations.ContainsKey("QR")) { <td colspan="3" class="text-left">@(dictConfigurations["QR"])</td> } else { <td colspan="3" class="text-left">0</td> } </tr> } } if (dictConfigurations.ContainsKey("FP")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Foer", "Foer:")</td> <td colspan="3" class="text-left">@dictConfigurations["FP"]</td> </tr> <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("IsTurned", "Vendes vandret:")</td> @if (dictConfigurations.ContainsKey("IT")) { <td colspan="3" class="text-left">@dictConfigurations["IT"])</td> // @Translate("Ja", "Ja") ?? } else { <td colspan="3" class="text-left">@Translate("Nej", "Nej")</td> } </tr> } if (dictConfigurations.ContainsKey("TF")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("TopFlap", "Top Flap: ")</td> <td colspan="3" class="text-left">@dictConfigurations["TF"]</td> </tr> } if (dictConfigurations.ContainsKey("BF")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("BottomFlap", "Bund Flap: ")</td> <td colspan="3" class="text-left">@dictConfigurations["BF"]</td> </tr> } if (dictConfigurations.ContainsKey("S")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Styring", "Styring: ")</td> <td colspan="3" class="text-left">@dictConfigurations["S"]</td> </tr> } if (dictConfigurations["VT"] == "L") { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("QuantityStyringLeft", "Antal med venstre styring :")</td> @if (dictConfigurations.ContainsKey("QL")) { <td colspan="3" class="text-left">@(dictConfigurations["QL"])</td> } else { <td colspan="3" class="text-left">0</td> } </tr> <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("QuantityStyringRight", "Antal med højre styring :")</td> @if (dictConfigurations.ContainsKey("QR")) { <td colspan="3" class="text-left">@(dictConfigurations["QR"])</td> } else { <td colspan="3" class="text-left">0</td> } </tr> } if (dictConfigurations.ContainsKey("Rh")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Rynkehoved", "Rynkehoved: ")</td> <td colspan="3" class="text-left">@dictConfigurations["Rh"] cm</td> </tr> } if (dictConfigurations.ContainsKey("R")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Rings", "Ring: ")</td> <td colspan="3" class="text-left">@dictConfigurations["R"]</td> </tr> } if (dictConfigurations.ContainsKey("BS") && dictConfigurations["VT"] != "Liftgardin") { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Bundsoem", "Bundsøm: ")</td> <td colspan="3" class="text-left">@dictConfigurations["BS"]</td> </tr> } if (dictConfigurations.ContainsKey("TT")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("TapeTypes", "Tape type: ")</td> <td colspan="3" class="text-left">@dictConfigurations["TT"]</td> </tr> } if (dictConfigurations.ContainsKey("HR") && dictConfigurations["HR"] == "Yes") { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Rynkning", "Rynkning: ")</td> <td colspan="3" class="text-left">@Translate("Yes", "Ja")</td> </tr> if (dictConfigurations.ContainsKey("FBER")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("RynkningValue", "Færdig bredde efter rynkning: ")</td> <td colspan="3" class="text-left">@dictConfigurations["FBER"]</td> </tr> } } if (dictConfigurations.ContainsKey("TH")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("TotalHaegter", "Antal hægter: ")</td> <td colspan="3" class="text-left">@dictConfigurations["TH"] @Translate("Pergardin", "Pr. færdig gardin")</td> </tr> } if (dictConfigurations.ContainsKey("PIL")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("PlaceringILomme", "Placering i lomme: ")</td> <td colspan="3" class="text-left">@dictConfigurations["PIL"]</td> </tr> } if (dictConfigurations.ContainsKey("KA")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("KouserAntal", "Kouser: ")</td> <td colspan="3" class="text-left">@dictConfigurations["KA"]/td> </tr> } if (dictConfigurations.ContainsKey("K")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Kaede", "Kæde: ")</td> <td colspan="3" class="text-left">@dictConfigurations["K"]</td> </tr> } if (dictConfigurations.ContainsKey("TL")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Tvaerlister", "Tværlister monteret: ")</td> <td colspan="3" class="text-left">@dictConfigurations["TL"]</td> </tr> } if (dictConfigurations.ContainsKey("STM")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Typesyning", "Type syning: ")</td> <td colspan="3" class="text-left">@dictConfigurations["STM"]</td> </tr> } if (dictConfigurations.ContainsKey("FL")) { <tr class="orderline-product-row configurator-product-row"> <td class="text-left">@Translate("Fastelaegantal", "Antal faste læg: ")</td> <td colspan="3" class="text-left">@dictConfigurations["FL"]</td> </tr> } <tr class="orderline-product-row"> <td colspan="4" class="text-left"> <textarea class="orderline-comment js-orderfield-auto-store" style="max-width: 1025px" placeholder="@Translate("OrderLineComment", "Evt. kommentar til ")" disabled> @comment </textarea> </td> </tr> } } </tbody> </table> </div> </div> </form> </section> <script type="text/javascript"> ConfiguratorSettings = { PerfionLanguage: '@PerfionSettings.PerfionLanguageID', Currency: '@currency', GetProductUrl: '/Configurator/GetProduct', GetForProductUrl: '/Configurator/GetForProduct', GetVarerUrl: '/Configurator/GetVarer', GetConfiguratorElementsUrl: '/Configurator/GetConfiguratorElements', GetPriceDetailsUrl: '/Configurator/GetPriceDetails', AddToBasketUrl: '/Configurator/AddToBasket', RemoveConfigurationUrl: '/Configurator/RemoveConfiguration', BasketUrl: '/Default.aspx?ID=@Pageview.Area.Item["CartPageId"]' }; </script> <script src="/Scripts/knockout-3.4.2.js" defer="defer"></script> <script src="/Scripts/knockout.mapping-latest.js" defer="defer"></script> <script src="~/Files/Templates/Designs/Dwsimple/js/pages/SavedConfigurations.js" defer="defer"></script>
Accepterar cookies från denna websida

Den här webbplatsen använder cookies för att spåra ditt beteende och förbättra användarupplevelsen
YDu kan alltid radera sparade cookies genom att besöka dina avancerade webbläsarinställningar
Du kan läsa vår cookiepolitik här.

Accepterar inte cookies Accepterar endast funktionella cookies Accepterar alla cookies