Error executing template "Designs/Tapas/_parsed/retailer-details.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_c981132447a5440f87852b51001eb635.Execute() in E:\Data\Dynamicweb.net\asg.dw9.LIVE\Application\Files\Templates\Designs\Tapas\_parsed\retailer-details.parsed.cshtml:line 706
   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 RazorTemplateBase<RazorTemplateModel<Template>> 2 @using Dynamicweb.Rendering; 3 @using System.Collections.Generic; 4 5 @{ 6 object objInstantSearchId = (object)null; 7 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("InstantSearchId", ref objInstantSearchId); 8 int instantSearchId = int.Parse(objInstantSearchId.ToString()); 9 10 object objProductCatalogId = (object)null; 11 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("ProductCatalogId", ref objProductCatalogId); 12 int productCatalogId = int.Parse(objProductCatalogId.ToString()); 13 14 object objSearchResultPageId = (object)null; 15 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("SearchResultId", ref objSearchResultPageId); 16 int searchResultPageId = int.Parse(objSearchResultPageId.ToString()); 17 18 object objLoginId = (object)null; 19 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("LoginId", ref objLoginId); 20 int loginId = int.Parse(objLoginId.ToString()); 21 22 object objFooterId = (object)null; 23 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("FooterId", ref objFooterId); 24 int footerId = int.Parse(objFooterId.ToString()); 25 26 object objToolbarLinksId = (object)null; 27 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("ToolbarLinksId", ref objToolbarLinksId); 28 int ToolbarLinksId = int.Parse(objFooterId.ToString()); 29 30 object objCheckoutId = (object)null; 31 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("CheckoutId", ref objCheckoutId); 32 int checkoutId = int.Parse(objCheckoutId.ToString()); 33 34 object objNewsletterId = (object)null; 35 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("NewsletterId", ref objNewsletterId); 36 int newsletterId = int.Parse(objNewsletterId.ToString()); 37 38 object objLogo = (object)null; 39 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("Logo", ref objLogo); 40 string logo = objLogo.ToString(); 41 42 object objPremiumLogo = (object)null; 43 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("PremiumLogo", ref objPremiumLogo); 44 string premiumLogo = objPremiumLogo.ToString(); 45 46 string homeLink = "/Default.aspx?id=" + GetString("DwAreaFirstPageID"); 47 48 object objExcelPageId = (object)null; 49 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("ExcelPageId", ref objExcelPageId); 50 int ExcelPageId = int.Parse(objExcelPageId.ToString()); 51 52 var CurrentUser = Dynamicweb.Security.UserManagement.User.GetCurrentUser(); 53 bool isVip = Tapas.Erp.User.GetCustomFieldValueBool(CurrentUser, "FirstwebIsVip"); 54 string action = GetString("DWExtranetAction"); 55 string userName = GetString("DWExtranetUsername"); 56 string password = GetString("DWExtranetPassword"); 57 string rememberUsername = GetString("DWExtranetUsernameRemember"); 58 string rememberPassword = GetString("DWExtranetPasswordRemember"); 59 string pageid = GetGlobalValue("Global:Page.ID"); 60 bool loggedIn = Int32.Parse(GetGlobalValue("Global:Extranet.UserID")) > 0 ? true : false; 61 62 object objSearchResultId = (object)null; 63 Dynamicweb.Frontend.PageView.Current().Area.Item.TryGetValue("SearchResultId", ref objSearchResultId); 64 int searchResultId = int.Parse(objSearchResultId.ToString()); 65 66 var websiteLoop = GetLoop("Item.Area.Websites"); 67 string currentAreaId = GetString("DwAreaID"); 68 69 var isCheckout = false; 70 if (checkoutId == int.Parse(pageid)) 71 { 72 isCheckout = true; 73 } 74 75 bool enableDiscountCampaign = Dynamicweb.Core.Converter.ToBoolean( Pageview.Area.Item [ "EnableCampaign" ] ); 76 string enableDiscountCampaignCss = enableDiscountCampaign ? "col-xs-12 col-sm-8 col-md-5" : "col-md-4 col-sm-10 col-xs-10"; 77 if(!loggedIn) 78 { 79 enableDiscountCampaignCss = "col-lg-5"; 80 } 81 int CreateFormParagraphId = GetInteger("Item.Area.CreateNewsletterSubscriberParagraphId.Value"); 82 string ApprovalKey = System.Web.HttpContext.Current.Request.QueryString["approvalKey"]; 83 string GTMId = GetString("Item.Area.GTM_Id"); 84 string AssetVersion = "3.0.10"; 85 86 string globeIcon = GetString("Item.Area.Globe.Value"); 87 } 88 89 <!doctype html> 90 <html lang="en"> 91 92 <head> 93 <script> 94 window.dataLayer = window.dataLayer || []; 95 dataLayer.push( { 96 'LoggedIn': '@loggedIn.ToString().ToLower()', 97 } ); 98 </script> 99 @if (!String.IsNullOrEmpty(GTMId)) 100 { 101 <!-- Google Tag Manager --> 102 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 103 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 104 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 105 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 106 })(window,document,'script','dataLayer','@GTMId');</script> 107 <!-- End Google Tag Manager --> 108 } 109 <title>@GetValue("Title")</title> 110 @GetValue("MetaTags") 111 @GetValue("CopyRightNotice") 112 113 <meta charset="utf-8"> 114 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 115 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> 116 <link rel="apple-touch-icon" sizes="57x57" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-57x57.png"> 117 <link rel="apple-touch-icon" sizes="60x60" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-60x60.png"> 118 <link rel="apple-touch-icon" sizes="72x72" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-72x72.png"> 119 <link rel="apple-touch-icon" sizes="76x76" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-76x76.png"> 120 <link rel="apple-touch-icon" sizes="114x114" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-114x114.png"> 121 <link rel="apple-touch-icon" sizes="120x120" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-120x120.png"> 122 <link rel="apple-touch-icon" sizes="144x144" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-144x144.png"> 123 <link rel="apple-touch-icon" sizes="152x152" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-152x152.png"> 124 <link rel="apple-touch-icon" sizes="180x180" href="/Files/Templates/Designs/Tapas/assets/fav/apple-icon-180x180.png"> 125 <link rel="icon" type="image/png" sizes="192x192" href="/Files/Templates/Designs/Tapas/assets/fav/android-icon-192x192.png"> 126 <link rel="icon" type="image/png" sizes="32x32" href="/Files/Templates/Designs/Tapas/assets/fav/favicon-32x32.png"> 127 <link rel="icon" type="image/png" sizes="96x96" href="/Files/Templates/Designs/Tapas/assets/fav/favicon-96x96.png"> 128 <link rel="icon" type="image/png" sizes="16x16" href="/Files/Templates/Designs/Tapas/assets/fav/favicon-16x16.png"> 129 <link rel="manifest" href="/Files/Templates/Designs/Tapas/assets/fav/manifest.json"> 130 <meta name="msapplication-TileColor" content="#ffffff"> 131 <meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> 132 <meta name="theme-color" content="#ffffff"> 133 134 @if (System.Web.HttpContext.Current.Request.Url.Host.ToLower().Contains("1stweb")) 135 { 136 <meta name="robots" content="noindex"> 137 } 138 139 <!-- 140 Made by: 141 1st Web 142 Klostergade 56 B 2 th. 143 8000 Aarhus C. 144 www.1stweb.dk 145 --> 146 <!--inject:css--> 147 <link rel="stylesheet" href="/Files/Templates/Designs/Tapas/assets/min/library.min.css?v=@AssetVersion"> 148 <link rel="stylesheet" href="/Files/Templates/Designs/Tapas/assets/min/main.min.css?v=@AssetVersion"> 149 <!--endinject--> 150 151 @foreach (var script in GetLoop("Item.Area.Scripts")) 152 { 153 @script.GetString("Item.Area.Scripts.Script") 154 } 155 @GetValue("Stylesheets") 156 @GetValue("Javascripts") 157 </head> 158 159 <body data-userauthenticated="@loggedIn.ToString().ToLower()" data-bind="click: closeMenu(), css: { 'loading': load().active, 'loaded' : true }"> 160 @if (!String.IsNullOrEmpty(GTMId)) 161 { 162 <!-- Google Tag Manager (noscript) --> 163 <noscript> 164 <iframe src="https://www.googletagmanager.com/ns.html?id=@GTMId" height="0" width="0" style="display:none;visibility:hidden"></iframe> 165 </noscript> 166 <!-- End Google Tag Manager (noscript) --> 167 } 168 <div class="desktopSection lightBg" data-bind="css: { 'open': showResponsiveMenu }"> 169 <div class="height-animation"> 170 <header class="header"> 171 <div class="master-container"> 172 <div class="primary-header"> 173 <div class="container on-float-padding-right-0"> 174 <div class="primary-header-container"> 175 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 176 <div class="row"> 177 <div class="hide-on-float"> 178 <!-- mobile language dropdown --> 179 <div class="flags mobile-flags col-lg-1 col-md-1 col-sm-1 visible-xs"> 180 @if ( websiteLoop.Count > 0 && !loggedIn ) 181 { 182 var websiteItem = websiteLoop.FirstOrDefault( w => w.GetString( "Item.Area.Websites.AreaId" ) == currentAreaId ); 183 var currentLabel = websiteItem.GetString( "Item.Area.Websites.Label" ); 184 <div class="dropdown primary-dropdown m-t-0"> 185 <a class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> 186 @if (string.IsNullOrEmpty(globeIcon)) 187 { 188 <img class="img-responsive inline m-r-5 flag-icon" src="/Files/Templates/Designs/Tapas/assets/img/globe.png" alt='@Translate( "regionicon", "Region icon" )'> 189 } 190 else 191 { 192 <img class="img-responsive inline m-r-5 flag-icon" src="@globeIcon" alt='@Translate( "regionicon", "Region icon" )'> 193 } 194 @Translate( "AreaSite." + websiteItem.GetString( "Item.Area.Websites.AreaId" ), currentLabel ) 195 <span class="caret"></span> 196 </a> 197 198 <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> 199 @foreach ( var item in websiteLoop ) 200 { 201 string areaId = item.GetString( "Item.Area.Websites.AreaId" ); 202 string globalAreaId = GetGlobalValue( "Global:Area.ID" ); 203 string label = item.GetString( "Item.Area.Websites.Label" ); 204 string link = item.GetString( "Item.Area.Websites.Link" ); 205 bool selectedArea = areaId == globalAreaId; 206 207 <li> 208 <a href="@link"> 209 @Translate( "AreaSiteLabel." + areaId, label ) 210 </a> 211 @if ( selectedArea) 212 { 213 <i class="fal fa-check"></i> 214 } 215 </li> 216 } 217 </ul> 218 </div> 219 } 220 </div> 221 222 <div class="col-md-7 col-sm-7 col-xs-10 primary-links hidden-sm hidden-xs"> 223 @GetValue("DwNavigation(dwtopnav)") 224 </div> 225 </div> 226 227 <div class="@enableDiscountCampaignCss quicklinks-container pull-right"> 228 229 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 230 @using System.Collections.Generic; 231 @using Dynamicweb.Rendering; 232 233 @{ 234 //topbar icons 235 string loginIcon = GetString("Item.Area.LoginIcon"); 236 string loginSvg = GetString("Item.Area.LoginIconSvg"); 237 string searchIcon = GetString("Item.Area.SearchIcon"); 238 string searchSvg = GetString("Item.Area.SearchSvg"); 239 } 240 241 <div class="quick-links"> 242 <div class="row menu-fix"> 243 @if ( loggedIn ) 244 { 245 <div class="link quick-links_login item" data-bind="with: LoginViewModel, menu"> 246 <span class="icon-user pointer-events-none"> 247 </span> 248 <div class="dropDown"> 249 <div class="dropDown-header"> 250 <span>@CurrentUser.Company</span> 251 </div> 252 <div class="dropDown-body"> 253 <div class="row"> 254 @GetValue("DwNavigation(userNavNav)") 255 </div> 256 </div> 257 </div> 258 </div> 259 } 260 else 261 { 262 string mailSubject = Translate("ForgotPasswordMail.Subject", "New password for ActionSportGames. You can change your password on My Page after login."); 263 <div class="link quick-links_login item" data-bind="viewModel: Asg.ViewModels.LoginViewModel, menu, focusFirstInputOfTypeOnClick: { type: 'text' }"> 264 <!-- ko initValue: {observable: areaId, value:'@currentAreaId'}--><!-- /ko--> 265 <!-- ko initValue: {observable: mailSubject, value:'@mailSubject'}--><!-- /ko--> 266 <span class="pointer-events-none top-icon"> 267 @if (String.IsNullOrEmpty(loginSvg)) 268 { 269 <i class="@loginIcon f6"></i> 270 } 271 else 272 { 273 <img src="@loginSvg" alt="Alternate Text" height="22"> 274 } 275 <span class="text-center">@Translate("TopBar.LogIn", "Login")</span> 276 </span> 277 <div class="dropDown"> 278 <div class="dropDown-header"> 279 @Translate("login", "Login") 280 </div> 281 <div class="dropDown-body"> 282 <div data-bind="visible: ToggleForgottenPassword"> 283 <form name="ExtUserForm" id="ExtUserForm" method="post" action="@action"> 284 285 <div class="form-group"> 286 <label for="InputEmail1">@Translate("username", "Username")</label> 287 <input type="text" class="form-control textBox" id="InputEmail1" name="Username" value="@userName" data-bind="value: UserName" required=""> 288 </div> 289 <div class="form-group"> 290 <label for="InputPassword1">@Translate("password", "Password")</label> 291 <input type="password" class="form-control textBox" id="InputPassword1" name="Password" value="@password" data-bind="value: Password" required=""> 292 </div> 293 <div class="loginActions pull-left"> 294 <span data-bind="toggleClick: ToggleForgottenPassword">@Translate("forgottenpassword", "Forgotten password")</span> 295 <label class="customCheckbox"> 296 <input type="checkbox" name="Autologin" data-bind="checked: rememberMe"> 297 <i class="customCheckMark"></i> 298 @Translate("stayloggedin", "Keep me signed in") 299 </label> 300 </div> 301 <button class="btn secondary-btn" data-bind="click: Login, toggleClick: Loader"> 302 <span data-bind="visible: Loader">@Translate("login", "Login")</span> 303 <span data-bind="visible: !Loader()" class="disabled"> 304 <span data-bind="visible: !LoginFailed()"> 305 @Translate("pleasewait", "Please wait") 306 </span> 307 <span data-bind="visible: LoginFailed"> 308 @Translate("error", "error") 309 </span> 310 311 </span> 312 </button> 313 </form> 314 <div class="form-group" data-bind="value: loginId = @loginId"> 315 <div class="alert-danger err" data-bind="visible: LoginFailed"><p>@Translate("incorrectmailorpassword", "Incorrect email or password, please try again")</p></div> 316 </div> 317 </div> 318 319 <div data-bind="visible: !ToggleForgottenPassword()"> 320 <form name="ExtUserForm" id="ExtUserForm" method="post" action="@action" data-bind="submit: recover"> 321 <div class="back" data-bind="toggleClick: ToggleForgottenPassword"><span>< </span>@Translate("back", "Back")</div> 322 <div class="form-group"> 323 <label for="Inputemail2">@Translate("email", "Email")</label> 324 <input type="email" class="form-control textBox" id="Inputemail2" name="Email" placeholder='@Translate("email", "Email")' data-bind="value: email" required=""> 325 </div> 326 <button type="submit" class="btn secondary-btn"> 327 <span data-bind="visible: !ForgottenLoader()"> 328 @Translate("getpassword", "Get password") 329 </span> 330 <span class="disabled" data-bind="visible: ForgottenLoader"> 331 @Translate("pleasewait", "Please wait") 332 </span> 333 </button> 334 </form> 335 <span class="f2 secondary-font" data-bind="visible: confirm"> 336 @Translate("pleasecheckmail", "Please check your mail") 337 </span> 338 <span class="f2 secondary-font" data-bind="visible: error"> 339 @Translate("errorms", "An error occurred") 340 </span> 341 </div> 342 </div> 343 </div> 344 </div> 345 } 346 @if ( loggedIn ) 347 { 348 <div class="link quick-links_instant item" data-bind="menu, focusFirstInputOnClick, focusFirstInputOfTypeOnClick: {}"> 349 <span class="icon-light-bolt pointer-events-none"></span> 350 <div data-bind="viewModel: Tapas.ViewModels.QuickOrderViewModel"> 351 <div class="dropDown"> 352 <div data-bind="quickOrder: '.QuickAddproductCount'"> 353 <form name="EcomSearch" id="quickOrderForm" method="get" action="Default.aspx" data-bind='submit: AddProductOnSubmit, value: instantSearchPageId(@instantSearchId), loadOnBool: { observableBool: CartLoading, text: "@Translate("updatecart", "Opdatere kurv")" }' ftw-quantity="1" ftw-productid="" ftw-variantid="" ftw-unitid="" ftw-alreadyincart=""> 354 <div class="dropDown-header"> 355 <div class="instantBuySearch"> 356 <div class="icon icon-magnifying-glass"></div> 357 <input type="text" class="idSearch" id="instantBuySearch" autocomplete="off" name="Search" data-bind="textInput: searchQuery"> 358 <input type="text" class="category productName" disabled=""> 359 <input type="tel" value="1" class="number" id="quickOrderQuantity"> 360 <button class="btn primary-btn quickAdd addToCart" data-bind="css: { animate: searchLoading }"><i class="icon-add-to-cart f2"></i></button> 361 <a href="/Default.aspx?ID=@ExcelPageId" class="btn primary-btn quickAdd addToCart excel"><span class="icon-icon f2"></span></a> 362 </div> 363 </div> 364 <div class="dropDown-body searchResults result" data-bind="html: result, visible: allResults"> 365 </div> 366 </form> 367 </div> 368 </div> 369 <div class="modal fade js-quickorder-already-in-cart-modal quickorder-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> 370 <div class="modal-dialog" role="document"> 371 <div class="modal-content"> 372 <div class="modal-header"> 373 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 374 </div> 375 <div class="modal-body"> 376 <p class="f8">@Translate("ProductAlreadyInCart.Header", "This product is already in your cart")</p> 377 <div> 378 <div class="btn secondary-btn grey big m-b-sm-15 uppercase quickAddPage addToCart" data-dismiss="modal" data-bind="click: ResetQuickOrder">@Translate("ProductAlreadyInCart.Cancel", "Cancel")</div> 379 <button class="btn secondary-btn big m-b-sm-15 uppercase quickAddPage addToCart" data-dismiss="modal" data-bind="click: QuickOrderAddExistingProduct">@Translate("ProductAlreadyInCart.Confirm", "Add to cart")</button> 380 </div> 381 </div> 382 </div> 383 </div> 384 </div> 385 </div> 386 </div> 387 } 388 <div class="link quick-links_search item" data-bind="menu, focusFirstInputOfTypeOnClick: {}"> 389 <span class="pointer-events-none top-icon"> 390 @if (String.IsNullOrEmpty(searchSvg)) 391 { 392 <i class="@searchIcon f6"></i> 393 } 394 else 395 { 396 <img src="@searchSvg" alt="" height="22"> 397 } 398 <span class="text-center">@Translate("TopBar.Search", "Search")</span> 399 </span> 400 <div class="dropDown" data-bind="viewModel: Asg.ViewModels.SolrSearchViewModel"> 401 <!-- ko initValue: {observable: productPageId, value:@productCatalogId}--><!-- /ko--> 402 <!-- ko initValue: {observable: resultPageId, value:@searchResultPageId}--><!-- /ko--> 403 <div data-bind="mouseTrap: { keySequence:['down', 'up', 'enter'], handler : handleKeys}"> 404 <div class="dropDown-header" data-bind='loadOnBool: { observableBool: CartLoading, text: "@Translate("addproduct", "Adding product")" }'> 405 <div class="icon icon-magnifying-glass" data-bind="css: { animate: searchLoading }"></div> 406 <input type="text" id="instantSearch" data-bind="textInput: query" autocomplete="off" name="Search"> 407 </div> 408 <div class="dropDown-body searchResults" data-bind="visible: showSeeAllResults"> 409 <div id="searchQueryResult" class="instant-search" data-bind="initValue: {observable : CurrentRegionFilterValue, value: '@Firstweb.Custom.CustomCode.Helper.GetCurrentRegion()'}"> 410 <div class="productList instantSearchList" id="productList"> 411 <div class="section list"> 412 <div class="col-md-12 col-sm-12 col-xs-12 customTable resultContainer" data-bind="foreach : searchResult().response.docs"> 413 <div class="container-fluid row tableRow productCount" data-bind="css: { 'active-background' : $parent.selectedIndex() == $index()}"> 414 <div class="row rows"> 415 <a href="#" data-bind="click : $parent.gotoProductPage"> 416 <div class="p-l-0 col-lg-2 col-md-2 col-sm-2 col-xs-2"> 417 <img class="img-responsive discount-icon" data-bind="attr: {src : '/admin/public/getimage.ashx?image=' + Image + '&altFmImage_path=/Files/Images/ecom/no-imageasg.png&width=175&height=132&crop=5'}"> 418 <!-- BEGIN markup for instant search result with discount grup code. just need implementation--> 419 <div class="discounted-product-qsearch" data-bind="style: { 'backgroundImage' : 'url(' + ImagePathVarerabatgruppekode + ')' }, 420 visible: $root.User().IsLoggedIn()"> 421 <span data-bind="text: TextVarerabatgruppekode">M</span> 422 </div> 423 <!-- END markup for instant search result with discount grup code --> 424 </div> 425 426 <div class="p-r-0 p-l-0 col-lg-6 col-md-6 col-sm-6 col-xs-6"> 427 <div class="productName" data-bind="text : ProductName">productName</div> 428 <div class="artcleNum">@Translate("productnumber", "Article nr: ") <!--ko text: ProductNumber--><!--/ko--></div> 429 @if ( loggedIn ) 430 { 431 <div class="addToCart" data-bind="click : $parent.gotoProductPage" style="margin-top:5px; text-decoration: underline;"> 432 @Translate( "viewitem", "View item" ) 433 </div> 434 } 435 </div> 436 </a> 437 <div class="actions p-r-0 col-lg-4 col-md-4 col-sm-4 col-xs-4"> 438 <div class="row"> 439 @if ( !loggedIn ) 440 { 441 <div class="col-lg-12"> 442 <button class="btn primary-btn full-width addToCart" data-bind="click : $parent.gotoProductPage"> 443 @Translate( "viewitem", "View item" ) 444 </button> 445 </div> 446 } 447 @if ( loggedIn ) 448 { 449 <div class="col-lg-12"> 450 <div class="input-group m-t-15"> 451 <input type="tel" value="1" class="number instantSearchQuantity"> 452 <span class="input-group-btn"> 453 <button class="btn primary-btn addToCart instantSearchAddToCart" data-bind="click : $parent.AddToCart"> 454 @Translate( "addtocart", "Add to cart" ) 455 </button> 456 </span> 457 </div> 458 </div> 459 } 460 </div> 461 </div> 462 </div> 463 </div> 464 </div> 465 </div> 466 </div> 467 <button class="col-md-12 col-sm-12 col-xs-12 btn gray-button" data-bind="visible: showSeeAllResults, click: gotoResultPage"> 468 <p>@Translate("seeallresults", "See all results") (<!--ko text: totalResults()--><!--/ko-->)</p> 469 </button> 470 </div> 471 </div> 472 <div id="noproductsfound" class="dropDown-body">@Translate( "NoProductsFound", "No products found" )</div> 473 </div> 474 </div> 475 </div> 476 @if ( loggedIn ) 477 { 478 <div class="link link-mobile quick-links_cart item d-flex d-none-lg" data-bind="viewModel: Tapas.ViewModels.MiniCartViewModel"> 479 <a href="/default.aspx?ID=29" class="font-color--white"> 480 <span class="icon-shopping-cart pointer-events-none"> 481 <b class="notification" data-bind="css: { ShowCartIndicator: ShowCartIndicator }, text: Cart().TotalProductLines"></b> 482 </span> 483 </a> 484 </div> 485 486 <div class="link quick-links_cart item d-flex d-none-xs" data-bind="viewModel: Tapas.ViewModels.MiniCartViewModel, menu"> 487 <span class="icon-shopping-cart pointer-events-none"> 488 <b class="notification" data-bind="css: { ShowCartIndicator: ShowCartIndicator }, text: Cart().TotalProductLines"></b> 489 </span> 490 <div class="dropDown"> 491 492 <div class="dropDown-header" data-bind="visible: ShowEmptyMiniCart"> 493 @Translate( "yourcart", "Your cart" ) 494 </div> 495 496 <div class="dropDown-header" data-bind="visible: !ShowEmptyMiniCart()"> 497 @Translate( "cartisempty", "Your cart is empty" ) 498 </div> 499 500 <div class="dropDown-body miniCart" data-bind="visible: ShowEmptyMiniCart"> 501 <div class="table primary-table"> 502 <div class="row header_table"> 503 <div class="col-lg-9 col-md-9 col-sm-7 col-xs-7 column"> 504 @Translate( "product", "Product" ) 505 </div> 506 <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 column"> 507 @Translate( "amount", "Amount" ) 508 </div> 509 <div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 column"> 510 &nbsp; 511 </div> 512 </div> 513 514 <div class="row text_table" data-bind="foreach: Cart().CartLines.slice(0).reverse()"> 515 <div class="orderLine col-lg-12 col-md-12 col-sm-12 col-xs-12"> 516 <div class="row"> 517 <div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 column"> 518 <span data-bind="text: ProductNumber"></span> 519 </div> 520 <div class="col-lg-8 col-md-8 col-sm-6 col-xs-6 column"> 521 <span data-bind="text: ProductName"></span> 522 </div> 523 <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 column"> 524 <input class="quantity" data-bind="value: Quantity, spinEditASG: { minimum: 1, maximum: 9999 }, event: { change: $parent.UpdateQuantity }, attr: {'ftw-olid': LineId }"> 525 </div> 526 <div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 column" data-bind="click: $parent.DeleteOrderLine, attr: {'ftw-olid': LineId }"> 527 <span class="icon-garbage" data-bind="click: $parent.DeleteOrderLine, attr: {'ftw-olid': LineId }"></span> 528 </div> 529 </div> 530 </div> 531 </div> 532 533 </div> 534 </div> 535 <div class="dropDown-footer" data-bind="visible: ShowEmptyMiniCart"> 536 <div class="dropDown-footer-content"> 537 <div class="pull-right"> 538 <a href="/Default.aspx?ID=@checkoutId&step=1"> 539 <button class="btn quickAdd addToCart secondary-btn">@Translate( "gotopayment", "Go to payment" )</button> 540 </a> 541 </div> 542 </div> 543 </div> 544 </div> 545 </div> 546 547 //discount menu 548 if ( enableDiscountCampaign ) 549 { 550 <div class="link quick-links_discount item" data-bind="menu"> 551 <span class="icon-percentage-discount pointer-events-none"> 552 553 </span> 554 <div class="dropDown"> 555 556 <div class="dropDown-header"> 557 @Translate( "Header.Promotion", "Webshp test euexp" ) 558 </div> 559 560 <div class="dropDown-body miniCart"> 561 <div class="table primary-table"> 562 563 <div class="row header_table"> 564 <div class="discount-section"> 565 566 @foreach(var item in GetLoop("Item.Area.CampaignName")) 567 { 568 string discountTitle = item.GetString( "Item.Area.CampaignName.DiscountTitle" ); 569 string backgroundColor = item.GetString( "Item.Area.CampaignName.BackgroundColor" ); 570 string titleColor = item.GetString( "Item.Area.CampaignName.TitleColor" ); 571 string discountLink = item.GetString( "Item.Area.CampaignName.DiscountLink" ); 572 string discountImage = item.GetString( "Item.Area.CampaignName.DiscountImage" ); 573 string discountLetter = item.GetString( "Item.Area.CampaignName.DiscountLetter" ); 574 string discountLetterColor = item.GetString( "Item.Area.CampaignName.DiscountLetterColor" ); 575 576 <div class="discount-type" style="background-color: @backgroundColor;" data-bind="click: function() {window.location.href = '@discountLink'}"> 577 <div class="discount-icon"> 578 <img src='@discountImage' width="25" height="25"> 579 <span style="color: @discountLetterColor;">@discountLetter</span> 580 </div> 581 <div style="color: @titleColor;">@discountTitle</div> 582 </div> 583 } 584 585 </div> 586 </div> 587 588 </div> 589 </div> 590 </div> 591 </div> 592 } 593 } 594 </div> 595 </div> 596 597 <!-- desktop language dropdown --> 598 <div class="flags desktop-flags hidden-xs pull-right"> 599 @if (websiteLoop.Count > 0 && !loggedIn) 600 { 601 var websiteItem = websiteLoop.FirstOrDefault(w => w.GetString("Item.Area.Websites.AreaId") == currentAreaId); 602 var currentLabel = websiteItem.GetString("Item.Area.Websites.Label"); 603 <div class="dropdown primary-dropdown"> 604 <a class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> 605 @if (string.IsNullOrEmpty(globeIcon)) 606 { 607 <img class="img-responsive flag-icon" src="/Files/Templates/Designs/Tapas/assets/img/globe.png" alt='@Translate("regionicon", "Region icon")'> 608 } 609 else 610 { 611 <img class="img-responsive flag-icon" src="@globeIcon" alt='@Translate("regionicon", "Region icon")'> 612 } 613 @Translate("AreaSite." + websiteItem.GetString("Item.Area.Websites.AreaId"), currentLabel) 614 <span class="caret"></span> 615 </a> 616 617 <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> 618 @foreach (var item in websiteLoop) 619 { 620 string areaId = item.GetString("Item.Area.Websites.AreaId"); 621 string label = item.GetString("Item.Area.Websites.Label"); 622 string link = item.GetString("Item.Area.Websites.Link"); 623 624 <li> 625 <a href="@link"> 626 @Translate("AreaSiteLabel." + areaId, label) 627 </a> 628 </li> 629 } 630 </ul> 631 </div> 632 } 633 </div> 634 </div> 635 </div> 636 </div> 637 </div> 638 </div> 639 </div> 640 641 <div class="container text-right"> 642 <div class="secondary-header text-left"> 643 <div class="main-wrap"> 644 <div class="main-navigation"> 645 <div class="navbar-toggle collapsed visible-sm visible-xs" data-bind="click: toggleResponsiveMenu"> 646 <span class="icon-bar top-bar"></span> 647 <span class="icon-bar middle-bar"></span> 648 <span class="icon-bar bottom-bar"></span> 649 </div> 650 651 <nav class="navigation navigation--primary"> 652 @RenderSnippet("Logo") 653 654 <!-- ko ifnot: responsive--> 655 @RenderNavigation(new { 656 template = "navigation_asgmenu.xslt", 657 expandmode = "all", 658 homeLink = "/Default.aspx?id=" + GetString("DwAreaFirstPageID") 659 }) 660 <!-- /ko--> 661 </nav> 662 663 @SnippetStart("Logo") 664 665 @if(isVip) { 666 <div class="logo logo--premium"> 667 <a href="@homeLink"> 668 <img src="@premiumLogo"> 669 </a> 670 </div> 671 } else { 672 <div class="logo"> 673 <a href="@homeLink"> 674 <img src="@logo" alt="logo"> 675 </a> 676 </div> 677 } 678 679 @SnippetEnd("Logo") 680 681 </div> 682 </div> 683 </div> 684 685 </div> 686 </div> 687 </header> 688 <div class="add-float" data-bind="floatMenuAndAddClassToElement : { otherelement: 'header.header', elementtohide: '.hide-on-float' }"></div> 689 </div> 690 <div class="content"> 691 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 692 @using Dynamicweb.Rendering; 693 694 695 @GetValue("Title(Subpage)") 696 @GetValue("Description(Subpage skabelon)") 697 698 @{ 699 string MapsLink = "/Default.aspx?Id=" + Tapas.Context.AreaItem.GetInt("FindRetailer_PageID"); 700 string MapsApiKey = Tapas.Context.AreaItem.GetString("Google_Maps_Api_Key"); 701 702 string CustomerId = Dynamicweb.Context.Current.Request.QueryString["shopid"]; 703 var Shop = Dynamicweb.Security.UserManagement.User.GetUserByID(Convert.ToInt32(CustomerId)); 704 705 var ImageHandler = new Firstweb.Custom.CustomCode.DealerImages.DealerImagesHelper(); 706 var StoreImages = ImageHandler.GetShopImages(Shop.CustomerNumber); 707 string HeaderImage = ImageHandler.GetWebshopPageHeader(Shop.CustomerNumber); 708 string WebsiteImage = ImageHandler.GetWebshopScreenshot(Shop.CustomerNumber); 709 710 string RetailerName = !String.IsNullOrEmpty(Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopName")) ? Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopName") : Shop.Company; 711 string Address = !String.IsNullOrEmpty(Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopAddress")) ? Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopAddress") : Shop.Address; 712 string State = !String.IsNullOrEmpty(Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopState")) ? Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopState") : Tapas.Erp.User.GetCustomFieldValueString(Shop, "AccessUser_ASGUSStateCode"); 713 string Zip = !String.IsNullOrEmpty(Tapas.Erp.User.GetCustomFieldValueString(Shop, "AccessUser_FirstwebShopZip")) ? Tapas.Erp.User.GetCustomFieldValueString(Shop, "AccessUser_FirstwebShopZip") : Shop.Zip; 714 string City = !String.IsNullOrEmpty(Tapas.Erp.User.GetCustomFieldValueString(Shop, "AccessUser_FirstwebShopCity")) ? Tapas.Erp.User.GetCustomFieldValueString(Shop, "AccessUser_FirstwebShopCity") : Shop.City; 715 string WebsiteLink = Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopWebsite"); 716 717 string OpeningHours = Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebOpeningHours"); 718 string Description = Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebShopDescription"); 719 bool VIP = Tapas.Erp.User.GetCustomFieldValueBool(Shop, "FirstwebIsVip"); 720 string PageHeader = VIP ? "Premium retailer - " + RetailerName : RetailerName; 721 string YoutubeVideoId = Tapas.Erp.User.GetCustomFieldValueString(Shop, "FirstwebYoutubeVideoId"); 722 723 bool IsUS = Shop.Country == "US" || Shop.Country == "CA"; 724 } 725 726 <section class="section patternise pageTitle"> 727 <div class="container"> 728 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 729 <h1 class="f9 secondary-font semi-bold m-b-0">@PageHeader</h1> 730 </div> 731 </div> 732 </section> 733 734 <div class="lightBg"> 735 <div class="container"> 736 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 737 <div class="whiteBg m-b-30 m-t-30 p-t-30 p-b-30"> 738 <div id="content1">@GetValue("DwContent(content1)")</div> 739 740 <div class="dealer-details"> 741 742 <div class="dealer-details__header"> 743 744 @if (!String.IsNullOrEmpty(HeaderImage) && VIP) 745 { 746 <img class="dealer-details__header__image dealer-details__header__image--store" src="@HeaderImage" alt="@RetailerName"> 747 } 748 749 750 @if (VIP) 751 { 752 string PremiumRetailerImage = Tapas.Context.AreaItem.GetString("PremiumRetailerImage"); 753 <img class="dealer-details__header__image dealer-details__header__image--asg" src="@PremiumRetailerImage" alt="Premium retailer"> 754 } 755 else 756 { 757 string RegularRetailerImage = Tapas.Context.AreaItem.GetString("RegularRetailerImage"); 758 <img class="dealer-details__header__image dealer-details__header__image--asg" src="@RegularRetailerImage" alt="Regular retailer"> 759 } 760 761 </div> 762 763 <div class="row"> 764 765 <div class="dealer-details__flex-section"> 766 767 <div class="col-xs-12 col-md-6"> 768 769 <div class="dealer-details__rte"> 770 771 @OpeningHours 772 773 </div> 774 775 </div> 776 777 <div class="col-xs-12 col-md-6"> 778 779 <div class="dealer-details__rte"> 780 781 @Description 782 783 </div> 784 785 </div> 786 787 </div> 788 789 <div class="dealer-details__flex-section"> 790 791 <div class="col-xs-12 col-md-6"> 792 793 <div class="dealer-details__maps"> 794 795 <h2 class="dealer-details__header">@Translate("RetailerDetails.MapsHeader", "Find the store here")</h2> 796 797 <div class="hidden-xs hidden-sm"> 798 <iframe width="100%" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=@MapsApiKey&q=@Address,@Zip @City&zoom=14" allowfullscreen=""></iframe> 799 </div> 800 801 <div class="hidden-md hidden-lg"> 802 <iframe width="100%" height="300" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=@MapsApiKey&q=@Address,@Zip @City&zoom=14" allowfullscreen=""></iframe> 803 </div> 804 805 </div> 806 807 </div> 808 809 @if (VIP) 810 { 811 <div class="col-xs-12 col-md-6"> 812 813 @if (StoreImages.Count > 0) 814 { 815 <div class="dealer-details__slider"> 816 817 <h2 class="dealer-details__header">@Translate("RetailerDetails.SliderHeader", "Watch") @RetailerName</h2> 818 819 <div data-bind="lightSliderDealer"> 820 821 @foreach (var Image in StoreImages) 822 { 823 <div data-src="@Image" data-thumb="@Image"> 824 <img src="@Image"> 825 </div> 826 } 827 828 </div> 829 830 </div> 831 } 832 833 </div> 834 } 835 836 837 </div> 838 839 <div class="dealer-details__flex-section" data-us="@IsUS"> 840 841 @if (VIP || IsUS) 842 { 843 <div class="col-xs-12 col-md-6"> 844 845 @if (!String.IsNullOrEmpty(WebsiteLink)) 846 { 847 <div class="dealer-details__website-link"> 848 849 <h2 class="dealer-details__header">@Translate("RetailerDetails.WebsiteHeader", "Visit") @RetailerName</h2> 850 851 <a href="@WebsiteLink" target="_blank"> 852 @if (!String.IsNullOrEmpty(WebsiteImage)) 853 { 854 <img src="@WebsiteImage"> 855 } 856 else 857 { 858 <h2>@WebsiteLink</h2> 859 } 860 </a> 861 862 </div> 863 } 864 865 </div> 866 867 } 868 @if (VIP) 869 { 870 <div class="col-xs-12 col-md-6"> 871 872 @if (!String.IsNullOrEmpty(YoutubeVideoId)) 873 { 874 <div class="dealer-details__video"> 875 876 <h2 class="dealer-details__header">@Translate("RetailerDetails.VideoHeader", "Visit the store")</h2> 877 878 <iframe width="100%" height="375" src="https://www.youtube.com/embed/@YoutubeVideoId?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe> 879 880 </div> 881 } 882 883 </div> 884 } 885 886 887 </div> 888 889 </div> 890 891 <div class="information-disclaimer"> 892 <i class="fas fa-exclamation-circle"></i> 893 <p>@Translate("Dealer.Disclaimer", "Disclaimer about information")</p> 894 </div> 895 896 </div> 897 898 </div> 899 </div> 900 901 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 902 <a class="dealer-details__maps-link" href="@MapsLink">@Translate("RetailerDetails.BackToMap", "Go back to dealer map")</a> 903 </div> 904 </div> 905 </div> 906 </div> 907 <div class="loaderText f2"> 908 <div class="loaderMsg" data-bind="text: load().text"></div> 909 <div class='loaderContainer'> 910 <div class='crs topr'></div> 911 <div class='crs topl'></div> 912 <div class='crs botr'></div> 913 <div class='crs botl'></div> 914 <div class='dot'></div> 915 </div> 916 </div> 917 @RenderItem(new { ItemType = "Footer", SourceItemEntry = footerId, ItemFields = "*", DetailsTemplate = "RenderItem/footer.cshtml" }) 918 919 @SnippetStart("SocialIcons") 920 921 @foreach (var item in GetLoop("Item.Area.Icons")){ 922 string type = item.GetString("Item.Area.Icons.Type"); 923 string url = item.GetString("Item.Area.Icons.Link"); 924 string icon = item.GetString("Item.Area.Icons.Icon"); 925 926 <a href="@url" target="_blank"> 927 <img class="socialIcon" src="@icon" alt="@type"> 928 </a> 929 } 930 931 @SnippetEnd("SocialIcons") 932 </div> 933 934 @if ((!String.IsNullOrEmpty(GetString("DW_extranet_AccessUserID")) && CreateFormParagraphId > 0 && !GetBoolean("Item.Page.DoNotShowEmailPopup.Value")) || !String.IsNullOrEmpty(ApprovalKey) && CreateFormParagraphId > 0) 935 { 936 <div> 937 <div class="modal fade js-newsletter-recipients newsletter-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> 938 <div class="modal-dialog" role="document"> 939 <div class="modal-content"> 940 <div class="modal-header"> 941 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> 942 </div> 943 <div class="modal-body"> 944 945 @RenderParagraphContent(CreateFormParagraphId) 946 947 </div> 948 </div> 949 </div> 950 </div> 951 </div> 952 } 953 954 @SnippetStart("UserEmail") 955 <span>@GetString("DW_extranet_AccessUserEmail")</span> 956 @SnippetEnd("UserEmail") 957 958 <div class="cookieWarning" data-bind="css: { 'show': showCookie }"> 959 <div class="cookieText"> 960 @Translate("CookieWarningText", "This website uses cookies to traffic measurement and optimization of content") 961 <div class="btn secondary-btn" data-bind="click: cookieAccept">@Translate("CookieWarningAccept", "Accept")</div> 962 </div> 963 </div> 964 965 <div class="to-the-top" data-bind="scrollToTop"> 966 <i class="fas fa-arrow-up"></i> 967 <p>@Translate("ToTheTop", "To the top")</p> 968 </div> 969 970 <!-- ko if: responsive--> 971 <div class="mobileSection visible-sm visible-xs" data-bind="css: { 'open': showResponsiveMenu }"> 972 @RenderSnippet("Logo") 973 <ul class="mainMenu"> 974 @GetValue("DwNavigation(dwMobileNav)") 975 <div class="bottomMenu"> 976 @GetValue("DwNavigation(dwmobiletopnav)") 977 </div> 978 </ul> 979 </div> 980 <!-- /ko--> 981 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> 982 <script> 983 window.jQuery || document.write('<script src="files/templates/designs/tapas/assets/lbriaries/jquery-2.1.4.min.js"><\/script>') 984 </script> 985 986 <!--inject:js--> 987 <script src="/Files/Templates/Designs/Tapas/assets/min/library.min.js?v=@AssetVersion"></script> 988 <script src="/Files/Templates/Designs/Tapas/assets/min/_main.min.js?v=@AssetVersion"></script> 989 <!--endinject--> 990 <script> 991 Asg.Init() 992 </script> 993 </body> 994 </html>