Skaphenger 6308 2000 kg svart|h=150cm|m/bakdør|dører V+H
Tilhengere med muligheter for høyere nyttelast, flere kassestørrelse og funksjoner og kraftig utførelse gjør disse modellene til våre bestselgere. Tysse skaphengere Pro blir brukt av både den private og proffe bruker. Solid overbygg med aluminiumlister, nedfelte surrefester i bunn, pakning på dører, takgrind og LED lys
- Bruksområde
- Pro
- Tillatt totalvekt (kg)
- 2000 kg
- Nyttelast
- 1426 kg
- Egenvekt
- 574 kg
- Kassemål
- 325x150x150 cm
- Bremser
- Ja
- Hjul
- 13" Helårsdekk
- Total utvendig lengde
- 485 cm
- Total utvendig bredde
- 195 cm
- Total utvendig høyde
- 216 cm
- Utenpåliggende hjul
- Ja
- Akslinger
- 2 Aksel
- Demping
- Torsjon
- Understell
- Skrudd ramme
- Lastehøyde
- 55 cm
- Farge
- Sort
- Bakdør eller baklem
- Doble bakdører
- Sidedør
- Begge sider 60Bx120H
- Topphengslet luke
- Ingen
Error executing template "Designs/Swift/Paragraph/Swift_Product_Specification_Custom.cshtml" System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext() at Dynamicweb.Modules.Searching.Rules.Parser.UnescapeStrings(String s) at Dynamicweb.Modules.Searching.Rules.Parser.ParseSimpleExpression(String expression) at Dynamicweb.Modules.Searching.Rules.Parser.Parse(String input) at Dynamicweb.ItemPublisher.FilterHelper.ToXml(String filter) at Dynamicweb.ItemPublisher.Frontend.GetContentBySettings(String settings) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Dynamicweb.Extensibility.AddIns.AddInManager.InvokeFunction(Object instance, String functionName, Object[] arguments) at Dynamicweb.Rendering.TemplateBase`1.RenderItemList(Object settings) at CompiledRazorTemplates.Dynamic.RazorEngine_2d027a7ba5cf44d19ceadca371a4c281.<>c__DisplayClass0_0.<RenderUserBenefits>b__0(TextWriter __razor_helper_writer) in D:\dynamicweb.net\Solutions\Mennt\tysse.cloud.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\Swift_Product_Specification_Custom.cshtml:line 123 at CompiledRazorTemplates.Dynamic.RazorEngine_2d027a7ba5cf44d19ceadca371a4c281.Execute() in D:\dynamicweb.net\Solutions\Mennt\tysse.cloud.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\Swift_Product_Specification_Custom.cshtml:line 428 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 @using System.Web 4 @using Dynamicweb.Core 5 @{ 6 bool productViewModelFound = false; 7 ProductViewModel product = new ProductViewModel(); 8 9 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 10 { 11 productViewModelFound = false; 12 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 13 } 14 15 @* Related products *@ 16 IList<string> relateFromProductIdsExtra = new List<string>{}; 17 IList<string> relateFromProductIdsParts = new List<string>{}; 18 19 var extras = product.RelatedGroups.FirstOrDefault(x => x.Name == "Ekstrautstyr"); 20 var parts = product.RelatedGroups.FirstOrDefault(x => x.Name == "RELGRP2"); 21 22 if (extras != null) 23 { 24 foreach (var relatedProduct in extras.Products) 25 { 26 relateFromProductIdsExtra.Add(relatedProduct.ProductId); 27 } 28 } 29 30 if (parts != null) 31 { 32 foreach (var relatedProduct in parts.Products) 33 { 34 relateFromProductIdsParts.Add(relatedProduct.ProductId); 35 } 36 } 37 38 ProductListViewModel selectedRelationProduct = Model.Item.GetValue<ProductListViewModel>("ProductsToRelateTo2"); 39 if (selectedRelationProduct?.Products != null) { 40 if (selectedRelationProduct.Products.Count > 0) { 41 int productCount = 0; 42 foreach (var selectedProduct in selectedRelationProduct.Products) { 43 if (productCount == 0) { 44 product = selectedProduct; 45 productCount++; 46 } 47 } 48 } 49 } 50 51 @*if (product?.RelatedGroups.Count > 1) { 52 foreach (var group in product.RelatedGroups) 53 { 54 55 if (group.Name == "Ekstrautstyr") 56 { 57 foreach (var relatedProduct in group.Products) 58 { 59 relateFromProductIds.Add(relatedProduct.ProductId); 60 } 61 } 62 } 63 } else { 64 foreach (var group in product.RelatedGroups) 65 { 66 67 if (group.Name == "RELGRP2") 68 { 69 foreach (var relatedProduct in group.Products) 70 { 71 relateFromProductIds.Add(relatedProduct.ProductId); 72 } 73 } 74 } 75 }*@ 76 77 78 string pageId = Model.Item.GetLink("ProductSliderServicePage") != null ? Model.Item.GetLink("ProductSliderServicePage").PageId.ToString() : ""; 79 string servicePageByNavigationTag = GetPageIdByNavigationTag("ProductSliderService") != 0 ? GetPageIdByNavigationTag("ProductSliderServiceTab").ToString() : ""; 80 pageId = pageId == "" ? servicePageByNavigationTag : pageId; 81 82 string url = "/Default.aspx?ID=" + pageId; 83 if (!url.Contains("LayoutTemplate")) { 84 url += url.Contains("?") ? "&LayoutTemplate=Designs/Swift/Swift_PageClean.cshtml" : "?LayoutTemplate=Designs/Swift/Swift_PageClean.cshtml"; 85 } 86 if (Pageview.IsVisualEditorMode) { 87 url += "&VisualEdit=True"; 88 } 89 90 string productIdsExtra = productViewModelFound && relateFromProductIdsExtra.Count == 0 ? product.Id : string.Join(",", relateFromProductIdsExtra); 91 string productIdsParts = productViewModelFound && relateFromProductIdsParts.Count == 0 ? product.Id : string.Join(",", relateFromProductIdsParts); 92 93 string linkParametersExtra = ""; 94 linkParametersExtra += !string.IsNullOrEmpty(productIdsExtra) ? "&MainProductId=" + productIdsExtra : ""; 95 96 string linkParametersParts = ""; 97 linkParametersParts += !string.IsNullOrEmpty(productIdsParts) ? "&MainProductId=" + productIdsParts : ""; 98 99 string productListPageId = Model.Item.GetLink("ProductListPage") != null ? Model.Item.GetLink("ProductListPage").PageId.ToString() : ""; 100 string productListPageByNavigationTag = GetPageIdByNavigationTag("Shop") != 0 ? GetPageIdByNavigationTag("Shop").ToString() : ""; 101 productListPageId = productListPageId == "" ? productListPageByNavigationTag : productListPageId; 102 string linkExtra = "/Default.aspx?ID=" + productListPageId + linkParametersExtra; 103 string linkParts = "/Default.aspx?ID=" + productListPageId + linkParametersParts; 104 string title = Model?.Item?.GetString("Title") != null ? Model.Item.GetString("Title") : Translate("Products"); 105 @* End related products *@ 106 107 @* Documents *@ 108 var assetsCategories = product.AssetCategories.FirstOrDefault(x => x.SystemName == "Documents"); 109 110 var documents = assetsCategories?.Assets; 111 112 113 string iconPath = "/Files/icons/"; 114 @* End documents *@ 115 116 int userBenefitCount = (int)Dynamicweb.Data.Database.ExecuteScalar($"SELECT Count(Id) FROM ItemType_UserBenefit WHERE Products LIKE '%{product.Id}%'"); 117 var test = Dynamicweb.Frontend.PageView.Current().SearchFriendlyUrl; 118 var assetsImages = product.AssetCategories.Where(x => x.SystemName =="Video"); 119 } 120 121 @helper RenderUserBenefits(string productId) 122 { 123 @RenderItemList(new 124 { 125 ItemType = "UserBenefit", 126 ListTemplate = "ItemPublisher/List/UserBenefits.cshtml", 127 ItemFieldsList = "*", 128 ListSourceType = "Page", 129 ListSourcePage = 2010, 130 ListPageSize = 100, 131 Filter = "Products contains \""+ productId +"\"" 132 }) 133 } 134 135 @if (Pageview.Device == Dynamicweb.Frontend.Devices.DeviceType.Mobile || Pageview.Device == Dynamicweb.Frontend.Devices.DeviceType.Tablet) 136 { 137 <div class="container ms-0 px-0" id="spec-group"> 138 <div class="spec-btn"> 139 <!-- Product description --> 140 @if(!string.IsNullOrEmpty(product.LongDescription)){ 141 var articleLink = product.ProductFields.Values.FirstOrDefault(x => x.SystemName == "HighlightedArticle").ToString(); 142 var articleButtonText = product.ProductFields.Values.FirstOrDefault(x => x.SystemName == "HighlightedArticleText").ToString(); 143 144 <button class="btn btn-primary btn-dark" data-bs-toggle="collapse" data-bs-target="#description"> 145 @Translate("Produktbeskrivelse") 146 </button> 147 <div class="collapse" id="description" data-bs-parent="#spec-group"> 148 <div class="card p-3 mb-2"> 149 @product.LongDescription 150 151 @if (!string.IsNullOrEmpty(articleLink)) 152 { 153 <div class="mt-3"> 154 <a href="@articleLink" class="btn btn-primary" target="_blank" style="background-color: #980F0F; color: white; border-color: #980F0F;">@articleButtonText</a> 155 </div> 156 } 157 </div> 158 </div> 159 } 160 <!-- User benefits --> 161 @if(userBenefitCount > 0){ 162 <button class="btn btn-primary btn-dark" data-bs-toggle="collapse" data-bs-target="#userBenefits"> 163 @Translate("Brukerfordeler") 164 </button> 165 <div class="collapse grid" id="userBenefits" data-bs-parent="#spec-group"> 166 <div class=" card-body container p-0 g-col-12"> 167 <div class="pt-3 swiffy-slider slider-nav-chevron slider-nav-visible slider-nav-dark slider-nav-outside-expand slider-nav-animation slider-nav-animation-appear swiffy-gap-lg-4 slider-item-show4 "> 168 <div class="slider-container pb-3 py-lg-3 mt-n3 mx-4"> 169 @RenderUserBenefits(product.Id) 170 </div> 171 <button type="button" title="@Translate("Slider navigation button - Previous slider")" class="slider-nav spec-btn-nofocus ms-n2"></button> 172 <button type="button" title="@Translate("Slider navigation button - Next slider")" class="slider-nav slider-nav-next spec-btn-nofoucus me-n2"></button> 173 <script type="module" src="~/Files/Templates/Designs/Swift/Assets/js/swiffy-slider.js"></script> 174 <script type="module"> 175 swiffyslider.init() 176 </script> 177 </div> 178 <div id="userBenefits"></div> 179 </div> 180 </div> 181 } 182 183 <!-- Documents --> 184 @if(documents != null) { 185 <button class="btn btn-primary" data-bs-toggle="collapse" data-bs-target="#documents"> 186 @Translate("Dokumenter") 187 </button> 188 } 189 <div class="collapse" id="documents" data-bs-parent="#spec-group"> 190 <div class="card-body gap-3"> 191 @if(documents != null) { 192 foreach (var item in documents) 193 { 194 <a href="@item.Value" target="_blank" alt="@item.DisplayName"> 195 <div class="overflow-hidden h-100 bg-dark"> 196 <div class="row mx-2 d-flex align-items-center justify-content-between"style='height: 80px;'> 197 <div class="col-10 align-items-center pe-0 ps-2 text-white"> 198 @item.DisplayName 199 <div class="fw-bold text-white mt-0">@Translate("Last ned her")</div> 200 </div> 201 <div class="col d-flex justify-content-end d-inline-flex align-items-center ps-0 pe-2 "> 202 @ReadFile(iconPath + "Laste ned hvit.svg") 203 </div> 204 </div> 205 </div> 206 </a> 207 } 208 } 209 </div> 210 </div> 211 212 <!-- Extra equipment --> 213 @if (product.RelatedGroups.Count > 1) { 214 <button class="btn btn-primary btn-dark" data-bs-toggle="collapse" data-bs-target="#extra"> 215 @Translate("Ekstrautstyr") 216 </button> 217 <div class="collapse" id="extra" data-bs-parent="#spec-group"> 218 <div class=""> 219 @foreach (var group in product.RelatedGroups) 220 { 221 if (group.Name == "Ekstrautstyr") 222 { 223 <form method="post" action="@url" id="RelatedProductsForm_@(product.Id)_Tab" data-response-target-element="RelatedProducts_@(product.Id)_@(group.Id)_Tab" data-preloader="inline" data-update-url="false"> 224 <input type="hidden" name="MainProductID" id="MainProductID_@(product.Id)_Tab" value="@productIdsExtra" /> 225 <input type="hidden" name="Link" value="@linkExtra" /> 226 <input type="hidden" name="HeadingTitle" id="RelatedProductsTitle_@(product.Id)_Tab" value="Ekstrautstyr" /> 227 <input type="hidden" name="SortOrder" value="DESC" /> 228 <div class="grid w-100 h-100" style="grid-row-gap: 4rem"> 229 <div id="RelatedProducts_@(product.Id)_@(group.Id)_Tab" class="g-col-12 h-100" style="min-height: 345px"></div> 230 </div> 231 </form> 232 <script type="module"> 233 @* document.querySelector("#ParentColumnSize_@(product.Id)_Tab").value = document.querySelector("#RelatedProducts_@(Model.ID)_@group.Id").closest("[data-col-size]").getAttribute("data-col-size"); 234 document.querySelector("#MainProductID_@(product.Id)_Tab").value = "@productIdsExtra"; 235 document.querySelector("#RelatedProductsTitle_@(product.Id)_Tab").value = "@group.Name"; 236 document.querySelector("#RelatedProductsForm_@(product.Id)_Tab").setAttribute("data-response-target-element", "RelatedProducts_@(Model.ID)_@group.Id"); *@ 237 swift.PageUpdater.Update(document.querySelector("#RelatedProductsForm_@(product.Id)_Tab")); 238 </script> 239 } 240 } 241 </div> 242 </div> 243 } 244 245 <!-- Parts list --> 246 @if (product.RelatedGroups.Count == 1) { 247 foreach (var item in product.RelatedGroups) 248 { 249 if (item.Name == "RELGRP2") 250 { 251 <button class="btn btn-primary btn-dark" data-bs-toggle="collapse" data-bs-target="#extra"> 252 @Translate("Deler til dette produktet") 253 </button> 254 } 255 else 256 { 257 <button class="btn btn-primary btn-dark" data-bs-toggle="collapse" data-bs-target="#extra"> 258 @Translate("Ekstrautstyr") 259 </button> 260 } 261 } 262 <div class="collapse" id="extra" data-bs-parent="#spec-group"> 263 <div class="card-body"> 264 @foreach (var group in product.RelatedGroups) 265 { 266 if (group.Name == "RELGRP2") 267 { 268 @*<div>@productIdsParts</div>*@ 269 270 <form method="post" action="@url" id="RelatedProductsForm_@(product.Id)_Tab" data-response-target-element="RelatedProducts_@(product.Id)_@(group.Id)_Tab" data-preloader="inline" data-update-url="false"> 271 <input type="hidden" name="MainProductID" id="MainProductID_@(product.Id)_Tab" value="@productIdsParts" /> 272 <input type="hidden" name="Link" value="@linkParts" /> 273 <input type="hidden" name="HeadingTitle" id="RelatedProductsTitle_@(product.Id)_Tab" value="" /> 274 <input type="hidden" name="SortOrder" value="DESC" /> 275 <div class="grid w-100 h-100" style="grid-row-gap: 4rem"> 276 <div id="RelatedProducts_@(product.Id)_@(group.Id)_Tab" class="g-col-12 h-100" style="min-height: 345px"></div> 277 </div> 278 </form> 279 <script type="module"> 280 @* document.querySelector("#ParentColumnSize_@(product.Id)_Tab").value = document.querySelector("#RelatedProducts_@(Model.ID)_@group.Id").closest("[data-col-size]").getAttribute("data-col-size"); 281 document.querySelector("#MainProductID_@(product.Id)_Tab").value = "@productIdsParts"; 282 document.querySelector("#RelatedProductsTitle_@(product.Id)_Tab").value = "@group.Name"; 283 document.querySelector("#RelatedProductsForm_@(product.Id)_Tab").setAttribute("data-response-target-element", "RelatedProducts_@(Model.ID)_@group.Id"); *@ 284 swift.PageUpdater.Update(document.querySelector("#RelatedProductsForm_@(product.Id)_Tab")); 285 </script> 286 } 287 if (group.Name == "Ekstrautstyr") 288 { 289 <form method="post" action="@url" id="RelatedProductsForm_@(product.Id)_Tab" data-response-target-element="RelatedProducts_@(product.Id)_@(group.Id)_Tab" data-preloader="inline" data-update-url="false"> 290 <input type="hidden" name="MainProductID" id="MainProductID_@(product.Id)_Tab" value="@productIdsExtra" /> 291 <input type="hidden" name="Link" value="@linkExtra" /> 292 <input type="hidden" name="HeadingTitle" id="RelatedProductsTitle_@(product.Id)_Tab" value="" /> 293 <input type="hidden" name="SortOrder" value="DESC" /> 294 <div class="grid w-100 h-100" style="grid-row-gap: 4rem"> 295 <div id="RelatedProducts_@(product.Id)_@(group.Id)_Tab" class="g-col-12 h-100" style="min-height: 345px"></div> 296 </div> 297 </form> 298 <script type="module"> 299 @* document.querySelector("#ParentColumnSize_@(product.Id)_Tab").value = document.querySelector("#RelatedProducts_@(Model.ID)_@group.Id").closest("[data-col-size]").getAttribute("data-col-size"); 300 document.querySelector("#MainProductID_@(product.Id)_Tab").value = "@productIdsExtra"; 301 document.querySelector("#RelatedProductsTitle_@(product.Id)_Tab").value = "@group.Name"; 302 document.querySelector("#RelatedProductsForm_@(product.Id)_Tab").setAttribute("data-response-target-element", "RelatedProducts_@(Model.ID)_@group.Id"); *@ 303 swift.PageUpdater.Update(document.querySelector("#RelatedProductsForm_@(product.Id)_Tab")); 304 </script> 305 } 306 } 307 </div> 308 </div> 309 } 310 </div> 311 </div> 312 } 313 else 314 { 315 316 <div class=""> 317 @if(!string.IsNullOrEmpty(product.LongDescription)) 318 { 319 <div class="btn btn-dark btn-primary-small-mennt "> 320 <a style="color: white; text-decoration: none; font-size: 14px;" href="@test#ProductDescription">Produktbeskrivelse</a> 321 </div> 322 } 323 @if(userBenefitCount > 0) 324 { 325 <div class="btn btn-dark btn-primary-small-mennt"> 326 <a style="color: white; text-decoration: none; font-size: 14px;" href="@test#UserBenefits">Brukerfordeler</a> 327 </div> 328 } 329 @if (product.RelatedGroups.Count > 1) 330 { 331 <div class="btn btn-dark btn-primary-small-mennt"> 332 <a style="color: white; text-decoration: none; font-size: 14px;" href="@test#Extra">Ekstrautstyr</a> 333 </div> 334 } 335 @if (product.RelatedGroups.Count == 1) 336 { 337 foreach (var item in product.RelatedGroups) 338 { 339 if (item.Id == "RELGRP2") 340 { 341 <div class="btn btn-dark btn-primary-small-mennt"> 342 <a style="color: white; text-decoration: none; font-size: 14px;" href="@test#PartsList">Deler til dette produktet</a> 343 </div> 344 } 345 else 346 { 347 <div class="btn btn-dark btn-primary-small-mennt"> 348 <a style="color: white; text-decoration: none; font-size: 14px;" href="@test#PartsList">Ekstrautstyr</a> 349 </div> 350 } 351 } 352 353 } 354 355 <div class="btn btn-dark btn-primary-small-mennt" id="photosAnchor"> 356 <a style="color: white; text-decoration: none; font-size: 14px;" href="@test#Photos">Miljøbilder</a> 357 </div> 358 359 <div class="btn btn-dark btn-primary-small-mennt" id="articlesAnchor"> 360 <a style="color: white; text-decoration: none; font-size: 14px;" href="@test#Articles">Artikler</a> 361 </div> 362 <div> 363 364 <!-- Product descripption 2 --> 365 <div class="grid gap-4 py-4"> 366 @if(!string.IsNullOrEmpty(product.LongDescription)) 367 { 368 var articleLink = product.ProductFields.Values.FirstOrDefault(x => x.SystemName == "HighlightedArticle").ToString(); 369 var articleButtonText = product.ProductFields.Values.FirstOrDefault(x => x.SystemName == "HighlightedArticleText").ToString(); 370 371 <div id="ProductDescription" class="my-5 g-col-6" style="scroll-margin-top: 8rem; "> 372 <h3 class="h3"> Produktbeskrivelse </h3> 373 <div id="groupText">@product.LongDescription</div> 374 375 376 377 <div id="readMore" class="btn text-decoration-underline p-0 fw-bold" onClick="toggleText()" style="display:none;">Les mer</div> 378 379 @if (!string.IsNullOrEmpty(articleLink)) 380 { 381 <div class="mt-4"> 382 <a href="@articleLink" class="btn btn-primary" target="_blank" style="background-color: #980F0F; color: white; border-color: #980F0F;">@articleButtonText</a> 383 </div> 384 } 385 </div> 386 } 387 388 <!--Videos start--> 389 @if (Pageview.Device == Dynamicweb.Frontend.Devices.DeviceType.Desktop) 390 { 391 <div class="g-col-6"> 392 @foreach(var assets in assetsImages){ 393 394 <div class="swiffy-slider h-100" style="max-height: 334px; min-height: 300px;"> 395 <div class="slider-container"> 396 @foreach( var video in assets.Assets){ 397 <iframe src="@video.Value" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe> 398 } 399 </div> 400 <button type="button" class="slider-nav"></button> 401 <button type="button" class="slider-nav slider-nav-next"></button> 402 <ul class="slider-indicators"> 403 @foreach( var video in assets.Assets){ 404 <li></li> 405 } 406 </ul> 407 </div> 408 } 409 </div> 410 } 411 else 412 { 413 } 414 <!--Videos end--> 415 </div> 416 417 <!-- Slider start --> 418 <!-- background --> 419 @if(userBenefitCount > 0){ 420 <h3 class="h3">Brukerfordeler </h3> 421 <div id="UserBenefits" class="my-3" style="scroll-margin-top: 8rem;"> 422 <div class="bk-slider pt-5 pb-5 mb-6" style="overflow:hidden; background-color: #F2F2F2;"> 423 <!-- Slider main container --> 424 <div class="swiper-container" style="width: 900px !important;"> 425 <!-- Additional required wrapper --> 426 <div class="swiper-wrapper"> 427 <!-- Slides --> 428 @RenderUserBenefits(product.Id) 429 </div> 430 431 <!-- navigation buttons --> 432 <div class="swiper-button-prev" style="left: 0rem !important;"></div> 433 <div class="swiper-button-next" style="right: 0rem !important"></div> 434 </div> 435 </div> 436 </div> 437 } 438 <!-- Slider end --> 439 440 <!-- Extra equipment --> 441 @if (product.RelatedGroups.Count > 1) { 442 <div id="Extra" class="my-5" style="scroll-margin-top: 8rem;"> 443 <div class="card-body p-0"> 444 @foreach (var group in product.RelatedGroups) 445 { 446 if (group.Name == "Ekstrautstyr") 447 { 448 <form method="post" action="@url" id="RelatedProductsForm_@(product.Id)_Tab" data-response-target-element="RelatedProducts_@(product.Id)_@(group.Id)_Tab" data-preloader="inline" data-update-url="false"> 449 <input type="hidden" name="MainProductID" id="MainProductID_@(product.Id)_Tab" value="@productIdsExtra" /> 450 <input type="hidden" name="Link" value="@linkExtra" /> 451 <input type="hidden" name="HeadingTitle" id="RelatedProductsTitle_@(product.Id)_Tab" value="Ekstrautstyr" /> 452 <input type="hidden" name="SortOrder" value="DESC" /> 453 <div class="grid w-100 h-100" style="grid-row-gap: 4rem"> 454 <div id="RelatedProducts_@(product.Id)_@(group.Id)_Tab" class="g-col-12 h-100" style="min-height: 345px"></div> 455 </div> 456 </form> 457 <script type="module"> 458 @* document.querySelector("#ParentColumnSize_@(product.Id)_Tab").value = document.querySelector("#RelatedProducts_@(Model.ID)_@group.Id").closest("[data-col-size]").getAttribute("data-col-size"); 459 document.querySelector("#MainProductID_@(product.Id)_Tab").value = "@productIdsExtra"; 460 document.querySelector("#RelatedProductsTitle_@(product.Id)_Tab").value = "@group.Name"; 461 document.querySelector("#RelatedProductsForm_@(product.Id)_Tab").setAttribute("data-response-target-element", "RelatedProducts_@(Model.ID)_@group.Id"); *@ 462 swift.PageUpdater.Update(document.querySelector("#RelatedProductsForm_@(product.Id)_Tab")); 463 </script> 464 } 465 } 466 </div> 467 </div> 468 } 469 470 <!-- Parts list --> 471 @if (product.RelatedGroups.Count == 1) { 472 <div id="PartsList" class="my-5" style="scroll-margin-top: 8rem;"> 473 <div class="card-body p-0"> 474 @foreach (var group in product.RelatedGroups) 475 { 476 if (group.Name == "RELGRP2") 477 { 478 @*<div>@productIdsParts</div>*@ 479 480 <form method="post" action="@url" id="RelatedProductsForm_@(product.Id)_Tab" data-response-target-element="RelatedProducts_@(product.Id)_@(group.Id)_Tab" data-preloader="inline" data-update-url="false"> 481 <input type="hidden" name="MainProductID" id="MainProductID_@(product.Id)_Tab" value="@productIdsParts" /> 482 <input type="hidden" name="Link" value="@linkParts" /> 483 <input type="hidden" name="HeadingTitle" id="RelatedProductsTitle_@(product.Id)_Tab" value="Deler til dette produktet" /> 484 <input type="hidden" name="SortOrder" value="DESC" /> 485 <div class="grid w-100 h-100" style="grid-row-gap: 4rem"> 486 <div id="RelatedProducts_@(product.Id)_@(group.Id)_Tab" class="g-col-12 h-100" style="min-height: 345px"></div> 487 </div> 488 </form> 489 <script type="module"> 490 @* document.querySelector("#ParentColumnSize_@(product.Id)_Tab").value = document.querySelector("#RelatedProducts_@(Model.ID)_@group.Id").closest("[data-col-size]").getAttribute("data-col-size"); 491 document.querySelector("#MainProductID_@(product.Id)_Tab").value = "@productIdsParts"; 492 document.querySelector("#RelatedProductsTitle_@(product.Id)_Tab").value = "@group.Name"; 493 document.querySelector("#RelatedProductsForm_@(product.Id)_Tab").setAttribute("data-response-target-element", "RelatedProducts_@(Model.ID)_@group.Id"); *@ 494 swift.PageUpdater.Update(document.querySelector("#RelatedProductsForm_@(product.Id)_Tab")); 495 </script> 496 } 497 if (group.Name == "Ekstrautstyr") 498 { 499 <form method="post" action="@url" id="RelatedProductsForm_@(product.Id)_Tab" data-response-target-element="RelatedProducts_@(product.Id)_@(group.Id)_Tab" data-preloader="inline" data-update-url="false"> 500 <input type="hidden" name="MainProductID" id="MainProductID_@(product.Id)_Tab" value="@productIdsExtra" /> 501 <input type="hidden" name="Link" value="@linkExtra" /> 502 <input type="hidden" name="HeadingTitle" id="RelatedProductsTitle_@(product.Id)_Tab" value="Ekstrautstyr" /> 503 <input type="hidden" name="SortOrder" value="DESC" /> 504 <div class="grid w-100 h-100" style="grid-row-gap: 4rem"> 505 <div id="RelatedProducts_@(product.Id)_@(group.Id)_Tab" class="g-col-12 h-100" style="min-height: 345px"></div> 506 </div> 507 </form> 508 <script type="module"> 509 @* document.querySelector("#ParentColumnSize_@(product.Id)_Tab").value = document.querySelector("#RelatedProducts_@(Model.ID)_@group.Id").closest("[data-col-size]").getAttribute("data-col-size"); 510 document.querySelector("#MainProductID_@(product.Id)_Tab").value = "@productIdsExtra"; 511 document.querySelector("#RelatedProductsTitle_@(product.Id)_Tab").value = "@group.Name"; 512 document.querySelector("#RelatedProductsForm_@(product.Id)_Tab").setAttribute("data-response-target-element", "RelatedProducts_@(Model.ID)_@group.Id"); *@ 513 swift.PageUpdater.Update(document.querySelector("#RelatedProductsForm_@(product.Id)_Tab")); 514 </script> 515 } 516 } 517 </div> 518 </div> 519 } 520 </div> 521 </div> 522 523 var extrasCount = extras?.Products.Count ?? 0; 524 var partsCount = parts?.Products.Count ?? 0; 525 526 @*<div> 527 <ul> 528 <li>userBenefitCount: @userBenefitCount</li> 529 <li>extrasCount: @extrasCount</li> 530 <li>partsCount: @partsCount</li> 531 <li>productIdsExtra: @productIdsExtra</li> 532 <li>productIdsParts: @productIdsParts</li> 533 </ul> 534 </div>*@ 535 536 } 537 538 <script> 539 540 <!--slider start--> 541 var mySwiper = new Swiper(".swiper-container", { 542 spaceBetween: 1, 543 slidesPerView: 1, 544 centeredSlides: true, 545 roundLengths: true, 546 loop: true, 547 loopAdditionalSlides: 1, 548 firstSlideMessage: 'Dette er første slide', 549 lastSlideMessage: 'Dette er siste slide', 550 nextSlideMessage: 'Neste slide', 551 navigation: { 552 nextEl: ".swiper-button-next", 553 prevEl: ".swiper-button-prev" 554 } 555 }); 556 <!-- Slider end--> 557 558 var textHolder = document.querySelector('#groupText'); 559 var contentHeight = document.querySelector('#groupText'); 560 var btn = document.querySelector('.btn'); 561 562 563 console.log(contentHeight) 564 if (typeof(contentHeight) != 'undefined' && contentHeight != null) { 565 var height = contentHeight.scrollHeight; 566 document.addEventListener("DOMContentLoaded", function(event) { 567 if (height > 200) 568 { 569 document.getElementById("readMore").style.display = "inline-block"; 570 document.getElementById("readMore").innerText = "Les mer"; 571 } 572 573 }); 574 575 function toggleText() { 576 577 textHolder.classList.toggle("truncate"); 578 579 var x = document.getElementById("readMore"); 580 if (x.innerHTML === "Les mindre") { 581 x.innerHTML = "Les mer"; 582 } else { 583 x.innerHTML = "Les mindre"; 584 } 585 586 } 587 588 btn.addEventListener('click', toggleText); 589 toggleText(); //to truncate at first time 590 } 591 592 window.addEventListener('DOMContentLoaded', function (event) { 593 const photos = document.getElementById("Photos"); 594 const articles = document.getElementById("Articles"); 595 596 if (photos == null) 597 { 598 const photosAnchor = document.getElementById("photosAnchor"); 599 photosAnchor.classList.add("d-none"); 600 } 601 602 if (articles == null) 603 { 604 const articlesAnchor = document.getElementById("articlesAnchor"); 605 articlesAnchor.classList.add("d-none"); 606 } 607 608 }); 609 610 </script>