Error executing template "Designs/Rapido/_parsed/Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f57c6c4cad3b4518b42c85e32e256cd9.Execute() in D:\Dynamicweb.net\Solutions\Peritus\subaru.dw9.dynamicweb-cms.com\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 621
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 3 @* Rapido version 2.0.1 *@ 4 5 @using Dynamicweb.Frontend.Devices 6 @using Dynamicweb.Extensibility 7 @using Dynamicweb.Content 8 @using Dynamicweb.Security 9 @using System 10 @using System.Linq 11 @using System.Web 12 @using System.IO 13 14 @{ 15 //General settings 16 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 17 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").Path : "/Files/Images/logo-dynamicweb.png"; 18 if (Path.GetExtension(logo).ToLower() != ".svg") 19 { 20 logo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + @logo; 21 } 22 string searchPlaceholder = Translate("Search products", "Search products"); 23 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 24 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 25 26 //Font settings 27 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 28 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 29 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 30 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 31 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 32 string newStickersFont = Model.Area.Item.GetItem("NewStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 33 string customStickersFont = Model.Area.Item.GetItem("CustomStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 34 string toolsMenuFont = Model.Area.Item.GetItem("ToolsMenuFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 35 36 //Page IDs for use in the template 37 int pageId = Model.TopPage.ID; 38 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 39 int cartPageId = GetPageIdByNavigationTag("CartPage"); 40 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 41 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 42 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 43 int productsSearchFeedId = productsPageId; 44 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 45 int impersonationPageId = GetPageIdByNavigationTag("Impersonation"); 46 47 bool stickyMenu = Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 48 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 49 string pagePos = stickyMenu ? "js-page-pos" : ""; 50 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 51 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 52 string toolbarText = Model.Area.Item.GetString("ToolbarText"); 53 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 54 55 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + Model.Area.ID.ToString() + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; 56 57 string userInitials = ""; 58 if (Model.CurrentUser.ID != 0) 59 { 60 if (!String.IsNullOrEmpty(Model.CurrentUser.Name)) 61 { 62 string[] names = Model.CurrentUser.Name.Split(' '); 63 userInitials += Model.CurrentUser.Name.Substring(0, 1); 64 65 if (names.Length > 1) 66 { 67 userInitials += names[names.Length - 1].Substring(0, 1); 68 } 69 } 70 else 71 { 72 userInitials += Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName != "" ? Model.CurrentUser.FirstName.Substring(0, 1) : ""; 73 userInitials += Model.CurrentUser.LastName != null && Model.CurrentUser.LastName != "" ? Model.CurrentUser.LastName.Substring(0, 1) : ""; 74 userInitials += userInitials.Length == 1 && Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName.Length > 1 ? Model.CurrentUser.FirstName.Substring(1, 2) : ""; 75 userInitials += userInitials == "" && Model.CurrentUser.Email != null && Model.CurrentUser.Email.Length > 1 ? Model.CurrentUser.Email.Substring(0, 2) : ""; 76 userInitials += userInitials == "" ? Model.CurrentUser.UserName.Substring(0, 2) : ""; 77 } 78 } 79 80 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 81 string businessPhotoPath = Model.Area.Item.GetFile("BusinessPhoto") != null ? Model.Area.Item.GetFile("BusinessPhoto").Path : ""; 82 string businessName = Model.Area.Item.GetString("BusinessName"); 83 var address = Model.Area.Item.GetItem("Address"); 84 string streetAddress = ""; 85 string addressLocality = ""; 86 string addressRegion = ""; 87 string postalCode = ""; 88 string addressCountry = ""; 89 if (address != null) 90 { 91 streetAddress = address.GetString("StreetAddress"); 92 addressLocality = address.GetString("City"); 93 addressRegion = address.GetString("Region"); 94 postalCode = address.GetString("PostalCode"); 95 addressCountry = address.GetString("Country"); 96 } 97 string contactEmail = Model.Area.Item.GetString("ContactEmail"); 98 string contactNumber = Model.Area.Item.GetString("ContactNumber"); 99 } 100 <!DOCTYPE html> 101 102 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 103 <head> 104 <meta charset="utf-8" /> 105 <title>@Model.Title</title> 106 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 107 <meta name="robots" content="index, follow"> 108 @Model.MetaTags 109 <!-- Favicon --> 110 <link href="@favicon" rel="icon" type="image/png"> 111 112 <!-- Font awesome --> 113 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/rapido/font-awesome.min.css" type="text/css"> 114 115 <!-- Base (Default, wireframe) styles --> 116 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> 117 118 <!-- Rapido Css from Website Settings --> 119 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 120 121 <!-- Ignite Css (Custom site specific styles) --> 122 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet"> 123 124 <!-- Google fonts --> 125 @{ 126 var fonts = new string[8] { navigationFont, mobileNavigationFont, headerFont, subHeaderFont, contentFont, newStickersFont, customStickersFont, toolsMenuFont }; 127 var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 128 } 129 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 130 131 <script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 132 <script type="text/javascript"> 133 function PTSEmptyCart(e) { 134 $.ajax({ 135 url: "PTSEmptyCartHandler.ashx", 136 secureuri: true, 137 type: "POST", 138 data: { orderId: "" }, 139 dataType: "text", 140 async: false, 141 success: function (result) { 142 if (result.startsWith("Success")) { 143 Cart.EmptyCart(e); 144 //location.reload(); 145 } 146 else { 147 alert(result.replace("Error;", "")); 148 } 149 }, 150 error: function (err) { 151 alert(err.statusText); 152 } 153 }); 154 } 155 </script> 156 157 @if (!string.IsNullOrEmpty(businessPhotoPath) && 158 !string.IsNullOrEmpty(businessName) && 159 !string.IsNullOrEmpty(streetAddress) && 160 !string.IsNullOrEmpty(addressLocality) && 161 !string.IsNullOrEmpty(addressRegion) && 162 !string.IsNullOrEmpty(postalCode) && 163 !string.IsNullOrEmpty(addressCountry)) 164 { 165 <script type="application/ld+json"> 166 { 167 "@@context": "http://schema.org", 168 "@@type": "Store", 169 "image": [ 170 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 171 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 172 "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" 173 ], 174 "@@id": "@siteURL", 175 "name": "@businessName", 176 "address": { 177 "@@type": "PostalAddress", 178 "streetAddress": "@streetAddress", 179 "addressLocality": "@addressLocality", 180 "addressRegion": "@addressRegion", 181 "postalCode": "@postalCode", 182 "addressCountry": "@addressCountry" 183 } 184 @if (!string.IsNullOrEmpty(contactEmail)) 185 { 186 <text>,"email": "@Model.Area.Item.GetString("ContactEmail")"</text> 187 } 188 @if (!string.IsNullOrEmpty(contactNumber)) 189 { 190 <text>,"telephone": "@Model.Area.Item.GetString("ContactNumber")"</text> 191 } 192 } 193 </script> 194 } 195 196 <style> 197 #clockdiv { 198 font-family: sans-serif; 199 color: #DC143C; 200 display: inline-block; 201 text-align: center; 202 font-size: 14px; 203 } 204 205 #clockdiv > div { 206 padding: 1px; 207 color: #000; 208 display: inline-block; 209 } 210 211 #clockdiv div > span { 212 display: inline-block; 213 } 214 </style> 215 </head> 216 217 <body> 218 219 @MobileNavigation(userInitials) 220 221 @LoginModal() 222 223 224 <main class="site dw-mod"> 225 <header class="top-container @stickyTop dw-mod" id="Top"> 226 @if (renderPagesInToolBar && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 227 { 228 <div class="tools-navigation dw-mod"> 229 <div class="center-container grid top-container__center-container dw-mod"> 230 <div class="grid__cell"> 231 <div class="u-pull--left u-margin-top">@toolbarText</div> 232 <div class="u-pull--right"> 233 @RenderNavigation(new 234 { 235 id = "topToolsNavigation", 236 cssclass = "menu menu-tools dw-mod dwnavigation", 237 template = "TopMenu.xslt" 238 }) 239 </div> 240 </div> 241 </div> 242 </div> 243 } 244 245 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 246 { 247 switch (topLayout) 248 { 249 case "condensed": //2 250 <!-- Main navigation --> 251 <nav class="main-navigation dw-mod"> 252 <div class="center-container top-container__center-container dw-mod"> 253 <div class="grid"> 254 255 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 256 <div class="logo u-padding--xs dw-mod"> 257 <a href="/Default.aspx?ID=@firstPageId"> 258 <img class="grid__cell-img" src="@logo" alt="@businessName" /> 259 </a> 260 </div> 261 </div> 262 263 @* Navigation *@ 264 <div class="u-pull--left"> 265 @RenderHeaderNavigation() 266 </div> 267 268 <div class="grid__cell grid__cell--align-middle-right"> 269 <ul class="menu dw-mod u-pull--right"> 270 @RenderSignIn("inNavigation", userInitials) 271 @RenderLanguageSelector() 272 @RenderFavorites() 273 @RenderMiniCart() 274 </ul> 275 </div> 276 </div> 277 </div> 278 </nav> 279 280 <!-- Searchbar --> 281 <div class="u-box-shadow u-color-light-gray--bg u-inline-block u-full-width"> 282 <div class="center-container top-container__center-container dw-mod"> 283 <div class="typeahead typeahead--centered u-color-inherit js-typeahead dw-mod" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 284 @*<button type="button" class="btn btn--condensed u-color-light-gray--bg typeahead-group-btn dw-mod js-typeahead-groups-btn" data-group-id="all">@Translate("All")</button>*@ 285 @*<ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="ProductSearchBarGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul>*@ 286 <div class="typeahead-search-field"> 287 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 288 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="ProductSearchBarContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false"></ul> 289 </div> 290 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 291 </div> 292 </div> 293 </div> 294 295 break; 296 case "minimal": //3 297 <!-- Main navigation --> 298 <nav class="main-navigation dw-mod"> 299 <div class="center-container top-container__center-container dw-mod"> 300 <div class="grid"> 301 302 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 303 <div class="logo u-padding--xs dw-mod"> 304 <a href="/Default.aspx?ID=@firstPageId"> 305 <img class="grid__cell-img" src="@logo" alt="@businessName" /> 306 </a> 307 </div> 308 </div> 309 310 @* Navigation *@ 311 <div class="u-pull--left"> 312 @RenderHeaderNavigation() 313 </div> 314 315 <div class="grid__cell grid__cell--align-middle-right"> 316 <ul class="menu dw-mod u-pull--right"> 317 318 @* Search *@ 319 <li class="menu__item menu__item--horizontal menu__item--top-level u-hidden-xxs dw-mod" onmouseover="document.getElementById('headerSearch').focus()"> 320 <div class="menu__link u-w50px is-dropdown is-dropdown--no-icon dw-mod"> 321 <i class="fa fa-search fa-1_5x"></i> 322 <div class="menu menu--dropdown u-w340px top-micro-search dw-mod"> 323 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 324 <div class="typeahead-search-field"> 325 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue"> 326 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content" id="ProductSearchBarContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 327 </div> 328 </div> 329 </div> 330 </div> 331 </li> 332 333 @RenderSignIn("inNavigation", userInitials) 334 @RenderLanguageSelector() 335 @RenderFavorites() 336 @RenderMiniCart() 337 </ul> 338 </div> 339 </div> 340 </div> 341 </nav> 342 break; 343 case "splitted": //4 344 <!-- Header --> 345 <div class="header header-top dw-mod"> 346 <div class="center-container top-container__center-container dw-mod"> 347 <div class="grid"> 348 349 @* Logo *@ 350 <div class="grid__col-md-6 grid__col-sm-6 grid--align-self-center grid__col--bleed-y"> 351 <div class="grid__cell"> 352 <div class="logo u-max-w220px u-margin-top u-margin-bottom dw-mod"> 353 <a href="/Default.aspx?ID=@firstPageId"> 354 <img class="grid__cell-img" src="@logo" alt="@businessName" /> 355 </a> 356 </div> 357 </div> 358 </div> 359 360 @* Search *@ 361 <div class="grid__col-md-6 grid__col-sm-6 grid__col-xs-12 grid--align-self-center grid__col--bleed"> 362 <div class="grid__cell"> 363 <div class="typeahead u-no-margin u-margin-top u-margin-bottom u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 364 <button type="button" class="btn btn--condensed u-color-light-gray--bg typeahead-group-btn dw-mod js-typeahead-groups-btn" data-group-id="all">@Translate("All")</button> 365 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 366 <input type="text" class="typeahead-search-field u-no-margin js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 367 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 368 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 369 </div> 370 </div> 371 </div> 372 </div> 373 </div> 374 </div> 375 <!-- Main navigation --> 376 <nav class="main-navigation dw-mod"> 377 <div class="center-container top-container__center-container dw-mod"> 378 <div class="grid"> 379 <div class="u-pull--left"> 380 @RenderHeaderNavigation() 381 </div> 382 <div class="grid__cell grid__cell--align-middle-right"> 383 <ul class="menu dw-mod u-pull--right"> 384 @RenderSignIn("inNavigation", userInitials) 385 @RenderLanguageSelector() 386 @RenderFavorites() 387 @if (!onlyPreview) 388 { 389 @RenderMiniCart() 390 } 391 </ul> 392 </div> 393 </div> 394 </div> 395 </nav> 396 397 break; 398 case "normal": //1 399 default: 400 <!-- Header --> 401 <div class="header header-top dw-mod"> 402 <div class="center-container top-container__center-container dw-mod"> 403 <div class="grid"> 404 405 @* Logo *@ 406 <div class="grid__col-md-3 grid__col-sm-3 grid__col-xs-12 grid--align-self-center grid__col--bleed-y"> 407 <div class="logo dw-mod"> 408 <a href="/Default.aspx?ID=@firstPageId"> 409 <img class="grid__cell-img" src="@logo" alt="@businessName" /> 410 </a> 411 </div> 412 </div> 413 414 @* Search *@ 415 @if (Model.CurrentUser.ID != 0) 416 { 417 <div class="grid__col-md-4 grid__col-sm-4 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 418 <div class="typeahead u-margin u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 419 @*<button type="button" class="btn btn--condensed u-color-light-gray--bg typeahead-group-btn dw-mod js-typeahead-groups-btn" data-group-id="all">@Translate("All")</button>*@ 420 @*<ul class="dropdown dropdown--absolute-position js-handlebars-root js-typeahead-groups-content u-min-w220px dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul>*@ 421 <input type="text" class="typeahead-search-field u-no-margin js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 422 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 423 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 424 </div> 425 </div> 426 Dynamicweb.Content.Items.Item customSettings = Dynamicweb.Content.Items.Item.GetItemById("CustomWebsiteSettings", Pageview.Area.Item["CustomSettings"].ToString()); 427 428 DateTime frist = DateTime.Now.AddDays(2); //if no date set 429 if (customSettings["Bestillingsfrist"] != null) 430 { 431 if (!DateTime.TryParse(customSettings["Bestillingsfrist"].ToString(), out frist)) 432 { 433 frist = DateTime.Now.AddDays(2); //if no date set 434 } 435 //frist = DateTime.Parse(customSettings["Bestillingsfrist"].ToString()); 436 } 437 DateTime start = DateTime.Now; 438 DayOfWeek day = frist.DayOfWeek; 439 int daysToAdd = ((int)day - (int)start.DayOfWeek + 7) % 7; 440 441 //time has passed 442 if (daysToAdd == 0 && start.TimeOfDay > frist.TimeOfDay) 443 { 444 daysToAdd = 7; 445 } 446 DateTime nextDueDate = start.AddDays(daysToAdd); 447 448 TimeSpan ts = new TimeSpan(frist.Hour, frist.Minute, 0); 449 nextDueDate = nextDueDate.Date + ts; 450 451 <script type="text/javascript"> 452 var currDate = new Date(@start.Year, @start.Month - 1, @start.Day, @start.Hour, @start.Minute, @start.Second, @start.Millisecond) 453 var nextDueDate = new Date(@nextDueDate.Year, @nextDueDate.Month - 1, @nextDueDate.Day, @nextDueDate.Hour, @nextDueDate.Minute, @nextDueDate.Second, @nextDueDate.Millisecond) 454 </script> 455 456 <!-- <div class="grid__col-md-1 grid__col-sm-1 grid__col-xs-12 grid__col--bleed-y grid--align-self-end"> 457 <img class=" b-lazy b-loaded" src="/Admin/Public/GetImage.ashx?width=496&amp;height=380&amp;crop=5&amp;Compression=75&amp;FillCanvas=true&amp;DoNotUpscale=true&amp;image=%2fFiles%2fImages%2fSubaru%2ffly.png" alt="Bestillingsfrister flyfrakt"> 458 </div> --> 459 <div class="grid__col-md-3 grid__col-sm-3 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 460 <div id="clockdiv"> 461 <strong>Bestillingsfrist flyfrakt</strong><br /> 462 <div> 463 <span class="nextDueDate u-bold"></span> 464 </div><br /> 465 <div> 466 &nbsp;<span class="days"></span>d&nbsp;<span class="hours"></span>t&nbsp;<span class="minutes"></span>m 467 </div> 468 469 </div> 470 </div> 471 <div class="grid__col-md-2 grid__col-sm-2 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 472 <div class="grid__cell grid__cell--align-middle-right"> 473 <ul class="menu dw-mod u-pull--right"> 474 @RenderSignIn("outsideNavigation", userInitials) 475 @RenderLanguageSelector("outsideNavigation") 476 @RenderFavorites("outsideNavigation") 477 @if (!onlyPreview && Pageview.User.GroupsIds.Contains(26) == false) 478 { 479 @RenderMiniCart("outsideNavigation") 480 } 481 </ul> 482 </div> 483 @{ 484 if (Dynamicweb.Ecommerce.Common.Context.Cart != null && Pageview.User.GroupsIds.Contains(26) == false) 485 { 486 <div class="handlekurv">@String.Format("Levering: {0}<br />{2:dd.MM.yy} {1}", Translate(Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSDelivery").Value.ToString(), Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSDelivery").Value.ToString()), Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSComments").Value,"")</div> 487 } 488 } 489 </div> 490 } 491 </div> 492 </div> 493 </div> 494 495 <!-- Main navigation --> 496 <nav class="main-navigation dw-mod"> 497 <div class="center-container top-container__center-container dw-mod"> 498 <div class="grid"> 499 @RenderHeaderNavigation() 500 </div> 501 </div> 502 </nav> 503 504 break; 505 } 506 } 507 else 508 { 509 string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); 510 <!-- Main navigation --> 511 <nav class="main-navigation dw-mod @style"> 512 <div class="center-container top-container__center-container dw-mod"> 513 <div class="grid"> 514 @MobileNavigationTrigger() 515 516 <div class="logo u-max-w220px u-middle dw-mod"> 517 <a href="/Default.aspx?ID=@firstPageId"> 518 <img class="grid__cell-img u-w-100prc" src="@logo" alt="@businessName" /> 519 </a> 520 </div> 521 522 @if (!onlyPreview) 523 { 524 <ul class="menu dw-mod u-pull--right"> 525 @RenderMiniCart() 526 </ul> 527 } 528 </div> 529 </div> 530 </nav> 531 532 @* Mobile search *@ 533 <div class="u-padding"> 534 <div class="js-typeahead" data-page-size="10" id="MobileProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId"> 535 <input type="text" class="u-full-width js-typeahead-search-field u-no-margin" placeholder="@searchPlaceholder" value="@searchValue"> 536 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-search-content dw-mod" id="MobileProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false"></ul> 537 </div> 538 </div> 539 } 540 541 @* Impersonation bar *@ 542 @if (Model.CurrentUser.ID > 0 && Model.SecondaryUsers.Count > 0) 543 { 544 <div class="u-color-warning--bg"> 545 <div class="center-container top-container__center-container dw-mod"> 546 @*Impersonation*@ 547 <div class="grid"> 548 <div class="grid--align-self-center grid__col-x"> 549 @if (Model.CurrentSecondaryUser != null && Model.CurrentSecondaryUser.ID > 0) 550 { 551 string stopImpersonateTranslation = Translate("Stop impersonation"); 552 string username = ""; 553 if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.FirstName) && !string.IsNullOrEmpty(Model.CurrentSecondaryUser.LastName)) 554 { 555 username = Model.CurrentSecondaryUser.FirstName + " " + Model.CurrentSecondaryUser.LastName; 556 } 557 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Name)) 558 { 559 username = Model.CurrentSecondaryUser.Name; 560 } 561 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Email)) 562 { 563 username = Model.CurrentSecondaryUser.Email; 564 } 565 else 566 { 567 username = Model.CurrentSecondaryUser.UserName; 568 } 569 <div class="grid-cell"> 570 <div class="u-pull--left u-bold u-margin-top"> 571 <i class="fa fa-user-secret"></i> 572 @username<text>&nbsp;</text>@Translate("is impersonated by")<text>&nbsp;</text>@Pageview.User.UserName 573 </div> 574 <form method="post" class="u-pull--right u-no-margin"> 575 <input type="submit" class="btn btn--secondary dw-mod u-no-margin" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 576 </form> 577 </div> 578 } 579 else 580 { 581 string viewListTranslation = Translate("View the list of users you can impersonate"); 582 <div class="grid-cell u-bold"> 583 <i class="fa fa-user-secret"></i> 584 <a href="/Default.aspx?ID=@impersonationPageId" title="@viewListTranslation" class="u-color-font-black">@viewListTranslation</a> 585 </div> 586 } 587 </div> 588 </div> 589 </div> 590 </div> 591 } 592 </header> 593 594 <!-- Floating mini cart --> 595 @if (!onlyPreview && !stickyMenu && pageId == productsPageId && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 596 { 597 <div class="floating-mini-cart u-hidden dw-mod" id="FloatingMiniCart"> 598 <div class="mini-cart dw-mod"> 599 <a href="/Default.aspx?ID=@cartPageId&Purge=True" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'SecondaryMiniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 600 <i class="fa fa-shopping-cart fa-4x"></i> 601 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 602 <div class="js-handlebars-root js-mini-cart-counter" id="FloatingCartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-preloader="false" data-init-onload="false"> 603 <div class="js-mini-cart-counter-content"> 604 @Model.Cart.TotalProductsCount 605 </div> 606 </div> 607 </div> 608 </a> 609 610 <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="SecondaryMiniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 611 </div> 612 </div> 613 } 614 615 <!-- Render the content --> 616 <div id="Page" class="page @pagePos"> 617 <section class="center-container content-container dw-mod" id="content"> 618 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 619 620 621 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True" && String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("ListID"))) 622 { 623 <div class="grid__col-12 grid__col--bleed-y"> 624 @RenderNavigation(new 625 { 626 id = "breadcrumb", 627 template = "Breadcrumb.xslt" 628 }) 629 </div> 630 } 631 632 <div class="grid"> 633 @if (Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True") 634 { 635 var navigationMarkup = RenderNavigation(new 636 { 637 id = "leftnav", 638 cssclass = "menu dwnavigation", 639 startLevel = 2, 640 endlevel = 5, 641 template = "LeftNavigation.xslt" 642 }); 643 if (!string.IsNullOrEmpty(navigationMarkup)) 644 { 645 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12"> 646 <div class="grid"> 647 <div class="grid__col-12"> 648 <div class="grid__cell"> 649 @navigationMarkup 650 </div> 651 </div> 652 </div> 653 </nav> 654 } 655 } 656 <div class="grid__col-auto grid__col--bleed"> 657 <div class="grid"> 658 @* Divs count is equal divs in ParagraphContainer.cshtml *@ 659 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 660 </div> 661 </div> 662 </div> 663 </section> 664 </div> 665 </main> 666 @if (Model.CurrentUser.ID != 0) 667 { 668 @RenderFooter() 669 } 670 671 <!-- Content rendering helpers --> 672 673 @helper MobileNavigation(string userInitials) 674 { 675 int pageId = Model.TopPage.ID; 676 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 677 678 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 679 680 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 681 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 682 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 683 684 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 685 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 686 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 687 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 688 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 689 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 690 691 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 692 int startLevel = renderPagesInToolBar ? 1 : 0; 693 694 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 695 696 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 697 { 698 <!-- Trigger for mobile navigation --> 699 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger" /> 700 701 <!-- Mobile navigation --> 702 <nav class="mobile-navigation dw-mod"> 703 @if (Model.CurrentUser.ID > 0) 704 { 705 string userName = Model.CurrentUser.FirstName != null ? Model.CurrentUser.FirstName : ""; 706 userName += " " + Model.CurrentUser.LastName != null ? Model.CurrentUser.LastName : ""; 707 userName += userName == "" && Model.CurrentUser.UserName != null ? Model.CurrentUser.UserName : ""; 708 709 <ul class="menu menu-mobile"> 710 <li class="menu-mobile__item"> 711 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @userName</a> 712 </li> 713 </ul> 714 } 715 716 @RenderNavigation(new 717 { 718 id = "mobilenavigation", 719 cssclass = "menu menu-mobile dwnavigation", 720 startLevel = @startLevel, 721 ecomStartLevel = @startLevel + 1, 722 endlevel = @mobileNavigationLevels, 723 expandmode = "all", 724 template = "BaseMenuForMobile.xslt" 725 }) 726 727 @if (Model.Area.Item.GetBoolean("RenderPagesInToolBar")) 728 { 729 @RenderNavigation(new 730 { 731 id = "topToolsMobileNavigation", 732 cssclass = "menu menu-mobile dwnavigation", 733 template = "ToolsMenuForMobile.xslt" 734 }) 735 } 736 737 <ul class="menu menu-mobile"> 738 @if (Model.CurrentUser.ID <= 0) 739 { 740 <li class="menu-mobile__item"> 741 <label for="SignInModalTrigger" onclick="document.getElementById('MobileNavTrigger').checked = false;" class="menu-mobile__link dw-mod menu-mobile__link--highlighted"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Sign in")</label> 742 </li> 743 if (showCreateAccountLink) 744 { 745 <li class="menu-mobile__item"> 746 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Default.aspx?ID=@createAccountPageId"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Create account")</a> 747 </li> 748 } 749 } 750 else 751 { 752 if (showMyProfileLink) 753 { 754 <li class="menu-mobile__item"> 755 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("My Profile")</a> 756 </li> 757 } 758 if (showMyOrdersLink) 759 { 760 <li class="menu-mobile__item"> 761 <a href="/default.aspx?ID=@myOrdersPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-list menu-mobile__link-icon"></i> @Translate("My Orders")</a> 762 </li> 763 } 764 if (showMyFavoritesLink) 765 { 766 <li class="menu-mobile__item"> 767 <a href="/default.aspx?ID=@myFavoritesPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-star menu-mobile__link-icon"></i> @Translate("My Favorites")</a> 768 </li> 769 } 770 <li class="menu-mobile__item"> 771 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Sign out")</a> 772 </li> 773 } 774 @if (Model.Languages.Count > 0) 775 { 776 string selectedLanguage = ""; 777 foreach (var lang in Model.Languages) 778 { 779 if (lang.IsCurrent) 780 { 781 selectedLanguage = lang.Name; 782 } 783 } 784 785 <li class="menu-mobile__item dw-mod"> 786 <label for="MobileMenuCheck_Language" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-globe menu-mobile__link-icon"></i> @selectedLanguage</label> 787 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 788 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> 789 <ul class="menu-mobile menu-mobile__submenu expand-menu"> 790 @foreach (var lang in Model.Languages) 791 { 792 <li class="menu-mobile__item dw-mod"> 793 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod menu-mobile__link--level-1" href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId">@lang.Name</a> 794 </li> 795 } 796 </ul> 797 </li> 798 } 799 </ul> 800 </nav> 801 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 802 803 if (!onlyPreview) 804 { 805 <div class="u-visually-hidden js-handlebars-root js-mini-cart" id="miniCart" data-template="MiniCartContent" data-cart-id="@cartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 806 } 807 } 808 } 809 810 @helper LoginModal() 811 { 812 int pageId = Model.TopPage.ID; 813 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 814 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 815 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 816 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 817 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 818 string userSignedInErrorText = ""; 819 820 if (Model.LogOnFailed) 821 { 822 switch (Model.LogOnFailedReason) 823 { 824 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 825 userSignedInErrorText = Translate("Password length is invalid"); 826 break; 827 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 828 userSignedInErrorText = Translate("Invalid email or password"); 829 break; 830 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 831 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 832 break; 833 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 834 userSignedInErrorText = Translate("The user account is temporarily locked"); 835 break; 836 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 837 userSignedInErrorText = Translate("The password has expired and needs to be renewed"); 838 break; 839 default: 840 userSignedInErrorText = Translate("An unknown error occured"); 841 break; 842 } 843 } 844 else 845 { 846 if (Dynamicweb.Ecommerce.Common.Context.Cart == null) 847 { 848 Dynamicweb.Security.UserManagement.User curUser = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser(); 849 if (curUser != null) 850 { 851 var sqlStatement = "select * from EcomOrders where OrderCustomerAccessUserUserName = '" + curUser.UserName + "' and OrderStateId IS NULL and OrderShopId = 'SHOP1';"; 852 foreach (Dynamicweb.Ecommerce.Orders.Order o in Dynamicweb.Ecommerce.Orders.Order.GetOrders(sqlStatement, false)) 853 { 854 Dynamicweb.Ecommerce.Common.Context.SetCart(o); 855 return; 856 } 857 858 //Oppretter ny kurv dersom det ikke eksisterer noen fra før, hvis ikke så velger den første eksisterende. 859 Dynamicweb.Ecommerce.Orders.Order order = null; 860 861 order = new Dynamicweb.Ecommerce.Orders.Order(); 862 order.IsCart = true; 863 order.LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID; 864 order.ShopId = "SHOP1"; 865 order.CustomerAccessUserId = curUser.ID; 866 order.CustomerAccessUserUserName = curUser.UserName; 867 order.CurrencyName = "NOK"; 868 order.CurrencyRate = 100; 869 order.CustomerCompany = curUser.Company; 870 order.CustomerName = curUser.Name; 871 order.CustomerPhone = curUser.Phone; 872 order.CustomerEmail = curUser.Email; 873 order.CustomerAddress = curUser.Address; 874 order.CustomerAddress2 = curUser.Address2; 875 order.CustomerZip = curUser.Zip; 876 order.CustomerCity = curUser.City; 877 order.CustomerCountry = curUser.Country; 878 order.HasSetUserDetails = true; 879 order.CheckoutPageId = 530; 880 order.OrderFieldValues.GetOrderFieldValue("PTSDelivery").Value = "Første fraktfrie"; 881 order.OrderFieldValues.GetOrderFieldValue("PTSComments").Value = "Standard handlekurv"; 882 883 Dynamicweb.Ecommerce.Common.Context.SetCart(order); 884 } 885 } 886 } 887 <!-- Trigger for the login modal --> 888 <input type="checkbox" id="SignInModalTrigger" class="modal-trigger @topLayout" @userSignedInError /> 889 890 <!-- Login modal --> 891 <div class="modal-container"> 892 <label for="SignInModalTrigger" id="SignInModalOverlay" class="modal-overlay"></label> 893 <div class="modal modal--xs" id="SignInModal"> 894 <div class="modal__header"> 895 <h2>@Translate("Sign in")</h2> 896 </div> 897 <div class="modal__body"> 898 <form method="post" id="LoginForm" class="u-no-margin"> 899 <input type="hidden" name="ID" value="@pageId" /> 900 <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> 901 <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> 902 <input type="text" class="u-full-width" id="LoginUsername" name="username" placeholder="@Translate("Email")" /> 903 <input type="password" class="u-full-width" id="LoginPassword" name="password" placeholder="@Translate("Password")" /> 904 <div class="field-error dw-mod">@userSignedInErrorText</div> 905 906 <label> 907 <input type="checkbox" id="RememberMe" name="Autologin" checked="checked" value="True"> 908 <span>@Translate("Remember me", "Remember me")</span> 909 </label> 910 911 <button type="submit" class="btn btn--primary btn--full dw-mod" name="LoginAction" value="Login" onclick="Buttons.LockButton(event)">@Translate("Sign in")</button> 912 913 <a class="btn btn--link-clean dw-mod" href="/Default.aspx?id=@forgotPasswordPageId">@Translate("Forgot your password?", "Forgot your password?")</a> 914 915 <a class="btn btn--link-clean dw-mod" href="/default.aspx?ID=@createAccountPageId">@Translate("Create account")?</a> 916 </form> 917 </div> 918 </div> 919 </div> 920 } 921 922 @helper RenderHeaderNavigation() 923 { 924 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 925 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 926 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 927 int startLevel = renderPagesInToolBar ? 1 : 0; 928 929 if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 930 { 931 if (!megaMenu) 932 { 933 @RenderNavigation(new 934 { 935 id = "topnavigation", 936 cssclass = "menu dw-mod dwnavigation", 937 startLevel = @startLevel, 938 ecomStartLevel = @startLevel + 1, 939 endlevel = 5, 940 expandmode = "all", 941 template = "BaseMenuWithDropdown.xslt" 942 }); 943 } 944 else 945 { 946 @RenderNavigation(new 947 { 948 id = "topnavigation", 949 cssclass = "menu dw-mod dwnavigation", 950 startLevel = @startLevel, 951 ecomStartLevel = @startLevel + 1, 952 endlevel = 5, 953 promotionImage = megamenuPromotionImage, 954 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 955 expandmode = "all", 956 template = "BaseMegaMenu.xslt" 957 }); 958 } 959 } 960 } 961 962 @helper MobileNavigationTrigger() 963 { 964 @* Mobile navigation trigger *@ 965 966 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 967 { 968 <div class="menu dw-mod u-pull--left"> 969 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 970 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 971 </div> 972 </div> 973 } 974 } 975 976 @helper RenderLanguageSelector(string type = "inNavigation") 977 { 978 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean u-w40px dw-mod"; 979 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 980 981 @* Language selector *@ 982 if (Model.Languages.Count > 1) 983 { 984 <li class="@liClasses"> 985 <div class="@menuLinkClass u-w40px is-dropdown is-dropdown--no-icon dw-mod"> 986 <i class="fa fa-globe fa-1_5x"></i> 987 <div class="menu menu--dropdown u-w100px dw-mod"> 988 @foreach (var lang in Model.Languages) 989 { 990 <a href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId" class="menu-dropdown__item menu-dropdown__item--link dw-mod">@lang.Name</a> 991 } 992 </div> 993 </div> 994 </li> 995 } 996 } 997 998 @helper RenderMiniCart(string type = "inNavigation") 999 { 1000 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1001 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1002 1003 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1004 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 1005 int cartPageId = GetPageIdByNavigationTag("CartPage"); 1006 double cartProductsCount = Model.Cart.TotalProductsCount; 1007 1008 @* Mini cart *@ 1009 <li class="@liClasses"> 1010 <div class="mini-cart dw-mod"> 1011 <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="@menuLinkClass dw-mod js-mini-cart-button" onmouseenter="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 1012 <i class="fa fa-shopping-cart fa-1_5x"></i> 1013 <div class="mini-cart__counter mini-cart__counter--inline dw-mod"> 1014 <div class="js-handlebars-root js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> 1015 <div class="js-mini-cart-counter-content"> 1016 @cartProductsCount 1017 </div> 1018 </div> 1019 </div> 1020 </a> 1021 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1022 { 1023 <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="miniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 1024 } 1025 </div> 1026 </li> 1027 } 1028 1029 @helper RenderSignIn(string type = "inNavigation", string userInitials = "") 1030 { 1031 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu__item--clean u-w40px dw-mod"; 1032 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1033 1034 int pageId = Model.TopPage.ID; 1035 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 1036 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 1037 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 1038 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1039 string mySavedCardsPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("SavedCards").ToString() : GetPageIdByNavigationTag("SavedCards").ToString(); 1040 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1041 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1042 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 1043 1044 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 1045 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 1046 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 1047 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 1048 bool showMySavedCardsLink = Model.Area.Item.GetBoolean("ShowMySavedCardsLink"); 1049 1050 @* Sign in + Customer center links *@ 1051 <li class="@liClasses"> 1052 <div class="@menuLinkClass is-dropdown is-dropdown--no-icon u-w40px dw-mod"> 1053 @if (Model.CurrentUser.ID <= 0) 1054 { 1055 <i class="fa fa-user fa-1_5x"></i> 1056 } 1057 else 1058 { 1059 <a href="/default.aspx?ID=@myDashboardPageId" class="u-color-inherit"><div class="circle-icon-btn">@userInitials.ToUpper()</div></a> 1060 } 1061 1062 <div class="menu menu--dropdown sign-in-dropdown dw-mod"> 1063 <ul class="list list--clean dw-mod"> 1064 @if (Model.CurrentUser.ID <= 0) 1065 { 1066 <li> 1067 <label for="SignInModalTrigger" class="btn btn--primary btn--full u-no-margin sign-in-modal-trigger-button dw-mod" onclick="setTimeout(function () { document.getElementById('LoginUsername').focus() }, 10)">@Translate("Sign in")</label> 1068 </li> 1069 if (showCreateAccountLink) 1070 { 1071 <li> 1072 <a href="/default.aspx?ID=@createAccountPageId" class="list__link dw-mod">@Translate("Create account")</a> 1073 </li> 1074 } 1075 <li> 1076 <a href="/default.aspx?ID=@forgotPasswordPageId" class="list__link dw-mod">@Translate("Forgot your password?")</a> 1077 </li> 1078 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1079 { 1080 <li class="list__seperator dw-mod"></li> 1081 } 1082 } 1083 @if (showMyProfileLink) 1084 { 1085 <li> 1086 <a href="/default.aspx?ID=@myProfilePageId" class="list__link dw-mod"><i class="fa fa-user"></i> @Translate("My Profile")</a> 1087 </li> 1088 } 1089 @if (showMyOrdersLink) 1090 { 1091 <li> 1092 <a href="/default.aspx?ID=@myOrdersPageId" class="list__link dw-mod"><i class="fa fa-list"></i> @Translate("My Orders")</a> 1093 </li> 1094 } 1095 @if (showMyFavoritesLink) 1096 { 1097 <li> 1098 <a href="/default.aspx?ID=@myFavoritesPageId" class="list__link dw-mod"><i class="fa fa-star"></i> @Translate("My Favorites")</a> 1099 </li> 1100 } 1101 @if (showMySavedCardsLink) 1102 { 1103 <li> 1104 <a href="/default.aspx?ID=@mySavedCardsPageId" class="list__link dw-mod"><i class="fa fa-credit-card"></i> @Translate("My Saved cards")</a> 1105 </li> 1106 } 1107 @if (Model.CurrentUser.ID > 0) 1108 { 1109 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1110 { 1111 <li class="list__seperator dw-mod"></li> 1112 } 1113 <li> 1114 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId" class="list__link dw-mod">@Translate("Sign out")</a> 1115 </li> 1116 } 1117 </ul> 1118 </div> 1119 </div> 1120 </li> 1121 } 1122 1123 @helper RenderFavorites(string type = "inNavigation") 1124 { 1125 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean u-w40px dw-mod"; 1126 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1127 1128 string myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1129 1130 @* Favorites *@ 1131 if (Model.CurrentUser.ID > 0) 1132 { 1133 <li class="@liClasses"> 1134 <a href="/Default.aspx?ID=@myFavoritesPageId" class="@menuLinkClass dw-mod"> 1135 <i class="fa fa-star fa-1_5x"></i> 1136 </a> 1137 </li> 1138 } 1139 } 1140 1141 1142 @helper RenderFooter() 1143 { 1144 string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; 1145 string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; 1146 string footerColumnThreeContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnThree")) ? Model.Area.Item.GetString("FooterColumnThree") : ""; 1147 string footerColumnOneHeader = Model.Area.Item.GetString("FooterColumnOneHeader"); 1148 string footerColumnTwoHeader = Model.Area.Item.GetString("FooterColumnTwoHeader"); 1149 string footerColumnThreeHeader = Model.Area.Item.GetString("FooterColumnThreeHeader"); 1150 int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); 1151 1152 <!-- Footer section --> 1153 <footer class="footer dw-mod"> 1154 <div class="center-container top-container__center-container dw-mod"> 1155 <div class="grid"> 1156 @if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) 1157 { 1158 <div class="grid__col-md-auto"> 1159 <h4 class="footer__heading dw-mod">@footerColumnOneHeader</h4> 1160 <div class="footer__content dw-mod"> 1161 @footerColumnOneContent 1162 </div> 1163 </div> 1164 } 1165 @if (!string.IsNullOrEmpty(footerColumnTwoContent) || !string.IsNullOrEmpty(footerColumnTwoHeader)) 1166 { 1167 <div class="grid__col-md-auto"> 1168 <h4 class="footer__heading dw-mod">@footerColumnTwoHeader</h4> 1169 <div class="footer__content dw-mod"> 1170 @footerColumnTwoContent 1171 </div> 1172 </div> 1173 } 1174 @if (!string.IsNullOrEmpty(footerColumnThreeContent) || !string.IsNullOrEmpty(footerColumnThreeHeader)) 1175 { 1176 <div class="grid__col-md-auto"> 1177 <h4 class="footer__heading dw-mod">@footerColumnThreeHeader</h4> 1178 <div class="footer__content dw-mod"> 1179 @footerColumnThreeContent 1180 </div> 1181 </div> 1182 } @* 1183 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 1184 { 1185 <div class="grid__col-md-auto"> 1186 <h4 class="footer__heading dw-mod">@Translate("Mailing list", "Mailing list")</h4> 1187 <div class="footer__content dw-mod"> 1188 <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> 1189 <form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 1190 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden" /> 1191 <div class="form__field-combi"> 1192 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 1193 <input class="btn btn--primary btn--condensed dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 1194 </div> 1195 </form> 1196 </div> 1197 </div> 1198 }*@ 1199 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 1200 { 1201 <div class="grid--align-self-end"> 1202 <h4 class="footer__heading dw-mod">@Translate("Social links", "Social links")</h4> 1203 <div class="footer__content dw-mod"> 1204 <div class="collection dw-mod"> 1205 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 1206 { 1207 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 1208 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 1209 string socialIconClass = socialIcon.SelectedValue; 1210 string socialIconTitle = socialIcon.SelectedName; 1211 string socialLink = socialitem.GetString("Link"); 1212 1213 <a href="@socialLink" target="_blank" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x"></i></a> 1214 } 1215 </div> 1216 </div> 1217 </div> 1218 } 1219 <div class="grid__col-12 footer__copyright dw-mod"> 1220 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 1221 </div> 1222 </div> 1223 </div> 1224 </footer> 1225 } 1226 1227 1228 @* Templates for Typeahead *@ 1229 <script id="SearchGroupsTemplate" type="text/x-template"> 1230 {{#.}} 1231 <li class="dropdown__item dw-mod" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 1232 {{/.}} 1233 </script> 1234 1235 <script id="SearchContentTemplate" type="text/x-template"> 1236 {{#each .}} 1237 {{#Product}} 1238 {{#ifCond template "!==" "SearchMore"}} 1239 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1240 <div> 1241 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 1242 <div class="u-margin-right u-pull--left {{noimage}} u-hidden-xs u-hidden-xxs"><img src="/Admin/Public/GetImage.ashx?width=45&height=36&crop=5&FillCanvas=True&Compression=75&image={{image}}" alt="{{name}}"></div> 1243 <div class="u-pull--left"> 1244 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{productId}}</div> 1245 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 1246 @if (!onlyPreview) 1247 { 1248 <div class="{{onlyPreview}}">{{price}}</div> 1249 } 1250 </div> 1251 </a> 1252 <div class="u-margin-left u-pull--right u-w80px u-hidden-xs u-hidden-xxs"> 1253 <button class="btn btn--primary btn--condensed btn--full u-no-margin dw-mod {{hideBuyOptions}} js-ignore-click-outside" onclick="Cart.AddToCart(event, '{{productId}}', '1')"><i class="fa fa-shopping-cart js-ignore-click-outside"></i></button> 1254 <a href="{{link}}" class="btn btn--secondary btn--condensed btn--full u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View")</a> 1255 </div> 1256 </div> 1257 </li> 1258 {{/ifCond}} 1259 {{#ifCond template "===" "SearchMore"}} 1260 {{>SearchMore}} 1261 {{/ifCond}} 1262 {{/Product}} 1263 {{else}} 1264 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1265 @Translate("No products found") 1266 </li> 1267 {{/each}} 1268 </script> 1269 1270 <script id="SearchMore" type="text/x-template"> 1271 <li class="dropdown__item dropdown__item--not-selectable dw-mod"> 1272 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 1273 @Translate("View all") 1274 </a> 1275 </li> 1276 </script> 1277 1278 @* Templates for the mini cart *@ 1279 <script id="MiniCartCounterContent" type="text/x-template"> 1280 {{#.}} 1281 <div class="js-mini-cart-counter-content dw-mod"> 1282 {{numberofproducts}} 1283 </div> 1284 {{/.}} 1285 </script> 1286 <script id="MiniCartContent" type="text/x-template"> 1287 {{#.}} 1288 <div class="mini-cart-dropdown__inner {{isempty}} dw-mod"> 1289 <h4 class="u-ta-center u-no-margin u-margin-bottom u-margin-top">@Translate("Shopping cart")</h4> 1290 @{ 1291 if (Dynamicweb.Ecommerce.Common.Context.Cart != null) 1292 { 1293 <div class="handlekurvmini">@String.Format("Levering: {0}<br />{2:dd.MM.yy} {1}", Translate(Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSDelivery").Value.ToString(), Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSDelivery").Value.ToString()), Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSComments").Value, "")</div> 1294 } 1295 } 1296 1297 1298 @*DateTime.Parse(Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSDeliveryDate").Value.ToString()).Year > 1970 ? Dynamicweb.Ecommerce.Common.Context.Cart.OrderFieldValues.GetOrderFieldValue("PTSDeliveryDate").Value : ""*@ 1299 <div class="mini-cart-dropdown__body dw-mod"> 1300 <table class="table mini-cart-table dw-mod"> 1301 <thead> 1302 <tr> 1303 <td>&nbsp;</td> 1304 <td>@Translate("Product")</td> 1305 <td class="u-ta-right">@Translate("Qty")</td> 1306 <td class="u-ta-right" width="120">@Translate("Price")</td> 1307 </tr> 1308 </thead> 1309 1310 {{#OrderLines}} 1311 {{#ifCond template "===" "CartOrderline"}} 1312 {{>MiniCartOrderline}} 1313 {{/ifCond}} 1314 {{#ifCond template "===" "CartOrderlineMobile"}} 1315 {{>MiniCartOrderlineMobile}} 1316 {{/ifCond}} 1317 {{#ifCond template "===" "CartOrderlineDiscount"}} 1318 {{>MiniCartOrderlineDiscount}} 1319 {{/ifCond}} 1320 {{/OrderLines}} 1321 @* 1322 <tr> 1323 <td><i class="fa fa-credit-card"></i></td> 1324 <td>{{paymentmethod}}</td> 1325 <td colspan="2" class="u-ta-right" width="130">{{paymentfee}}</td> 1326 </tr> 1327 <tr> 1328 <td><i class="fa fa-truck"></i></td> 1329 <td>{{shippingmethod}}</td) 1330 <td colspan="2" class="u-ta-right" width="130">{{shippingfee}}</td> 1331 </tr> 1332 *@ 1333 <tr class="mini-cart-totals dw-mod"> 1334 <td colspan="2">@Translate("Total")</td> 1335 <td class="u-ta-right">{{numberofproducts}}</td> 1336 <td class="u-ta-right" width="130">{{totalprice}}</td> 1337 </tr> 1338 </table> 1339 </div> 1340 1341 <table class="table mini-cart-table dw-mod"> 1342 <tr class="mini-cart-orderlines__footer dw-mod"> 1343 @*<td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td>*@ 1344 <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="PTSEmptyCart(event)">@Translate("Empty cart")</button></td> 1345 <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a></td> 1346 </tr> 1347 </table> 1348 </div> 1349 {{/.}} 1350 </script> 1351 1352 <script id="MiniCartOrderline" type="text/x-template"> 1353 <tr class="{{isempty}}"> 1354 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}"></a></td> 1355 <td> 1356 <a href="{{link}}" class="mini-cart-orderlines__name" title="{{productnumber}}">{{productnumber}}</a> 1357 <a href="{{link}}" class="mini-cart-orderlines__name item-number">{{variantname}}</a> 1358 <div class="item-number">{{unitname}}</div> 1359 </td> 1360 <td class="u-ta-right">{{quantity}}</td> 1361 <td class="u-ta-right">{{totalprice}}</td> 1362 </tr> 1363 </script> 1364 1365 <script id="MiniCartOrderlineMobile" type="text/x-template"> 1366 <tr class="{{isempty}}"> 1367 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}"></a></td> 1368 <td> 1369 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 1370 <a href="{{link}}" class="mini-cart-orderlines__name item-number">{{variantname}}</a> 1371 <div class="item-number">{{unitname}}</div> 1372 </td> 1373 <td class="u-ta-right">{{quantity}}</td> 1374 <td class="u-ta-right">{{totalprice}}</td> 1375 </tr> 1376 </script> 1377 1378 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 1379 <tr class="table__row--no-border {{isempty}}"> 1380 <td>&nbsp;</td> 1381 <td><div class="mini-cart-orderlines__name dw-mod">{{name}}</div></td> 1382 <td class="u-ta-right">&nbsp;</td> 1383 <td class="u-ta-right">{{totalprice}}</td> 1384 </tr> 1385 </script> 1386 1387 <!-- Javascript --> 1388 <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 1389 <script src="/Files/Templates/Designs/Rapido/js/master.min.js"></script> 1390 1391 @if (Model.Area.Item.GetBoolean("UseCustomJavascript")) 1392 { 1393 <script src="/Files/Templates/Designs/Rapido/js/custom.min.js"></script> 1394 } 1395 1396 <script> 1397 Wireframe.Init(@wireframeMode.ToLower()); 1398 </script> 1399 </body> 1400 </html> 1401 1402