STÄNG

Denna webbplats använder cookies för statistik, anpassat innehåll och annonser. Läs mer

träffar.

No hits.
Exception in template (eCom/Productlist/M_ProductList_MR.cshtml): System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.
   vid CompiledRazorTemplates.Dynamic.ccfdbbaaae.Execute()
   vid RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   vid RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   vid Dynamicweb.Rendering.Template.Output()
@using Dynamicweb.Rendering; @inherits RazorTemplateBase<RazorTemplateModel<Template>> <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> <b class="cat-count">@GetValue("Ecom:ProductList.PageProdCnt") PRODUKTER</b> @if (!string.IsNullOrEmpty(@GetString("Ecom:Group.Description"))) { <div class="lead"> @GetString("Ecom:Group.Description") </div> } </div> </div> </div> </section> <div class="div-max1170-centered"> <div class="row"> <div class="col-sm-4 col-md-3 print-hide filter-wrapp"> <div class="list-group visible-xs"> <a href="#filterModal" class="list-group-item active" data-toggle="modal"> <h4 class="list-group-item-heading">Filtrera <i class="icon-chevron-right pull-right"></i></h4> <p class="list-group-item-text">G&ouml;r urval p&aring; egenskaper</p> </a> </div> <!-- Modal --> <div class="modal fade" id="filterModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title">V&auml;lj filter</h4> </div> <div class="modal-body modal-filter-control"></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">St&auml;ng</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> <div class="hidden-xs"> <div class="row filter-control"> @GetValue("Ecom:Search.SearchBox") </div> </div> </div> <!-- End of the filter sidebar --> <div class="col-sm-8 col-md-9 productlist-wrapp"> <div class="row productlist-images fixed-height-boxes"> <!-- BEGIN List products --> @foreach (LoopItem i in GetLoop("Products")) { var imgsrc = "admin/public/getimage.ashx?Image=/Files/Images/produktbilder/" + @i.GetValue("Ecom:Product.Number") + "/" + @i.GetValue("Ecom:Product.Number") + "_1.jpg&Format=jpg&Compression=90&height=330&crop=0&altFmImage_path=/Files/Images/NoImageAvailable.png"; <div class="col-xs-6 col-md-4 col-lg-4"> <div class="thumbnail dropdown-info"> <a href="@i.GetValue("Ecom:Product.LinkGroup.Clean")"> <div class="display-img"> <img alt="@i.GetValue("Ecom:Product.Name")" data-original="@imgsrc" class="img-responsive lazy"> </div> <div class="display-name"> <div class="name-info"> <div class="itemName">@i.GetValue("Ecom:Product.Name")</div> <div class="itemPrice" id='id_@i.GetString("Ecom:Product.Number").Replace(".", "")' data-withvat="" data-withoutvat=""> <b class="current-price"></b> <span class="old-price" style="display: none"></span> <span class="old-priceTotal"></span> <script type="text/javascript"> var price; $(document) .ready(function() { var itemPriceId = "@i.GetString("Ecom:Product.Number").Replace(".", "")"; var oldTag = $('#id_' + itemPriceId).find('.old-price'); productListUpdatePriceDisplay(itemPriceId); var newPrice; var newPriceFormatted; var oldPrice; if (getCookie('vatsetting') === 'optionExkl') { price = "@i.GetValue("Ecom:Product.Price.PriceWithoutVATFormatted")"; newPrice = '@i.GetValue("Ecom:Product.Price.PriceWithoutVAT")'; newPriceFormatted = parseFloat(newPrice.replace(/\s+/g, '')); oldPrice = '@i.GetValue("Capo:Product.NAV.OrdinariePriceSTYCKWithoutVAT")'.replace(',', '.'); var oldPriceVatExcluded = Math.round(parseFloat(oldPrice)); if (newPriceFormatted < oldPriceVatExcluded) { oldTag.html(oldPriceVatExcluded + ":-"); } } else { price = "@i.GetValue("Ecom:Product.Price.PriceWithVATFormatted")"; newPrice = '@i.GetValue("Ecom:Product.Price.Price")'; newPriceFormatted = parseFloat(newPrice.replace(/\s+/g, '')); oldPrice = '@i.GetValue("Capo:Product.NAV.OrdinariePriceWithVAT")'.replace(',', '.'); var oldPriceVatIncluded = Math.round(parseFloat(oldPrice)); if (newPriceFormatted < oldPriceVatIncluded) { oldTag.html(oldPriceVatIncluded + ":-"); } } $('#id_@i.GetString("Ecom:Product.Number").Replace(".", "")').find("b").html(price); }); </script> @if (i.GetValue("Ecom:Product.Price.Clean") != i.GetValue("Ecom:Product.ActualPrice.Clean")) { <span>(@i.GetValue("Ecom:Product.ActualPrice"))</span> } </div> <div class="loaderDiv"><img src="/Files/Images/loadingSmall.gif" /></div> </div> </div> </a> <div class="vis-hide caption productlist-caption"> <div class="input-group"> @{ double stock = 0; double.TryParse(i.GetString("Capo:Product.NAV.Stock"), out stock); if (stock > 0) { <span class="input-group-btn"> <button type="button" class="btn btn-default avail-btn cart-tooltip btn-small" data-toggle="tooltip" data-placement="top" title="" data-original-title="Finns i lager"> <i class="fa fa-circle"></i> </button> </span> } else { <span class="input-group-btn"> <button type="button" class="btn btn-default avail-btn cart-tooltip btn-small" data-toggle="tooltip" data-placement="top" title="" data-original-title="Beställningsvara"> <i class="fa fa-circle not-available"></i> </button> </span> } } <span class="input-group-btn"> @if (Dynamicweb.Modules.UserManagement.User.GetCurrentUser() != null) { <a href="javascript:;" onclick="addToFavorites('@i.GetValue("Ecom:Product.AddToFavorites")', this)" class="btn btn-default avail-btn cart-tooltip btn-small" data-toggle="tooltip" data-placement="top" title="" data-original-title="Lägg till favorit"> <i class="fa fa-star"> </i> </a> } else { <a class="btn btn-default avail-btn cart-tooltip btn-small" data-toggle="tooltip" data-placement="top" title="" data-original-title="Logga in för att spara favoriter"><i class="fa fa-star"> </i></a> } </span> <input type="number" onchange="productListUpdatePriceDisplay('@i.GetString("Ecom:Product.Number").Replace(".","")')" data-product-number='@i.GetValue("Ecom:Product.Number")' class="form-control" id='antal_@i.GetString("Ecom:Product.Number").Replace(".", "")' value="1"> @{ var product = Dynamicweb.eCommerce.Products.Product.GetProductByNumber(@i.GetString("Ecom:Product.Number")); var precelectUnit = product.GetProductFieldValue("UnitPreselect").ToString(); var contactToBuy = product.GetProductFieldValue("contactToBuy").ToString(); var unit = product.UnitList.ItemById(precelectUnit); Dynamicweb.eCommerce.Prices.DefaultPriceProvider Prices = new Dynamicweb.eCommerce.Prices.DefaultPriceProvider(); var priceProvided = Prices.FindPrice(product, 1, product.VariantID, product.Price.Currency, precelectUnit, Dynamicweb.Frontend.PageView.Current().User); } <span class="input-group-btn"> <a class="btn btn-default btn-small btn-kind" id="unitId">@precelectUnit</a> </span> <span class="input-group-btn"> @{ if (contactToBuy == "True" && Dynamicweb.Modules.UserManagement.User.GetCurrentUser() == null) { <button id="btnBuy" data-toggle="tooltip" data-original-title="Kontakta oss för köp" class="btn btn-default cart-tooltip" type="button"><i class="fa fa-shopping-cart"></i></button>} else { <button id="btnBuy" class="btn btn-default pull-right" onclick="addToBasket(@i.GetValue("Ecom:Product:Page.ID"), '@i.GetValue("Ecom:Product.ID")' , '@i.GetValue("Ecom:Product.Number")', '@precelectUnit', this);" type="button"> <span> <i class="fa fa-shopping-cart"></i> </span> </button> } } </span> </div> </div> </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; if (nextpage_link.Contains("GroupID=&")) { nextpage_link = "/Default.aspx?ID=2&PageNum=" + PageNum; } } @if (GetString("Ecom:ProductList.NextPage.Clean") != "") { <div class="text-center" id="loadtarget"> <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> } </div> </div> </div>

Menu