Error executing template "Designs/PLC/_parsed/fullwidth.parsed.cshtml"
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at CompiledRazorTemplates.Dynamic.RazorEngine_aea26086efc94a30b5ceec6a4c28cf90.Execute() in E:\www\uat.petloverscentre.com.my\Solution\Files\Templates\Designs\PLC\_parsed\fullwidth.parsed.cshtml:line 4784
   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 @using System 2 @using System.Web 3 @using Dynamicweb.Security.UserManagement.Common.CustomFields; 4 @using Dynamicweb.Security.UserManagement 5 @using System.Text.RegularExpressions 6 @using System.Web 7 8 9 @functions{ 10 public class WrapMethods 11 { 12 13 14 //Gets the contrasting color 15 public static string getContrastYIQ(string hexcolor) 16 { 17 if (hexcolor != "") 18 { 19 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 20 21 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 22 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 23 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 24 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 25 26 if (yiq >= 128) 27 { 28 return "black"; 29 } 30 else 31 { 32 return "white"; 33 } 34 } 35 else 36 { 37 return "black"; 38 } 39 } 40 41 42 //Truncate text 43 public static string Truncate (string value, int count, bool strip=true) 44 { 45 if (strip == true){ 46 value = StripHtmlTagByCharArray(value); 47 } 48 49 if (value.Length > count) 50 { 51 value = value.Substring(0, count - 1) + "..."; 52 } 53 54 return value; 55 } 56 57 58 //Strip text from HTML 59 public static string StripHtmlTagByCharArray(string htmlString) 60 { 61 char[] array = new char[htmlString.Length]; 62 int arrayIndex = 0; 63 bool inside = false; 64 65 for (int i = 0; i < htmlString.Length; i++) 66 { 67 char let = htmlString[i]; 68 if (let == '<') 69 { 70 inside = true; 71 continue; 72 } 73 if (let == '>') 74 { 75 inside = false; 76 continue; 77 } 78 if (!inside) 79 { 80 array[arrayIndex] = let; 81 arrayIndex++; 82 } 83 } 84 return new string(array, 0, arrayIndex); 85 } 86 87 //Make the correct count of columns 88 public static string ColumnMaker(int Col, string ScreenSize) 89 { 90 string Columns = ""; 91 92 switch (Col) 93 { 94 case 1: 95 Columns = "col-"+ScreenSize+"-12"; 96 break; 97 98 case 2: 99 Columns = "col-"+ScreenSize+"-6"; 100 break; 101 102 case 3: 103 Columns = "col-"+ScreenSize+"-4"; 104 break; 105 106 case 4: 107 Columns = "col-"+ScreenSize+"-3"; 108 break; 109 110 default: 111 Columns = "col-"+ScreenSize+"-3"; 112 break; 113 } 114 115 return Columns; 116 } 117 118 119 private string Custom(string firstoption, string secondoption) 120 { 121 if (firstoption == "custom") 122 { 123 return secondoption; 124 } 125 else 126 { 127 return firstoption; 128 } 129 } 130 } 131 } 132 @helper MiniCart() 133 { 134 var list = new List<String>(); 135 foreach (var orderline1 in GetLoop("OrderLines")){ 136 var repackString = ""; 137 if(orderline1.GetString("Ecom:Order:OrderLine.ProductName").Contains("Repack Service")){ 138 foreach (LoopItem orderLineField in orderline1.GetLoop("Order.OrderLineFields")){ 139 repackString = orderLineField.GetString("Ecom:Order:OrderLine.OrderLineField.Value")+"|"; 140 } 141 repackString += orderline1.GetValue("Ecom:Order:OrderLine.Quantity") + "|" + orderline1.GetString("Ecom:Order:OrderLine.Price.PriceFormatted"); 142 list.Add(repackString); 143 144 } 145 } 146 <div class="dropdown-cart FixedHeightContainer"> 147 148 @if (GetInteger("Ecom:Order.OrderLines.TotalProductQuantity") > 0) 149 { 150 151 152 153 <div class="cart-content scrollminicart"> 154 @{string imgpath="/Files/Images/Ecom/Products/";} 155 @foreach (var orderline in GetLoop("OrderLines")) 156 { 157 158 var isVoucher = false; 159 if(orderline.GetString("Ecom:Order:OrderLine.Type") == "1") 160 { 161 isVoucher = true; 162 } 163 var pid = orderline.GetString("Ecom:Order:OrderLine.ProductID"); 164 var pNo=orderline.GetString("Ecom:Order:OrderLine.ProductNumber"); 165 var image = orderline.GetString("Ecom:Product.ImageSmall.Default.Clean"); 166 string imgpathjpg=imgpath+pid+".jpg"; 167 string imgpathpng=imgpath+pid+".png"; 168 var absolutePathsjpg = System.Web.HttpContext.Current.Server.MapPath("~/"+ imgpathjpg); 169 var absolutePathpng = System.Web.HttpContext.Current.Server.MapPath("~/"+ imgpathpng); 170 if(System.IO.File.Exists(absolutePathsjpg)){ 171 image=imgpathjpg; 172 } 173 else if(System.IO.File.Exists(absolutePathpng)){ 174 image=imgpathpng; 175 } 176 177 var repackTrue= false; 178 var repackID = ""; 179 var repackQuantity = ""; 180 var repackPrice =""; 181 for (int j=0; j<@list.Count;j++){ 182 183 string[] stringlist = list[j].Split('|'); 184 if(stringlist[0]==pid){ 185 repackTrue = true; 186 repackQuantity = stringlist[1]; 187 repackPrice = stringlist[2]; 188 } 189 } 190 if(orderline.GetString("Ecom:Order:OrderLine.ProductName")!="$3 Repack Service" && orderline.GetString("Ecom:Order:OrderLine.ProductName")!="$4 Repack Service"){ 191 192 if(orderline.GetString("Ecom:Order:OrderLine.Type")!="3") 193 { 194 195 <div class="cart-row"> 196 @if(!orderline.GetString("Ecom:Order:OrderLine.ProductName").Contains("Repack Service")) 197 { 198 <div class="cart-img"> 199 @if(!isVoucher) 200 { 201 <img src="/Admin/Public/GetImage.ashx?width=50&image=@image&Compression=99" class="img-center" alt=""> 202 } 203 else 204 { 205 <p>&nbsp;</p> 206 } 207 </div> 208 }else{ 209 <div class="cart-img"> 210 <p>&nbsp;</p> 211 </div> 212 } 213 <div class="cart-details"> 214 <p class="bold"> 215 <a href="@orderline.GetValue(" ecom:order:orderline.productlink")"=""> 216 <p style="margin: 0px;">@orderline.GetString("Ecom:Product:Field.ProductBrand")</p> 217 <p style="margin: 0px;">@orderline.GetString("Ecom:Order:OrderLine.ProductName")</p> 218 </a> 219 <br>@orderline.GetString("Ecom:Order:OrderLine.ProductVariantText")</p> 220 221 @if(!isVoucher) 222 { 223 <table> 224 <tr style="font-size:12px;"> 225 <td>@Translate("Item No","Item No")&nbsp;</td> 226 <td>: @pNo </td> 227 </tr> 228 @if(!string.IsNullOrWhiteSpace(orderline.GetString("Ecom:Product:Field.Flavour"))) 229 { 230 <tr style="font-size:12px;"> 231 <td>@Translate("Flavour","Flavour")&nbsp;</td> 232 <td>:&nbsp;@orderline.GetString("Ecom:Product:Field.Flavour")</td> 233 </tr> 234 } 235 <tr style="font-size:12px;"> 236 <td>@Translate("Quantity","Quantity")&nbsp;</td> 237 <td>: @orderline.GetValue("Ecom:Order:OrderLine.Quantity")</td> 238 </tr> 239 </table> 240 } 241 </div> 242 243 244 @if(orderline.GetString("Ecom:Order:OrderLine.Price.PriceFormatted") != orderline.GetString("Ecom:Order:OrderLine.TotalPriceWithProductDiscounts")) 245 { 246 <span style="text-decoration:line-through;"> 247 @orderline.GetString("Ecom:Order:OrderLine.Price.PriceFormatted") 248 249 </span> 250 <br> 251 @orderline.GetValue("Ecom:Order:OrderLine.TotalPriceWithProductDiscounts") 252 253 } 254 else 255 { 256 257 @orderline.GetString("Ecom:Order:OrderLine.Price.PriceWithVATFormatted") 258 259 } 260 </div> 261 262 } 263 else if(orderline.GetString("Ecom:Order:OrderLine.Type")=="3" && String.IsNullOrWhiteSpace(orderline.GetString("Ecom:Order:OrderLine.ParentLineID"))) 264 { 265 <div class="cart-row"> 266 <div class="cart-img"> 267 <p>&nbsp;</p> 268 </div> 269 <div class="cart-details"> 270 <p class="bold"><a href="@orderline.GetValue(" ecom:order:orderline.productlink")"=""> 271 <span id="name@(pid)">@orderline.GetValue("Ecom:Order:OrderLine.ProductName")</span></a> 272 <br>@orderline.GetString("Ecom:Order:OrderLine.ProductVariantText")</p> 273 </div> 274 @orderline.GetString("Ecom:Order:OrderLine.Price.PriceWithVATFormatted") 275 </div> 276 } 277 if(repackTrue) 278 { 279 <div class="cart-row"> 280 <div class="cart-img">&nbsp;</div> 281 <div class="cart-details"> 282 <table style="font-size: 12px !important;"> 283 <tbody> 284 <tr class="bold">Repack</tr> 285 <tr><td>Quantity:&nbsp;</td><td>@repackQuantity</td></tr> 286 287 </tbody> 288 </table> 289 </div> 290 <b> @repackPrice </b> 291 </div> 292 } 293 } 294 } 295 </div> 296 <hr class="grey"> 297 <div class="cart-bottom"> 298 <!-- @{ var saveDeliveryFee = 80.00 - GetDouble("Ecom:Order.PriceWithoutTaxes.PriceWithVAT") + GetDouble("Ecom:Order.ShippingFee.PriceWithVAT.Value"); } 299 @if(saveDeliveryFee > 0) 300 { 301 <div class="cart-highlight">Spend @GetString("Ecom:Order.Currency.Symbol")@string.Format("{0:0.00}",saveDeliveryFee) more to save on delivery</div> 302 }--> 303 <div class="cart-total"> 304 <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:14px;"> 305 <tr> 306 <td class="title">@Translate("Subtotal","Subtotal")</td> 307 <td>:</td> 308 <td class="price">@GetString("Ecom:Order.PriceWithoutFees.PriceWithVATFormatted")</td> 309 </tr> 310 <!--<tr> 311 <td class="title">@Translate("Delivery","Delivery")</td> 312 <td>:</td> 313 @if(GetDouble("Ecom:Order.ShippingFee.Price") == 0.00) 314 { 315 <td class="price">Free</td> 316 } 317 else 318 { 319 <td class="price">@GetString("Ecom:Order.ShippingFee.PriceWithVATFormatted")</td> 320 } 321 </tr>--> 322 <tr> 323 <td class="title">@Translate("Promotions","Promotions")</td> 324 <td>:</td> 325 <td class="price">(@GetString("Ecom:Order.TotalDiscount.PriceWithVATFormatted").Replace("(","").Replace(")",""))</td> 326 </tr> 327 328 <tr> 329 <td class="title">@Translate("Subtotal","Subtotal")</td> 330 <td>:</td> 331 <td class="price">@GetString("Ecom:Order.Price.PriceWithVATFormatted")</td> 332 </tr> 333 </table> 334 335 </div> 336 </div> 337 <br> 338 <div class="cart-button"> 339 @{ var cartid = GetValue("DwAreaCartPageID"); 340 var tempcartid = "67"; 341 } 342 343 <a class="btn-continue" id="btn-continue" onclick='$(".cart-info-box").slideToggle();' href="javascript:void(0)">Continue Shopping »</a> 344 345 <div class="btn-addto-cart"> 346 <a href="Default.aspx?ID=@tempcartid"><i class="fa fa-shopping-cart"></i> View Cart & Checkout</a> 347 </div> 348 </div> 349 350 } 351 else 352 { 353 <span class="cart-items">@Translate("Your shopping cart is empty.", "Your shopping cart is empty.")</span> 354 } 355 </div> 356 <text> 357 </text> 358 } 359 <style> 360 .FixedHeightContainer 361 { 362 height: auto; 363 } 364 .scrollminicart 365 { 366 height:224px; 367 overflow:auto; 368 } 369 </style> 370 @{ 371 try 372 { 373 if(HttpContext.Current.Request.Cookies["_dyid"] != null) 374 { 375 string testlabel=HttpContext.Current.Request.Cookies["_dyid"].Value; 376 HttpCookie myCookie= new HttpCookie("_dyid_server"); 377 myCookie.Value = testlabel; 378 myCookie.Domain = "petloverscentre.com.my"; 379 myCookie.HttpOnly = false; 380 myCookie.Secure = true; 381 myCookie.Expires = DateTime.Now.AddYears(1); 382 HttpContext.Current.Response.Cookies.Add(myCookie); 383 384 } 385 } 386 catch {} 387 388 string charset=GetString("CharSet"); 389 390 string MetaDescription = GetString("Meta.Description"); 391 string MetaKeywords = GetString("Meta.Keywords"); 392 string MetaTitle = GetString("Meta.Title"); 393 string favicon = GetString("Item.Area.Favicon"); 394 string sitepath = "https://plc-dev.dynamicwebapac.com/Files/Templates/Designs/PLC/"; 395 //string globalurl=GetString("Global:Area.Primarydomain"); 396 string globalurl = "/Default.aspx?ID=" + GetString("DwAreaFirstPageID"); 397 //15 January 2017 start 398 sitepath = System.Web.HttpContext.Current.Request.Url.Scheme + "://" + System.Web.HttpContext.Current.Request.Url.Host + "/Files/Templates/Designs/PLC/"; 399 //15 January 2017 end 400 string countrySelection = new System.Net.WebClient().DownloadString(System.Web.HttpContext.Current.Request.Url.Scheme + "://" + System.Web.HttpContext.Current.Request.Url.Host + "/utilities/country-selector"); 401 string sysMaintenanceNoti = GetString("Item.Area.System_Notification_Text"); 402 string fridayMaintenanceNoti = GetString("Item.Area.Day_Notification_Bar_Text"); 403 string maintenanceTimeNoti = GetString("Item.Area.Maintenance_Time_Notification_Bar_Text"); 404 string productQty = "0"; 405 if (GetString("Ecom:Order.OrderLines.TotalProductQuantity") != "") 406 { 407 productQty = GetString("Ecom:Order.OrderLines.TotalProductQuantity"); 408 } 409 410 TimeSpan maintenanceTimeNotiStartTime = new TimeSpan(GetInteger("Item.Area.Maintenance_Time_Notification_Start_Time_Hour"), GetInteger("Item.Area.Maintenance_Time_Notification_Start_Time_Minute"), 0); 411 TimeSpan maintenanceTimeNotiEndTime = new TimeSpan(GetInteger("Item.Area.Maintenance_Time_Notification_End_Time_Hour"), GetInteger("Item.Area.Maintenance_Time_Notification_End_Time_Minute"), 0); 412 TimeSpan startTime = new TimeSpan(GetInteger("Item.Area.System_Notification_Start_Time_Hour"), GetInteger("Item.Area.System_Notification_Start_Time_Minutes"), 0); 413 TimeSpan endTime = new TimeSpan(GetInteger("Item.Area.System_Notification_End_Time_Hour"), GetInteger("Item.Area.System_Notification_End_Time_Minutes"), 0); 414 TimeSpan serverTime = DateTime.Now.TimeOfDay; 415 TimeSpan friStartTime = new TimeSpan(GetInteger("Item.Area.Day_Notification_Starting_Time_Hour"), GetInteger("Item.Area.Day_Notification_Starting_Time_Minutes"), 0); 416 TimeSpan friEndTime = new TimeSpan(GetInteger("Item.Area.Day_Notification_End_Time_Hour"), GetInteger("Item.Area.Day_Notification_End_Time_Minutes"), 0); 417 string checkDay = DateTime.Now.ToString("dddd").ToUpper(); 418 } 419 <!DOCTYPE html> 420 <html lang="en"> 421 <head> 422 <!-- Global site tag (gtag.js) - Google Ads: 788024250 --> 423 <script async="" src="https://www.googletagmanager.com/gtag/js?id=AW-788024250"></script> 424 <script> 425 window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-788024250'); 426 </script> 427 <!-- Global site tag (gtag) - Google Ads: 788024250 End--> 428 <meta name="robots" content="noindex"> 429 <meta name="google-site-verification" content="FuPIfM6T_Ro5sBISJdQ4R4_yvPD_ZXTALme7ejI1PBU"> 430 <meta charset="@charset"> 431 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> 432 <meta name="format-detection" content="telephone=no"> 433 434 <title>@GetValue("Title")</title> 435 @GetValue("MetaTags") 436 @GetValue("CopyRightNotice") 437 438 439 440 441 @*<meta property="og:title" content="Pet Lovers Centre Malaysia | Online Pet Shop"> 442 <meta property="og:site_name" content="Online Pet Shop"> 443 <meta property="og:url" content='@System.Web.HttpContext.Current.Request.Url.Scheme://@System.Web.HttpContext.Current.Request.Url.Host@GetGlobalValue("Global:Pageview.Url")'> 444 <meta property="og:description" content="@MetaDescription"> 445 <meta property="og:type" content="website"> 446 <meta property="og:image" content="@System.Web.HttpContext.Current.Request.Url.Scheme://@System.Web.HttpContext.Current.Request.Url.Host/Files/Images/plc/images/logo.gif">*@ 447 448 <link rel="shortcut icon" href="@favicon"> 449 <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/Files/Templates/Designs/PLC/assets/images/ico/apple-touch-icon-144-precomposed.png"> 450 <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/Files/Templates/Designs/PLC/assets/images/ico/apple-touch-icon-114-precomposed.png"> 451 <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/Files/Templates/Designs/PLC/assets/images/ico/apple-touch-icon-72-precomposed.png"> 452 <link rel="apple-touch-icon-precomposed" href="/Files/Templates/Designs/PLC/assets/images/ico/apple-touch-icon-57-precomposed.png"> 453 454 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/css/bootstrap.min.css" type="text/css"> 455 <link href="/Files/Templates/Designs/PLC/assets/css/simplegrid.css?v=2.6" rel="stylesheet" type="text/css"> 456 <link href="/Files/Templates/Designs/PLC/assets/css/style_v2.2.css?v=2.5.11" rel="stylesheet" type="text/css"> 457 458 <link href="/Files/Templates/Designs/PLC/assets/css/dropdown.css" rel="stylesheet" type="text/css"> 459 <link href="/Files/Templates/Designs/PLC/assets/css/jetmenu.css?v=2.2.9" rel="stylesheet"> 460 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/css/tipso.css"> 461 <link href="/Files/Templates/Designs/PLC/assets/css/allinone_bannerRotator.css" rel="stylesheet" type="text/css"> 462 <link href="/Files/Templates/Designs/PLC/assets/css/jquery.bxslider.css" rel="stylesheet" type="text/css"> 463 <link href="/Files/Templates/Designs/PLC/assets/css/jquery.mCustomScrollbar.css" type="text/css" rel="stylesheet"> 464 <link href="/Files/Templates/Designs/PLC/assets/css/responsive_v1.css?v=2.9.0" rel="stylesheet" type="text/css" rel="stylesheet"> 465 <link href="/Files/Templates/Designs/PLC/assets/css/hover_effect.css" rel="stylesheet" type="text/css" rel="stylesheet"> 466 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/PLC/shop_locator/src/style/css/pluginStyle.css"> 467 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/PLC/assets/css/accordion.css"> 468 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/PLC/fancybox/jquery.fancybox.css?v=2.1.5" media="screen"> 469 <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet"> 470 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/css/jquery-ui.css"> 471 <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/bootstrap-chosen.css"> 472 <!--<p>------------------------------------------------------------ALGOLIA SEARCH---------------------------------------------------<p>--> 473 <script type="text/javascript" src="/Files/Templates/Designs/PLC/js/instantsearch.js?v=1.4"></script> 474 <script src="https://cdn.jsdelivr.net/npm/algoliasearch@3.33.0/dist/algoliasearchLite.min.js" integrity="sha256-3Laj91VXexjTlFLgL8+vvIq27laXdRmFIcO2miulgEs=" crossorigin="anonymous"></script> 475 <script src="https://cdn.jsdelivr.net/npm/instantsearch.js@3.4.0/dist/instantsearch.production.min.js" integrity="sha256-pM0n88cBFRHpSn0N26ETsQdwpA7WAXJDvkHeCLh3ujI=" crossorigin="anonymous"></script> 476 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.3.1/themes/reset-min.css" integrity="sha256-t2ATOGCtAIZNnzER679jwcFcKYfLlw01gli6F6oszk8=" crossorigin="anonymous"> 477 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.3.1/themes/algolia-min.css" integrity="sha256-HB49n/BZjuqiCtQQf49OdZn63XuKFaxcIHWf0HNKte8=" crossorigin="anonymous"> 478 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/css/algolia.css?v=3.3"> 479 480 481 <!--<p>------------------------------------------------------------END....ALGOLIA SEARCH---------------------------------------------------<p>--> 482 483 <script type="text/javascript" src="/Files/Templates/Designs/PLC/js/modernizr.custom.79639.js"></script> 484 <script src="/Files/Templates/Designs/PLC/js/jquery.min.js"></script> 485 <script src="/Files/Templates/Designs/PLC/js/jquery.blockUI.js"></script> 486 <script src="/Files/Templates/Designs/PLC/js/jquery.cookie.js"></script> 487 <script src="/Files/Templates/Designs/PLC/js/html5shiv.js" type="text/javascript"></script> 488 <!--<script src="Files/Templates/Designs/PLC/fancybox/jquery.fancybox.js"></script> --> 489 490 491 <script> 492 if(navigator.userAgent.indexOf("Redmi") !== -1 || navigator.userAgent.indexOf("Mi") !== -1 || navigator.userAgent.indexOf("Xiaomi") !== -1){ 493 $('.ui-icon').on('click touchend', function(e) { 494 $(".ui-dialog").hide(); 495 return true; 496 }); 497 } 498 function getCookie(cname) { 499 var name = cname + "="; 500 var ca = document.cookie.split(';'); 501 for(var i = 0; i < ca.length; i++) { 502 var c = ca[i]; 503 while (c.charAt(0) == ' ') { 504 c = c.substring(1); 505 } 506 if (c.indexOf(name) == 0) { 507 return c.substring(name.length, c.length); 508 } 509 } 510 return ""; 511 } 512 $(document).ready(function() { 513 $(".cart-info-box").hide(); 514 $(function () { 515 $('.top-cart-info').click(function(e) { 516 e.stopImmediatePropagation(); 517 $('.cart-info-box').slideToggle(); 518 }); 519 }); 520 $('.btnLogout').click(function () { 521 $.removeCookie('Dynamicweb:Ecom:Cart', null, { path: '/' }); 522 //console.log($.cookie('Dynamicweb:Ecom:Cart')); 523 }); 524 $('#showhidebtn').click(function () { 525 $("#impersonDiv").slideToggle(); 526 }); 527 528 }); 529 var googleRecaptcha = '@GetString("Item.Area.Google_Recaptcha")'; 530 $('a').on('click touchend', function(e) { 531 var el = $(this); 532 var link = el.attr('href'); 533 window.location = link; 534 }); 535 </script> 536 <script> 537 /* Chosen v1.1.0 | (c) 2011-2013 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */ 538 !function () { var a, AbstractChosen, Chosen, SelectParser, b, c = {}.hasOwnProperty, d = function (a, b) { function d() { this.constructor = a } for (var e in b) c.call(b, e) && (a[e] = b[e]); return d.prototype = b.prototype, a.prototype = new d, a.__super__ = b.prototype, a }; SelectParser = function () { function SelectParser() { this.options_index = 0, this.parsed = [] } return SelectParser.prototype.add_node = function (a) { return "OPTGROUP" === a.nodeName.toUpperCase() ? this.add_group(a) : this.add_option(a) }, SelectParser.prototype.add_group = function (a) { var b, c, d, e, f, g; for (b = this.parsed.length, this.parsed.push({ array_index: b, group: !0, label: this.escapeExpression(a.label), children: 0, disabled: a.disabled }), f = a.childNodes, g = [], d = 0, e = f.length; e > d; d++)c = f[d], g.push(this.add_option(c, b, a.disabled)); return g }, SelectParser.prototype.add_option = function (a, b, c) { return "OPTION" === a.nodeName.toUpperCase() ? ("" !== a.text ? (null != b && (this.parsed[b].children += 1), this.parsed.push({ array_index: this.parsed.length, options_index: this.options_index, value: a.value, text: a.text, html: a.innerHTML, selected: a.selected, disabled: c === !0 ? c : a.disabled, group_array_index: b, classes: a.className, style: a.style.cssText })) : this.parsed.push({ array_index: this.parsed.length, options_index: this.options_index, empty: !0 }), this.options_index += 1) : void 0 }, SelectParser.prototype.escapeExpression = function (a) { var b, c; return null == a || a === !1 ? "" : /[\&\<\>\"\'\`]/.test(a) ? (b = { "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;" }, c = /&(?!\w+;)|[\<\>\"\'\`]/g, a.replace(c, function (a) { return b[a] || "&amp;" })) : a }, SelectParser }(), SelectParser.select_to_array = function (a) { var b, c, d, e, f; for (c = new SelectParser, f = a.childNodes, d = 0, e = f.length; e > d; d++)b = f[d], c.add_node(b); return c.parsed }, AbstractChosen = function () { function AbstractChosen(a, b) { this.form_field = a, this.options = null != b ? b : {}, AbstractChosen.browser_is_supported() && (this.is_multiple = this.form_field.multiple, this.set_default_text(), this.set_default_values(), this.setup(), this.set_up_html(), this.register_observers()) } return AbstractChosen.prototype.set_default_values = function () { var a = this; return this.click_test_action = function (b) { return a.test_active_click(b) }, this.activate_action = function (b) { return a.activate_field(b) }, this.active_field = !1, this.mouse_on_container = !1, this.results_showing = !1, this.result_highlighted = null, this.allow_single_deselect = null != this.options.allow_single_deselect && null != this.form_field.options[0] && "" === this.form_field.options[0].text ? this.options.allow_single_deselect : !1, this.disable_search_threshold = this.options.disable_search_threshold || 0, this.disable_search = this.options.disable_search || !1, this.enable_split_word_search = null != this.options.enable_split_word_search ? this.options.enable_split_word_search : !0, this.group_search = null != this.options.group_search ? this.options.group_search : !0, this.search_contains = this.options.search_contains || !1, this.single_backstroke_delete = null != this.options.single_backstroke_delete ? this.options.single_backstroke_delete : !0, this.max_selected_options = this.options.max_selected_options || 1 / 0, this.inherit_select_classes = this.options.inherit_select_classes || !1, this.display_selected_options = null != this.options.display_selected_options ? this.options.display_selected_options : !0, this.display_disabled_options = null != this.options.display_disabled_options ? this.options.display_disabled_options : !0 }, AbstractChosen.prototype.set_default_text = function () { return this.default_text = this.form_field.getAttribute("data-placeholder") ? this.form_field.getAttribute("data-placeholder") : this.is_multiple ? this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text : this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text, this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text }, AbstractChosen.prototype.mouse_enter = function () { return this.mouse_on_container = !0 }, AbstractChosen.prototype.mouse_leave = function () { return this.mouse_on_container = !1 }, AbstractChosen.prototype.input_focus = function () { var a = this; if (this.is_multiple) { if (!this.active_field) return setTimeout(function () { return a.container_mousedown() }, 50) } else if (!this.active_field) return this.activate_field() }, AbstractChosen.prototype.input_blur = function () { var a = this; return this.mouse_on_container ? void 0 : (this.active_field = !1, setTimeout(function () { return a.blur_test() }, 100)) }, AbstractChosen.prototype.results_option_build = function (a) { var b, c, d, e, f; for (b = "", f = this.results_data, d = 0, e = f.length; e > d; d++)c = f[d], b += c.group ? this.result_add_group(c) : this.result_add_option(c), (null != a ? a.first : void 0) && (c.selected && this.is_multiple ? this.choice_build(c) : c.selected && !this.is_multiple && this.single_set_selected_text(c.text)); return b }, AbstractChosen.prototype.result_add_option = function (a) { var b, c; return a.search_match ? this.include_option_in_results(a) ? (b = [], a.disabled || a.selected && this.is_multiple || b.push("active-result"), !a.disabled || a.selected && this.is_multiple || b.push("disabled-result"), a.selected && b.push("result-selected"), null != a.group_array_index && b.push("group-option"), "" !== a.classes && b.push(a.classes), c = document.createElement("li"), c.className = b.join(" "), c.style.cssText = a.style, c.setAttribute("data-option-array-index", a.array_index), c.innerHTML = a.search_text, this.outerHTML(c)) : "" : "" }, AbstractChosen.prototype.result_add_group = function (a) { var b; return a.search_match || a.group_match ? a.active_options > 0 ? (b = document.createElement("li"), b.className = "group-result", b.innerHTML = a.search_text, this.outerHTML(b)) : "" : "" }, AbstractChosen.prototype.results_update_field = function () { return this.set_default_text(), this.is_multiple || this.results_reset_cleanup(), this.result_clear_highlight(), this.results_build(), this.results_showing ? this.winnow_results() : void 0 }, AbstractChosen.prototype.reset_single_select_options = function () { var a, b, c, d, e; for (d = this.results_data, e = [], b = 0, c = d.length; c > b; b++)a = d[b], a.selected ? e.push(a.selected = !1) : e.push(void 0); return e }, AbstractChosen.prototype.results_toggle = function () { return this.results_showing ? this.results_hide() : this.results_show() }, AbstractChosen.prototype.results_search = function () { return this.results_showing ? this.winnow_results() : this.results_show() }, AbstractChosen.prototype.winnow_results = function () { var a, b, c, d, e, f, g, h, i, j, k, l, m; for (this.no_results_clear(), e = 0, g = this.get_search_text(), a = g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), d = this.search_contains ? "" : "^", c = new RegExp(d + a, "i"), j = new RegExp(a, "i"), m = this.results_data, k = 0, l = m.length; l > k; k++)b = m[k], b.search_match = !1, f = null, this.include_option_in_results(b) && (b.group && (b.group_match = !1, b.active_options = 0), null != b.group_array_index && this.results_data[b.group_array_index] && (f = this.results_data[b.group_array_index], 0 === f.active_options && f.search_match && (e += 1), f.active_options += 1), (!b.group || this.group_search) && (b.search_text = b.group ? b.label : b.html, b.search_match = this.search_string_match(b.search_text, c), b.search_match && !b.group && (e += 1), b.search_match ? (g.length && (h = b.search_text.search(j), i = b.search_text.substr(0, h + g.length) + "</em>" + b.search_text.substr(h + g.length), b.search_text = i.substr(0, h) + "<em>" + i.substr(h)), null != f && (f.group_match = !0)) : null != b.group_array_index && this.results_data[b.group_array_index].search_match && (b.search_match = !0))); return this.result_clear_highlight(), 1 > e && g.length ? (this.update_results_content(""), this.no_results(g)) : (this.update_results_content(this.results_option_build()), this.winnow_results_set_highlight()) }, AbstractChosen.prototype.search_string_match = function (a, b) { var c, d, e, f; if (b.test(a)) return !0; if (this.enable_split_word_search && (a.indexOf(" ") >= 0 || 0 === a.indexOf("[")) && (d = a.replace(/\[|\]/g, "").split(" "), d.length)) for (e = 0, f = d.length; f > e; e++)if (c = d[e], b.test(c)) return !0 }, AbstractChosen.prototype.choices_count = function () { var a, b, c, d; if (null != this.selected_option_count) return this.selected_option_count; for (this.selected_option_count = 0, d = this.form_field.options, b = 0, c = d.length; c > b; b++)a = d[b], a.selected && (this.selected_option_count += 1); return this.selected_option_count }, AbstractChosen.prototype.choices_click = function (a) { return a.preventDefault(), this.results_showing || this.is_disabled ? void 0 : this.results_show() }, AbstractChosen.prototype.keyup_checker = function (a) { var b, c; switch (b = null != (c = a.which) ? c : a.keyCode, this.search_field_scale(), b) { case 8: if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) return this.keydown_backstroke(); if (!this.pending_backstroke) return this.result_clear_highlight(), this.results_search(); break; case 13: if (a.preventDefault(), this.results_showing) return this.result_select(a); break; case 27: return this.results_showing && this.results_hide(), !0; case 9: case 38: case 40: case 16: case 91: case 17: break; default: return this.results_search() } }, AbstractChosen.prototype.clipboard_event_checker = function () { var a = this; return setTimeout(function () { return a.results_search() }, 50) }, AbstractChosen.prototype.container_width = function () { return null != this.options.width ? this.options.width : "" + this.form_field.offsetWidth + "px" }, AbstractChosen.prototype.include_option_in_results = function (a) { return this.is_multiple && !this.display_selected_options && a.selected ? !1 : !this.display_disabled_options && a.disabled ? !1 : a.empty ? !1 : !0 }, AbstractChosen.prototype.search_results_touchstart = function (a) { return this.touch_started = !0, this.search_results_mouseover(a) }, AbstractChosen.prototype.search_results_touchmove = function (a) { return this.touch_started = !1, this.search_results_mouseout(a) }, AbstractChosen.prototype.search_results_touchend = function (a) { return this.touch_started ? this.search_results_mouseup(a) : void 0 }, AbstractChosen.prototype.outerHTML = function (a) { var b; return a.outerHTML ? a.outerHTML : (b = document.createElement("div"), b.appendChild(a), b.innerHTML) }, AbstractChosen.browser_is_supported = function () { return "Microsoft Internet Explorer" === window.navigator.appName ? document.documentMode >= 8 : /iP(od|hone)/i.test(window.navigator.userAgent) ? !0 : /Android/i.test(window.navigator.userAgent) && /Mobile/i.test(window.navigator.userAgent) ? !0 : !0 }, AbstractChosen.default_multiple_text = "Select Some Options", AbstractChosen.default_single_text = "Select an Option", AbstractChosen.default_no_result_text = "No results match", AbstractChosen }(), a = jQuery, a.fn.extend({ chosen: function (b) { return AbstractChosen.browser_is_supported() ? this.each(function () { var c, d; c = a(this), d = c.data("chosen"), "destroy" === b && d ? d.destroy() : d || c.data("chosen", new Chosen(this, b)) }) : this } }), Chosen = function (c) { function Chosen() { return b = Chosen.__super__.constructor.apply(this, arguments) } return d(Chosen, c), Chosen.prototype.setup = function () { return this.form_field_jq = a(this.form_field), this.current_selectedIndex = this.form_field.selectedIndex, this.is_rtl = this.form_field_jq.hasClass("chosen-rtl") }, Chosen.prototype.set_up_html = function () { var b, c; return b = ["chosen-container"], b.push("chosen-container-" + (this.is_multiple ? "multi" : "single")), this.inherit_select_classes && this.form_field.className && b.push(this.form_field.className), this.is_rtl && b.push("chosen-rtl"), c = { "class": b.join(" "), style: "width: " + this.container_width() + ";", title: this.form_field.title }, this.form_field.id.length && (c.id = this.form_field.id.replace(/[^\w]/g, "_") + "_chosen"), this.container = a("<div />", c), this.is_multiple ? this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>') : this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'), this.form_field_jq.hide().after(this.container), this.dropdown = this.container.find("div.chosen-drop").first(), this.search_field = this.container.find("input").first(), this.search_results = this.container.find("ul.chosen-results").first(), this.search_field_scale(), this.search_no_results = this.container.find("li.no-results").first(), this.is_multiple ? (this.search_choices = this.container.find("ul.chosen-choices").first(), this.search_container = this.container.find("li.search-field").first()) : (this.search_container = this.container.find("div.chosen-search").first(), this.selected_item = this.container.find(".chosen-single").first()), this.results_build(), this.set_tab_index(), this.set_label_behavior(), this.form_field_jq.trigger("chosen:ready", { chosen: this }) }, Chosen.prototype.register_observers = function () { var a = this; return this.container.bind("mousedown.chosen", function (b) { a.container_mousedown(b) }), this.container.bind("mouseup.chosen", function (b) { a.container_mouseup(b) }), this.container.bind("mouseenter.chosen", function (b) { a.mouse_enter(b) }), this.container.bind("mouseleave.chosen", function (b) { a.mouse_leave(b) }), this.search_results.bind("mouseup.chosen", function (b) { a.search_results_mouseup(b) }), this.search_results.bind("mouseover.chosen", function (b) { a.search_results_mouseover(b) }), this.search_results.bind("mouseout.chosen", function (b) { a.search_results_mouseout(b) }), this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen", function (b) { a.search_results_mousewheel(b) }), this.search_results.bind("touchstart.chosen", function (b) { a.search_results_touchstart(b) }), this.search_results.bind("touchmove.chosen", function (b) { a.search_results_touchmove(b) }), this.search_results.bind("touchend.chosen", function (b) { a.search_results_touchend(b) }), this.form_field_jq.bind("chosen:updated.chosen", function (b) { a.results_update_field(b) }), this.form_field_jq.bind("chosen:activate.chosen", function (b) { a.activate_field(b) }), this.form_field_jq.bind("chosen:open.chosen", function (b) { a.container_mousedown(b) }), this.form_field_jq.bind("chosen:close.chosen", function (b) { a.input_blur(b) }), this.search_field.bind("blur.chosen", function (b) { a.input_blur(b) }), this.search_field.bind("keyup.chosen", function (b) { a.keyup_checker(b) }), this.search_field.bind("keydown.chosen", function (b) { a.keydown_checker(b) }), this.search_field.bind("focus.chosen", function (b) { a.input_focus(b) }), this.search_field.bind("cut.chosen", function (b) { a.clipboard_event_checker(b) }), this.search_field.bind("paste.chosen", function (b) { a.clipboard_event_checker(b) }), this.is_multiple ? this.search_choices.bind("click.chosen", function (b) { a.choices_click(b) }) : this.container.bind("click.chosen", function (a) { a.preventDefault() }) }, Chosen.prototype.destroy = function () { return a(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action), this.search_field[0].tabIndex && (this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex), this.container.remove(), this.form_field_jq.removeData("chosen"), this.form_field_jq.show() }, Chosen.prototype.search_field_disabled = function () { return this.is_disabled = this.form_field_jq[0].disabled, this.is_disabled ? (this.container.addClass("chosen-disabled"), this.search_field[0].disabled = !0, this.is_multiple || this.selected_item.unbind("focus.chosen", this.activate_action), this.close_field()) : (this.container.removeClass("chosen-disabled"), this.search_field[0].disabled = !1, this.is_multiple ? void 0 : this.selected_item.bind("focus.chosen", this.activate_action)) }, Chosen.prototype.container_mousedown = function (b) { return this.is_disabled || (b && "mousedown" === b.type && !this.results_showing && b.preventDefault(), null != b && a(b.target).hasClass("search-choice-close")) ? void 0 : (this.active_field ? this.is_multiple || !b || a(b.target)[0] !== this.selected_item[0] && !a(b.target).parents("a.chosen-single").length || (b.preventDefault(), this.results_toggle()) : (this.is_multiple && this.search_field.val(""), a(this.container[0].ownerDocument).bind("click.chosen", this.click_test_action), this.results_show()), this.activate_field()) }, Chosen.prototype.container_mouseup = function (a) { return "ABBR" !== a.target.nodeName || this.is_disabled ? void 0 : this.results_reset(a) }, Chosen.prototype.search_results_mousewheel = function (a) { var b; return a.originalEvent && (b = -a.originalEvent.wheelDelta || a.originalEvent.detail), null != b ? (a.preventDefault(), "DOMMouseScroll" === a.type && (b = 40 * b), this.search_results.scrollTop(b + this.search_results.scrollTop())) : void 0 }, Chosen.prototype.blur_test = function () { return !this.active_field && this.container.hasClass("chosen-container-active") ? this.close_field() : void 0 }, Chosen.prototype.close_field = function () { return a(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action), this.active_field = !1, this.results_hide(), this.container.removeClass("chosen-container-active"), this.clear_backstroke(), this.show_search_field_default(), this.search_field_scale() }, Chosen.prototype.activate_field = function () { return this.container.addClass("chosen-container-active"), this.active_field = !0, this.search_field.val(this.search_field.val()), this.search_field.focus() }, Chosen.prototype.test_active_click = function (b) { var c; return c = a(b.target).closest(".chosen-container"), c.length && this.container[0] === c[0] ? this.active_field = !0 : this.close_field() }, Chosen.prototype.results_build = function () { return this.parsing = !0, this.selected_option_count = null, this.results_data = SelectParser.select_to_array(this.form_field), this.is_multiple ? this.search_choices.find("li.search-choice").remove() : this.is_multiple || (this.single_set_selected_text(), this.disable_search || this.form_field.options.length <= this.disable_search_threshold ? (this.search_field[0].readOnly = !0, this.container.addClass("chosen-container-single-nosearch")) : (this.search_field[0].readOnly = !1, this.container.removeClass("chosen-container-single-nosearch"))), this.update_results_content(this.results_option_build({ first: !0 })), this.search_field_disabled(), this.show_search_field_default(), this.search_field_scale(), this.parsing = !1 }, Chosen.prototype.result_do_highlight = function (a) { var b, c, d, e, f; if (a.length) { if (this.result_clear_highlight(), this.result_highlight = a, this.result_highlight.addClass("highlighted"), d = parseInt(this.search_results.css("maxHeight"), 10), f = this.search_results.scrollTop(), e = d + f, c = this.result_highlight.position().top + this.search_results.scrollTop(), b = c + this.result_highlight.outerHeight(), b >= e) return this.search_results.scrollTop(b - d > 0 ? b - d : 0); if (f > c) return this.search_results.scrollTop(c) } }, Chosen.prototype.result_clear_highlight = function () { return this.result_highlight && this.result_highlight.removeClass("highlighted"), this.result_highlight = null }, Chosen.prototype.results_show = function () { return this.is_multiple && this.max_selected_options <= this.choices_count() ? (this.form_field_jq.trigger("chosen:maxselected", { chosen: this }), !1) : (this.container.addClass("chosen-with-drop"), this.results_showing = !0, this.search_field.focus(), this.search_field.val(this.search_field.val()), this.winnow_results(), this.form_field_jq.trigger("chosen:showing_dropdown", { chosen: this })) }, Chosen.prototype.update_results_content = function (a) { return this.search_results.html(a) }, Chosen.prototype.results_hide = function () { return this.results_showing && (this.result_clear_highlight(), this.container.removeClass("chosen-with-drop"), this.form_field_jq.trigger("chosen:hiding_dropdown", { chosen: this })), this.results_showing = !1 }, Chosen.prototype.set_tab_index = function () { var a; return this.form_field.tabIndex ? (a = this.form_field.tabIndex, this.form_field.tabIndex = -1, this.search_field[0].tabIndex = a) : void 0 }, Chosen.prototype.set_label_behavior = function () { var b = this; return this.form_field_label = this.form_field_jq.parents("label"), !this.form_field_label.length && this.form_field.id.length && (this.form_field_label = a("label[for='" + this.form_field.id + "']")), this.form_field_label.length > 0 ? this.form_field_label.bind("click.chosen", function (a) { return b.is_multiple ? b.container_mousedown(a) : b.activate_field() }) : void 0 }, Chosen.prototype.show_search_field_default = function () { return this.is_multiple && this.choices_count() < 1 && !this.active_field ? (this.search_field.val(this.default_text), this.search_field.addClass("default")) : (this.search_field.val(""), this.search_field.removeClass("default")) }, Chosen.prototype.search_results_mouseup = function (b) { var c; return c = a(b.target).hasClass("active-result") ? a(b.target) : a(b.target).parents(".active-result").first(), c.length ? (this.result_highlight = c, this.result_select(b), this.search_field.focus()) : void 0 }, Chosen.prototype.search_results_mouseover = function (b) { var c; return c = a(b.target).hasClass("active-result") ? a(b.target) : a(b.target).parents(".active-result").first(), c ? this.result_do_highlight(c) : void 0 }, Chosen.prototype.search_results_mouseout = function (b) { return a(b.target).hasClass("active-result") ? this.result_clear_highlight() : void 0 }, Chosen.prototype.choice_build = function (b) { var c, d, e = this; return c = a("<li />", { "class": "search-choice" }).html("<span>" + b.html + "</span>"), b.disabled ? c.addClass("search-choice-disabled") : (d = a("<a />", { "class": "search-choice-close", "data-option-array-index": b.array_index }), d.bind("click.chosen", function (a) { return e.choice_destroy_link_click(a) }), c.append(d)), this.search_container.before(c) }, Chosen.prototype.choice_destroy_link_click = function (b) { return b.preventDefault(), b.stopPropagation(), this.is_disabled ? void 0 : this.choice_destroy(a(b.target)) }, Chosen.prototype.choice_destroy = function (a) { return this.result_deselect(a[0].getAttribute("data-option-array-index")) ? (this.show_search_field_default(), this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1 && this.results_hide(), a.parents("li").first().remove(), this.search_field_scale()) : void 0 }, Chosen.prototype.results_reset = function () { return this.reset_single_select_options(), this.form_field.options[0].selected = !0, this.single_set_selected_text(), this.show_search_field_default(), this.results_reset_cleanup(), this.form_field_jq.trigger("change"), this.active_field ? this.results_hide() : void 0 }, Chosen.prototype.results_reset_cleanup = function () { return this.current_selectedIndex = this.form_field.selectedIndex, this.selected_item.find("abbr").remove() }, Chosen.prototype.result_select = function (a) { var b, c; return this.result_highlight ? (b = this.result_highlight, this.result_clear_highlight(), this.is_multiple && this.max_selected_options <= this.choices_count() ? (this.form_field_jq.trigger("chosen:maxselected", { chosen: this }), !1) : (this.is_multiple ? b.removeClass("active-result") : this.reset_single_select_options(), c = this.results_data[b[0].getAttribute("data-option-array-index")], c.selected = !0, this.form_field.options[c.options_index].selected = !0, this.selected_option_count = null, this.is_multiple ? this.choice_build(c) : this.single_set_selected_text(c.text), (a.metaKey || a.ctrlKey) && this.is_multiple || this.results_hide(), this.search_field.val(""), (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) && this.form_field_jq.trigger("change", { selected: this.form_field.options[c.options_index].value }), this.current_selectedIndex = this.form_field.selectedIndex, this.search_field_scale())) : void 0 }, Chosen.prototype.single_set_selected_text = function (a) { return null == a && (a = this.default_text), a === this.default_text ? this.selected_item.addClass("chosen-default") : (this.single_deselect_control_build(), this.selected_item.removeClass("chosen-default")), this.selected_item.find("span").text(a) }, Chosen.prototype.result_deselect = function (a) { var b; return b = this.results_data[a], this.form_field.options[b.options_index].disabled ? !1 : (b.selected = !1, this.form_field.options[b.options_index].selected = !1, this.selected_option_count = null, this.result_clear_highlight(), this.results_showing && this.winnow_results(), this.form_field_jq.trigger("change", { deselected: this.form_field.options[b.options_index].value }), this.search_field_scale(), !0) }, Chosen.prototype.single_deselect_control_build = function () { return this.allow_single_deselect ? (this.selected_item.find("abbr").length || this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'), this.selected_item.addClass("chosen-single-with-deselect")) : void 0 }, Chosen.prototype.get_search_text = function () { return this.search_field.val() === this.default_text ? "" : a("<div/>").text(a.trim(this.search_field.val())).html() }, Chosen.prototype.winnow_results_set_highlight = function () { var a, b; return b = this.is_multiple ? [] : this.search_results.find(".result-selected.active-result"), a = b.length ? b.first() : this.search_results.find(".active-result").first(), null != a ? this.result_do_highlight(a) : void 0 }, Chosen.prototype.no_results = function (b) { var c; return c = a('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>'), c.find("span").first().html(b), this.search_results.append(c), this.form_field_jq.trigger("chosen:no_results", { chosen: this }) }, Chosen.prototype.no_results_clear = function () { return this.search_results.find(".no-results").remove() }, Chosen.prototype.keydown_arrow = function () { var a; return this.results_showing && this.result_highlight ? (a = this.result_highlight.nextAll("li.active-result").first()) ? this.result_do_highlight(a) : void 0 : this.results_show() }, Chosen.prototype.keyup_arrow = function () { var a; return this.results_showing || this.is_multiple ? this.result_highlight ? (a = this.result_highlight.prevAll("li.active-result"), a.length ? this.result_do_highlight(a.first()) : (this.choices_count() > 0 && this.results_hide(), this.result_clear_highlight())) : void 0 : this.results_show() }, Chosen.prototype.keydown_backstroke = function () { var a; return this.pending_backstroke ? (this.choice_destroy(this.pending_backstroke.find("a").first()), this.clear_backstroke()) : (a = this.search_container.siblings("li.search-choice").last(), a.length && !a.hasClass("search-choice-disabled") ? (this.pending_backstroke = a, this.single_backstroke_delete ? this.keydown_backstroke() : this.pending_backstroke.addClass("search-choice-focus")) : void 0) }, Chosen.prototype.clear_backstroke = function () { return this.pending_backstroke && this.pending_backstroke.removeClass("search-choice-focus"), this.pending_backstroke = null }, Chosen.prototype.keydown_checker = function (a) { var b, c; switch (b = null != (c = a.which) ? c : a.keyCode, this.search_field_scale(), 8 !== b && this.pending_backstroke && this.clear_backstroke(), b) { case 8: this.backstroke_length = this.search_field.val().length; break; case 9: this.results_showing && !this.is_multiple && this.result_select(a), this.mouse_on_container = !1; break; case 13: a.preventDefault(); break; case 38: a.preventDefault(), this.keyup_arrow(); break; case 40: a.preventDefault(), this.keydown_arrow() } }, Chosen.prototype.search_field_scale = function () { var b, c, d, e, f, g, h, i, j; if (this.is_multiple) { for (d = 0, h = 0, f = "position:absolute; left: -1000px; top: -1000px; display:none;", g = ["font-size", "font-style", "font-weight", "font-family", "line-height", "text-transform", "letter-spacing"], i = 0, j = g.length; j > i; i++)e = g[i], f += e + ":" + this.search_field.css(e) + ";"; return b = a("<div />", { style: f }), b.text(this.search_field.val()), a("body").append(b), h = b.width() + 25, b.remove(), c = this.container.outerWidth(), h > c - 10 && (h = c - 10), this.search_field.css({ width: h + "px" }) } }, Chosen }(AbstractChosen) }.call(this); 539 </script> 540 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script> 541 542 <script type="text/javascript" src="/Files/Templates/Designs/PLC/js/jetmenu.js"></script> 543 544 <script type="text/javascript" src="/Files/Templates/Designs/PLC/fancybox/jquery.mousewheel-3.0.6.pack.js" defer=""></script> 545 <script type="text/javascript" src="/Files/Templates/Designs/PLC/fancybox/jquery.fancybox.js?v=2.1.5" defer=""></script> 546 <script src="/Files/Templates/Designs/PLC/js/bootstrap.min.js"></script> 547 <script src="/Files/Templates/Designs/PLC/js/jquery.mousewheel.min.js"></script> 548 <script src="/Files/Templates/Designs/PLC/js/jquery.easing.1.3.js"></script> 549 <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> 550 <script src="/Files/Templates/Designs/PLC/js/jquery.mCustomScrollbar.js"></script> 551 <script type="text/javascript" src="/Files/Templates/Designs/PLC/js/paging.js"></script> 552 <script src="/Files/Templates/Designs/PLC/js/price-range.js"></script> 553 <script src="/Files/Templates/Designs/PLC/js/tipso_v2.js"></script> 554 <script type="text/javascript"> 555 556 $(document).ready(function () { 557 if (window.navigator.userAgent.indexOf("SamsungBrowser") > -1) { 558 $(".whenNotiMainPg .mobileSlider").css("margin-top", "35px"); 559 } 560 $(function () { 561 if ($(window).width() > 750) { 562 $(".user-menu-mobile").css("display", "none"); 563 $(".sidenavi").css("display", "block"); 564 } 565 }); 566 567 568 $('.fancybox').fancybox({ 569 afterLoad: function () { 570 this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 571 } 572 }); 573 }); 574 575 </script> 576 577 <script type="text/javascript"> 578 @*$(document).ready(function () { 579 $(".jetmenu").jetmenu(); 580 });*@ 581 $(document).ready(function () { 582 $("#LoginEmail").focus(function () { 583 if ($(window).width() > 410 && $(window).width() < 415) { 584 $(".cus-modal").css("width", "96%"); 585 $(".cus-modal").css("right", "0"); 586 $(".cus-modal").css("height", "93%"); 587 $(".cus-modal").css("top", "20px"); 588 $(".cus-modal").css("left", "10px"); 589 $(".cus-modal").css("padding", "10px"); 590 } 591 }); 592 }); 593 $(document).ready(function () { 594 $("#LoginPassword").focus(function () { 595 if ($(window).width() > 410 && $(window).width() < 415) { 596 $(".cus-modal").css("width", "96%"); 597 $(".cus-modal").css("right", "0"); 598 $(".cus-modal").css("height", "93%"); 599 $(".cus-modal").css("top", "20px"); 600 $(".cus-modal").css("left", "10px"); 601 $(".cus-modal").css("padding", "10px"); 602 } 603 }); 604 }); 605 </script> 606 <script type="text/javascript" src='/Files/Templates/Designs/PLC/js/jquery.elevateZoom-3.0.8.min.js'></script> 607 608 <!--FONT SETTINGS--> 609 @functions{ 610 public class FontSettings 611 { 612 public class Logo 613 { 614 public static string FontFamily { get; set; } 615 public static string FontSize { get; set; } 616 public static string FontWeight { get; set; } 617 public static string Color { get; set; } 618 public static string LineHeight { get; set; } 619 public static string Casing { get; set; } 620 public static string LetterSpacing { get; set; } 621 } 622 623 public class H1 624 { 625 public static string FontFamily { get; set; } 626 public static string FontSize { get; set; } 627 public static string FontWeight { get; set; } 628 public static string Color { get; set; } 629 public static string LineHeight { get; set; } 630 public static string Casing { get; set; } 631 public static string LetterSpacing { get; set; } 632 } 633 634 public class H2 635 { 636 public static string FontFamily { get; set; } 637 public static string FontSize { get; set; } 638 public static string FontWeight { get; set; } 639 public static string Color { get; set; } 640 public static string LineHeight { get; set; } 641 public static string Casing { get; set; } 642 public static string LetterSpacing { get; set; } 643 } 644 645 public class Body 646 { 647 public static string FontFamily { get; set; } 648 public static string FontSize { get; set; } 649 public static string FontWeight { get; set; } 650 public static string Color { get; set; } 651 public static string LineHeight { get; set; } 652 public static string Casing { get; set; } 653 public static string LetterSpacing { get; set; } 654 } 655 } 656 657 private void InitFontSettings() 658 { 659 //LOGO 660 FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont")); 661 FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size")+"px"; 662 FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal"); 663 FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1"); 664 FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px"; 665 FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing"); 666 FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color"); 667 668 669 //HEADINGS 670 FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont")); 671 FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size")+"px"; 672 FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal"); 673 FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1"); 674 FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px"; 675 FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing"); 676 FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color"); 677 678 FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont")); 679 FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size")+"px"; 680 FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal"); 681 FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1"); 682 FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px"; 683 FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing"); 684 FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color"); 685 686 687 //BODY 688 FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont")); 689 FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px"; 690 FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal"); 691 FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1"); 692 FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px"; 693 FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing"); 694 FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color"); 695 696 697 gfonts.Add(FontSettings.Logo.FontFamily, ""); 698 if (!gfonts.ContainsKey(FontSettings.H1.FontFamily)) 699 { 700 gfonts.Add(FontSettings.H1.FontFamily, ""); 701 } 702 if (!gfonts.ContainsKey(FontSettings.H2.FontFamily)) 703 { 704 gfonts.Add(FontSettings.H2.FontFamily, ""); 705 } 706 if (!gfonts.ContainsKey(FontSettings.Body.FontFamily)) 707 { 708 gfonts.Add(FontSettings.Body.FontFamily, ""); 709 } 710 711 } 712 713 private string CustomFont (string firstfont, string secondfont) 714 { 715 if (firstfont == "custom") 716 { 717 return secondfont; 718 } 719 else 720 { 721 return firstfont; 722 } 723 } 724 725 private string CheckExistence (string stringitem, string defaultvalue) 726 { 727 if (!string.IsNullOrWhiteSpace(stringitem)) { 728 return stringitem; 729 } else { 730 return defaultvalue; 731 } 732 } 733 734 private System.Collections.Generic.Dictionary<string, object> gfonts = new System.Collections.Generic.Dictionary<string, object>(); 735 } 736 737 @{ 738 InitFontSettings(); 739 } 740 741 @helper GoogleFonts() 742 { 743 if (gfonts != null) 744 { 745 foreach (var item in gfonts) 746 { 747 <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=@item.Key:100,200,300,400,500,600,700,800,900"> 748 } 749 } 750 } 751 752 @functions{ 753 public string FontStylesCSS() 754 { 755 string CssString = @" 756 .dw-logotext { 757 font-family: " + FontSettings.Logo.FontFamily + @"; 758 font-size: " + FontSettings.Logo.FontSize + @"; 759 font-weight: " + FontSettings.Logo.FontWeight + @"; 760 line-height: " + FontSettings.Logo.LineHeight + @" !important; 761 letter-spacing: " + FontSettings.Logo.LetterSpacing + @"; 762 text-transform: " + FontSettings.Logo.Casing + @"; 763 color: " + FontSettings.Logo.Color + @"; 764 } 765 766 h1 { 767 font-family: " + FontSettings.H1.FontFamily + @" !important; 768 font-size: " + FontSettings.H1.FontSize + @"; 769 color: " + FontSettings.H1.Color + @"; 770 line-height: " + FontSettings.H1.LineHeight + @" !important; 771 text-transform: " + FontSettings.H1.Casing + @"; 772 font-weight: " + FontSettings.H1.FontWeight + @"; 773 letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important; 774 } 775 776 777 h2, h3, h4, h5, h6 { 778 margin-top: 0.7em; 779 margin-bottom: 0.7em; 780 781 font-family: " + FontSettings.H2.FontFamily + @" !important; 782 font-size: " + FontSettings.H2.FontSize + @"; 783 color: " + FontSettings.H2.Color + @"; 784 line-height: " + FontSettings.H2.LineHeight + @"; 785 text-transform: " + FontSettings.H2.Casing + @" !important; 786 font-weight: " + FontSettings.H2.FontWeight + @" !important; 787 letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important; 788 } 789 790 h4, h5, h6 { 791 font-size: 16px !important; 792 } 793 794 body { 795 font-family: " + FontSettings.Body.FontFamily + @" !important; 796 font-size: " + FontSettings.Body.FontSize + @"; 797 color: " + FontSettings.Body.Color + @"; 798 line-height: " + FontSettings.Body.LineHeight + @" !important; 799 text-transform: " + FontSettings.Body.Casing + @"; 800 font-weight: " + FontSettings.Body.FontWeight + @"; 801 letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important; 802 } 803 804 .navbar-wp .navbar-nav > li > a { 805 font-family: " + FontSettings.Body.FontFamily + @" !important; 806 } 807 808 .section-title { 809 margin-top: 0.7em; 810 margin-bottom: 0.7em; 811 } 812 "; 813 return CssString; 814 } 815 } 816 @*@GoogleFonts()*@ <!-- 15 January 2017 --> 817 <!-- GENERAL/COLOR SETTINGS --> 818 @functions{ 819 public class ColorSettings 820 { 821 public class Color 822 { 823 public static string Primary { get; set; } 824 public static string Secondary { get; set; } 825 public static string NavbarFont { get; set; } 826 public static string Footer { get; set; } 827 public static string FooterFont { get; set; } 828 829 public static string Sticker { get; set; } 830 public static string Price { get; set; } 831 public static string Cart { get; set; } 832 } 833 } 834 835 private void InitColorSettings() 836 { 837 ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color"); 838 ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color"); 839 840 ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor"); 841 842 if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont)) 843 { 844 ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary); 845 } 846 847 ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color"); 848 ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer); 849 850 ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color"); 851 ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color"); 852 ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color"); 853 } 854 855 public string GetColorSettings() 856 { 857 string CssString = @" 858 a:hover, a:focus, a:active { 859 color: @Primary; 860 } 861 862 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 863 color: @NavbarFont; 864 } 865 866 .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus { 867 color: @NavbarFont; 868 } 869 870 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 871 border-top: 0px solid @Secondary; 872 color: @NavbarFont; 873 } 874 875 .navbar-wp .navbar-nav > li > a span:after { 876 background-color: @Primary; 877 } 878 879 .btn-dw-primary { 880 color: #FFF; 881 background-color: @Primary; 882 border-color: @Primary; 883 } 884 885 .btn-dw-secondary { 886 color: @NavbarFont; 887 background-color: @Secondary; 888 border-color: @Secondary; 889 } 890 891 .btn-dw-cart { 892 color: #FFF; 893 background-color: @Cart; 894 border-color: @Cart; 895 } 896 897 .dw-section-title { 898 border-color: @Secondary; 899 } 900 901 .dw-minicart-update { 902 color: #FFF !important; 903 background-color: @Primary; 904 transition: all 0.3s ease-in-out 0s; 905 } 906 907 .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active { 908 color: @Primary; 909 } 910 911 .form-control:hover, .form-control:focus, .form-control:active { 912 border-color: @Primary !important; 913 } 914 915 .bg-2 { 916 background: @Primary !important; 917 } 918 919 .blockquote-1:hover { 920 border-color: @Primary !important; 921 } 922 923 .navbar-wp .navbar-nav > li > a.dropdown-form-toggle, .navbar-wp .navbar-nav > li > a.dropdown-form-toggle:hover, .navbar-wp .navbar-nav > li > a.dropdown-form-toggle:focus { 924 color: @Primary; 925 } 926 927 .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle, .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle:hover, .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle:focus { 928 color: @Primary; 929 } 930 931 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 932 border: 0px solid @Primary; 933 } 934 935 .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus { 936 background-color: @Primary !important; 937 border-color: @Primary !important; 938 } 939 940 .navbar-wp .dropdown-menu { 941 border-top: 1px solid @Primary !important; 942 border-bottom: 3px solid @Primary !important; 943 } 944 945 .navbar-wp .dropdown-menu > li > a:hover { 946 background: @Primary !important; 947 color: #fff; 948 } 949 950 .navbar-wp .dropdown-menu .active { 951 background: @Primary !important; 952 color: #fff; 953 } 954 955 .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover { 956 background: @Primary !important; 957 } 958 959 .nav > ul > li > a:hover { 960 color: @Primary; 961 } 962 963 .lw .w-box.w-box-inverse .thmb-img i { 964 color: @Primary !important; 965 } 966 967 .w-box.w-box-inverse .thmb-img:hover i { 968 background: @Primary !important; 969 } 970 971 .c-box { 972 border: 1px solid @Primary !important; 973 } 974 975 .c-box .c-box-header { 976 background: @Primary !important; 977 } 978 979 .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 { 980 color: @Primary !important; 981 } 982 983 .layer-slider-wrapper .title.title-base { 984 background: @Primary !important; 985 } 986 987 .layer-slider-wrapper .subtitle { 988 color: @Primary !important; 989 } 990 991 .layer-slider-wrapper .list-item { 992 color: @Primary !important; 993 } 994 995 .box-element.box-element-bordered { 996 border: 1px solid @Primary !important; 997 } 998 999 .carousel-2 .carousel-indicators .active { 1000 background-color: @Primary !important; 1001 } 1002 1003 .carousel-2 .carousel-nav a { 1004 color: @Primary !important; 1005 } 1006 1007 .carousel-2 .carousel-nav a:hover { 1008 background: @Primary !important; 1009 } 1010 1011 .carousel-3 .carousel-nav a { 1012 color: @Primary !important; 1013 } 1014 1015 .carousel-3 .carousel-nav a:hover { 1016 background: @Primary !important; 1017 } 1018 1019 .like-button .button.liked i { 1020 color: @Primary !important; 1021 } 1022 1023 ul.list-listings li.featured { 1024 border-color: @Primary !important; 1025 } 1026 1027 ul.list-check li i { 1028 color: @Primary !important; 1029 } 1030 1031 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{ 1032 color: @NavbarFont; 1033 background-color: @Primary; 1034 border-color: @Primary; 1035 } 1036 1037 ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{ 1038 color: @NavbarFont; 1039 background-color: @Primary; 1040 border-color: @Primary; 1041 } 1042 1043 .timeline .event:nth-child(2n):before { 1044 background-color: @Primary !important; 1045 } 1046 1047 .timeline .event:nth-child(2n-1):before { 1048 background-color: @Primary !important; 1049 } 1050 1051 #toTopHover { 1052 background-color: @Primary !important; 1053 } 1054 1055 .tags-list li { 1056 border: 1px solid @Primary !important; 1057 color: @Primary !important; 1058 } 1059 1060 .tags-list li:hover, 1061 a.open-panel { 1062 background-color: @Primary !important; 1063 } 1064 1065 .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus, 1066 .panel-group .panel-heading a i, 1067 .tags-list li a { 1068 color: @NavbarFont !important; 1069 } 1070 1071 .nav-pills > li > a:hover, .nav-pills > li > a:focus { 1072 color: @NavbarFont !important; 1073 background: none repeat scroll 0% 0% @Secondary !important; 1074 } 1075 1076 footer { 1077 background: @Footer !important; 1078 } 1079 1080 footer h4 { 1081 color: @FooterFont !important; 1082 } 1083 1084 footer a { 1085 color: @FooterFont !important; 1086 } 1087 1088 footer a:hover, footer a:focus, footer a:active { 1089 color: @Secondary !important; 1090 } 1091 1092 footer p { 1093 color: @FooterFont !important; 1094 } 1095 1096 footer ul > li { 1097 color: @FooterFont !important; 1098 } 1099 1100 1101 /* Button colors */ 1102 .btn-base { 1103 color: @NavbarFont !important; 1104 background-color: @Secondary !important; 1105 border: 1px solid @Secondary !important; 1106 } 1107 1108 .btn-base:before { 1109 background-color: @Secondary !important; 1110 } 1111 1112 .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before { 1113 color: @NavbarFont !important; 1114 background-color: @Primary !important; 1115 border-color: @Primary !important; 1116 } 1117 1118 .btn-icon:before { 1119 transition: none !important; 1120 } 1121 1122 .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base { 1123 color: @NavbarFont !important; 1124 background-color: @Primary !important; 1125 border-color: @Primary !important; 1126 } 1127 1128 .btn-two { 1129 color: @NavbarFont !important; 1130 border-color: @Secondary !important; 1131 background-color: @Secondary !important; 1132 border: 1px solid @Secondary !important; 1133 } 1134 1135 .btn-two:hover, .btn-two:focus, .btn-two:active, .btn-two.active, .open .dropdown-toggle.btn-two { 1136 color: @NavbarFont !important; 1137 background-color: @Primary !important; 1138 border-color: @Primary !important; 1139 } 1140 1141 .btn-primary { 1142 background-color: @Primary !important; 1143 border-color: @Primary !important; 1144 } 1145 1146 .open .dropdown-toggle.btn-primary { 1147 background-color: @Primary !important; 1148 border-color: @Primary !important; 1149 } 1150 1151 .btn-one:hover, .btn-one:focus, .btn-one:active, .btn-one.active, .open .dropdown-toggle.btn-one { 1152 color: @Primary !important; 1153 } 1154 1155 .btn-four { 1156 border: 2px solid @Primary!important; 1157 color: @Primary !important; 1158 } 1159 1160 .btn-four:hover, .btn-four:focus, .btn-four:active, .btn-four.active, .open .dropdown-toggle.btn-four { 1161 background-color: #fff !important; 1162 } 1163 1164 1165 /* Dropdown-menu */ 1166 .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { 1167 background: @Primary !important; 1168 color: #fff !important; 1169 } 1170 1171 /* Ecom settings */ 1172 .ribbon.base { 1173 background: @Sticker !important; 1174 color: #fff; 1175 border-right: 5px solid @Sticker !important; 1176 } 1177 1178 .ribbon.base:before { 1179 border-top: 27px solid @Sticker !important; 1180 } 1181 1182 .ribbon.base:after { 1183 border-bottom: 27px solid @Sticker !important; 1184 } 1185 1186 .price { 1187 color: @Price !important; 1188 } 1189 1190 .discount-sticker { 1191 background-color: @Sticker !important; 1192 } 1193 1194 .bs-callout-primary { 1195 border-left-color: @Primary !important; 1196 }"; 1197 1198 return ParseCSSToString(CssString); 1199 } 1200 1201 private string ParseCSSToString(string TheString) 1202 { 1203 TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary); 1204 TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary); 1205 TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont); 1206 TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont); 1207 TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer); 1208 1209 TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker); 1210 TheString = TheString.Replace("@Price", ColorSettings.Color.Price); 1211 TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart); 1212 1213 1214 System.Text.StringBuilder sb = new System.Text.StringBuilder(); 1215 1216 foreach(var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) 1217 { 1218 sb.AppendLine(item); 1219 } 1220 1221 return sb.ToString(); 1222 } 1223 } 1224 1225 @{ 1226 InitColorSettings(); 1227 } 1228 1229 1230 1231 @using System.Drawing 1232 @using System.Net 1233 1234 1235 @functions{ 1236 public class GeneralSettings 1237 { 1238 1239 public class Header 1240 { 1241 public static string Mode { get; set; } 1242 public static string Classes { get; set; } 1243 public static bool Show { get; set; } 1244 public static string Background { get; set; } 1245 } 1246 1247 public class Logo 1248 { 1249 public static string Image { get; set; } 1250 public static string Text { get; set; } 1251 public static string SecondaryColor { get; set; } 1252 } 1253 1254 public class Navigation 1255 { 1256 public static string Position { get; set; } 1257 public static string InvertedPosition { get; set; } 1258 public static string StickyMenu { get; set; } 1259 public static string SelectionMode { get; set; } 1260 public static string SelectionStyle { get; set; } 1261 public static int SelectionWeight { get; set; } 1262 public static bool Case { get; set; } 1263 1264 public static string BreadcrumbMode { get; set; } 1265 public static string BreadcrumbAlign { get; set; } 1266 1267 public static string LeftmenuMode { get; set; } 1268 1269 public static string ButtonDesign { get; set; } 1270 } 1271 1272 public class Headings 1273 { 1274 public static string Mode { get; set; } 1275 } 1276 1277 public class Background 1278 { 1279 public static string Color { get; set; } 1280 public static string Image { get; set; } 1281 public static string CustomImage { get; set; } 1282 public static bool GradientColor { get; set; } 1283 public static string GradientPercentage { get; set; } 1284 public static string Style { get; set; } 1285 public static string Position { get; set; } 1286 } 1287 1288 public class Site 1289 { 1290 public static bool Shadow { get; set; } 1291 public static string LayoutMode { get; set; } 1292 } 1293 1294 public class Images 1295 { 1296 public static bool RoundCorners { get; set; } 1297 } 1298 } 1299 1300 private void InitGeneralSettings() 1301 { 1302 //Header settings 1303 GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode"); 1304 GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow"); 1305 GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground"); 1306 1307 if (GeneralSettings.Header.Mode == "solid"){ 1308 GeneralSettings.Header.Classes = ""; 1309 } 1310 1311 if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){ 1312 GeneralSettings.Header.Classes = "header-alpha header-cover"; 1313 } 1314 1315 1316 //Logo settings 1317 GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo"); 1318 GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText"); 1319 GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); 1320 1321 1322 //Navigation settings 1323 GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); 1324 GeneralSettings.Navigation.StickyMenu = "off"; 1325 1326 if (GetBoolean("Item.Area.NavigationSticky")) { 1327 if (GeneralSettings.Header.Show) 1328 { 1329 if (GeneralSettings.Header.Mode == "cover") 1330 { 1331 GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\""; 1332 } 1333 else 1334 { 1335 int offset = ImageHeight()+28; 1336 1337 GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\""; 1338 } 1339 } 1340 else 1341 { 1342 GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\""; 1343 } 1344 } 1345 1346 if (GeneralSettings.Navigation.Position == "left") { 1347 GeneralSettings.Navigation.InvertedPosition = "right"; 1348 } 1349 else 1350 { 1351 GeneralSettings.Navigation.InvertedPosition = "left"; 1352 } 1353 1354 GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode"); 1355 GeneralSettings.Navigation.SelectionStyle = ""; 1356 GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight"); 1357 1358 if (GeneralSettings.Navigation.SelectionMode == "arrow") { 1359 GeneralSettings.Navigation.SelectionStyle = "navbar-arrow"; 1360 } 1361 1362 GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase"); 1363 1364 GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout"); 1365 GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign"); 1366 1367 GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode"); 1368 1369 GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign"); 1370 1371 1372 //Background settings 1373 GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image"); 1374 GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage"); 1375 GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color"); 1376 GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor"); 1377 GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage"); 1378 1379 1380 if (@GetString("Item.Area.BackgroundFixed") == "True") 1381 { 1382 GeneralSettings.Background.Position = "fixed"; 1383 } 1384 else 1385 { 1386 GeneralSettings.Background.Position = ""; 1387 } 1388 1389 1390 if (GeneralSettings.Background.Image == "none") 1391 { 1392 GeneralSettings.Background.Style = ""; 1393 } 1394 else if (GeneralSettings.Background.Image == "custom") 1395 { 1396 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage)) 1397 { 1398 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&amp;Crop=1&amp;Compression=75&amp;image=" + GeneralSettings.Background.CustomImage + "') " + GeneralSettings.Background.Position + " !important; "; 1399 } 1400 } 1401 else 1402 { 1403 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&amp;Crop=1&amp;Compression=75&amp;image=/Files/Templates/Designs/Dwsimple/images/background/" + GeneralSettings.Background.Image + "') " + GeneralSettings.Background.Position + " !important; "; 1404 } 1405 1406 1407 //Headings settings 1408 GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode"); 1409 1410 1411 //Site settings 1412 GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow"); 1413 GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode"); 1414 1415 if (GeneralSettings.Site.LayoutMode == "boxed"){ 1416 GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode; 1417 GeneralSettings.Header.Classes += " header-boxed"; 1418 } 1419 1420 1421 //Image settings 1422 GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners"); 1423 } 1424 1425 public string GetGeneralCSS() 1426 { 1427 string CssString = ""; 1428 int SelectionWeight = GeneralSettings.Navigation.SelectionWeight; 1429 1430 //Site settings 1431 if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF") 1432 { 1433 int offset = ImageHeight()+28; 1434 1435 CssString += @" 1436 .dw-offsetmenu-logo { 1437 color: #333 !important; 1438 }"; 1439 } 1440 1441 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color)) 1442 { 1443 CssString += @" 1444 body { 1445 background-color: " + GeneralSettings.Background.Color + @"; 1446 background-size: cover; 1447 overflow-y: scroll; 1448 }"; 1449 } 1450 1451 if (GeneralSettings.Background.GradientColor) 1452 { 1453 CssString += @" 1454 body { 1455 background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1456 background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1457 background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1458 background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1459 background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1460 background-attachment: fixed; 1461 background-color: " + GeneralSettings.Background.Color + @" !important; 1462 }"; 1463 } 1464 1465 if (GeneralSettings.Site.Shadow) 1466 { 1467 CssString += @" 1468 .shad { 1469 -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1470 -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1471 box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1472 }"; 1473 } 1474 1475 //Image settings 1476 if (GeneralSettings.Images.RoundCorners) 1477 { 1478 CssString += @" 1479 .content-image { 1480 border-radius: 6px; 1481 -webkit-border-radius: 6px; 1482 -moz-border-radius: 6px; 1483 }"; 1484 } 1485 1486 //Navbar and header custom settings 1487 if (GeneralSettings.Header.Mode == "cover") 1488 { 1489 CssString += @" 1490 .navbar-wp { 1491 background-color: none !important; 1492 }"; 1493 1494 if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile") 1495 { 1496 CssString += @" 1497 .header-cover .navbar-wp { 1498 top: 0px !important; 1499 }"; 1500 } 1501 } 1502 else 1503 { 1504 if (GeneralSettings.Header.Show) 1505 { 1506 CssString += @" 1507 .navbar-wp.affix .navbar-nav > li > a { 1508 padding: 16px 16px !important; 1509 }"; 1510 } 1511 } 1512 1513 if (GeneralSettings.Header.Background == "colorline") 1514 { 1515 CssString += @" 1516 .navbar-wp, .navbar-wp.affix { 1517 border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important; 1518 } 1519 1520 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1521 background-color: #FFF; 1522 color: #333; 1523 } 1524 1525 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1526 color: " + ColorSettings.Color.NavbarFont + @"; 1527 } 1528 1529 .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { 1530 color: " + ColorSettings.Color.NavbarFont + @" !important; 1531 }"; 1532 } else if (GeneralSettings.Header.Background == "neutral") 1533 { 1534 CssString += @" 1535 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1536 background-color: #f1f1f1; 1537 } 1538 1539 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1540 color: #333; 1541 } 1542 1543 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1544 color: " + ColorSettings.Color.NavbarFont + @"; 1545 } 1546 1547 .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { 1548 color: " + ColorSettings.Color.NavbarFont + @" !important; 1549 }"; 1550 } 1551 else if (GeneralSettings.Header.Background == "transparent") 1552 { 1553 CssString += @" 1554 .navbar-wp, .navbar-wp.affix { 1555 background-color: #FFF; 1556 opacity: 0.9; 1557 filter: alpha(opacity=90); /* For IE8 and earlier */ 1558 } 1559 1560 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1561 color: #333; 1562 } 1563 1564 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1565 color: " + ColorSettings.Color.NavbarFont + @"; 1566 } 1567 1568 .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { 1569 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1570 }"; 1571 } 1572 else 1573 { 1574 CssString += @" 1575 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1576 background-color: " + ColorSettings.Color.Secondary + @"; 1577 } 1578 1579 .dw-header-sm-title { 1580 color: " + ColorSettings.Color.NavbarFont + @" !important; 1581 }"; 1582 } 1583 1584 if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){ 1585 CssString += NavbarPosition(false, SelectionWeight); 1586 1587 CssString += @" 1588 .dw-navbar-button > a { 1589 background-color: transparent !important; 1590 } 1591 1592 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1593 background-color: " + ColorSettings.Color.Primary + @" !important; 1594 }"; 1595 } 1596 1597 if (GeneralSettings.Navigation.SelectionMode == "underline"){ 1598 CssString += NavbarPosition(true); 1599 1600 CssString += ClearBackground(); 1601 1602 CssString += @" 1603 .dw-navbar-button > a span:after { 1604 position: absolute; 1605 content: ''; 1606 left: 0px; 1607 bottom: 0px; 1608 height: " + SelectionWeight + @"px; 1609 width: 100%; 1610 transform: scaleX(0); 1611 transition: all 0.3s ease-in-out 0s; 1612 } 1613 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1614 color: " + ColorSettings.Color.Primary + @" !important; 1615 } 1616 1617 .dw-navbar-button > a:hover span:after, dw-navbar-button > a:active span:after, dw-navbar-button > a:focus span:after, .active > a span:after { 1618 color: " + ColorSettings.Color.Primary + @" !important; 1619 transform: scaleX(1); 1620 transition: all 0.3s ease-in-out 0s; 1621 }"; 1622 } 1623 1624 if (GeneralSettings.Navigation.SelectionMode == "boxed"){ 1625 CssString += NavbarPosition(true, SelectionWeight); 1626 1627 CssString += @" 1628 .dw-navbar-button > a { 1629 background-color: transparent !important; 1630 } 1631 1632 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1633 background-color: " + ColorSettings.Color.Primary + @" !important; 1634 transition: all 0.3s ease-in-out 0s; 1635 }"; 1636 } 1637 1638 if (GeneralSettings.Navigation.SelectionMode == "border"){ 1639 CssString += NavbarPosition(true, 6, SelectionWeight); 1640 1641 CssString += ClearBackground(); 1642 1643 CssString += @" 1644 .dw-navbar-button > a { 1645 border: " + SelectionWeight + @"px solid transparent !important; transition: None !important; 1646 } 1647 1648 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1649 border-width: " + SelectionWeight + @"px !important; 1650 border-color: " + ColorSettings.Color.Primary + @" !important; 1651 transition: all 0.3s ease-in-out 0s; 1652 }"; 1653 } 1654 1655 if (GeneralSettings.Navigation.SelectionMode == "font"){ 1656 CssString += NavbarPosition(); 1657 1658 CssString += ClearBackground(); 1659 1660 SelectionWeight = (SelectionWeight*100); 1661 1662 CssString += @" 1663 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1664 color: " + ColorSettings.Color.Primary + @" !important; 1665 font-weight: " + SelectionWeight + @" !important; 1666 transition: all 0.3s ease-in-out 0s; 1667 }"; 1668 } 1669 1670 if (GeneralSettings.Navigation.Case){ 1671 CssString += @" 1672 .dw-navbar-button > a { 1673 text-transform: uppercase !important; 1674 }"; 1675 } 1676 else 1677 { 1678 CssString += @" 1679 .dw-navbar-button > a { 1680 text-transform: none !important; 1681 }"; 1682 } 1683 1684 1685 //Breadcrumb custom settings 1686 if (GeneralSettings.Navigation.BreadcrumbMode == "light") 1687 { 1688 CssString += @" 1689 .pg-opt { 1690 border-bottom: 0px; 1691 background: none repeat scroll 0% 0% #FFF; 1692 } 1693 1694 .dw-breadcrumb-title { 1695 font-size: 14px !important; 1696 padding: 5px 0px 5px 0px !important; 1697 } 1698 1699 .dw-breadcrumb { 1700 padding: 5px !important; 1701 }"; 1702 } 1703 1704 if (GeneralSettings.Navigation.BreadcrumbMode == "normal") 1705 { 1706 CssString += @" 1707 .dw-breadcrumb-title { 1708 font-size: 14px !important; 1709 padding: 5px 0px 5px 0px !important; 1710 } 1711 1712 .dw-breadcrumb a, .pg-opt .breadcrumb { 1713 padding: 5px !important; 1714 }"; 1715 } 1716 1717 if (GeneralSettings.Navigation.BreadcrumbMode == "large") 1718 { 1719 CssString += @" 1720 .dw-breadcrumb-title { 1721 font-size: 22px !important; 1722 padding: 15px 0px 15px 0px !important; 1723 } 1724 1725 .dw-breadcrumb { 1726 padding: 15px !important; 1727 }"; 1728 } 1729 1730 1731 if (GeneralSettings.Navigation.BreadcrumbAlign == "right") 1732 { 1733 CssString += @" 1734 .dw-breadcrumb { 1735 float: right !important; 1736 }"; 1737 } 1738 else 1739 { 1740 CssString += @" 1741 .dw-breadcrumb { 1742 float: left !important; 1743 }"; 1744 } 1745 1746 1747 //Left menu custom settings 1748 if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color") 1749 { 1750 CssString += @" 1751 ul.dw-categories > li > ul > li > a { 1752 padding: 5px 35px; 1753 } 1754 1755 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1756 border: 0px solid #EEE; 1757 } 1758 1759 ul.dw-categories > li > ul { 1760 background: none repeat scroll 0% 0% #FFF; 1761 } 1762 1763 ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active { 1764 background-color: #FFF !important; 1765 color: " + ColorSettings.Color.Primary + @" !important; 1766 } 1767 1768 .list-active, .list-active > a { 1769 background-color: #FFF; 1770 color: " + ColorSettings.Color.Primary + @" !important; 1771 } 1772 1773 .list-open-active { 1774 background-color: #FFF; 1775 color: " + ColorSettings.Color.Primary + @" !important; 1776 }"; 1777 } 1778 1779 if (GeneralSettings.Navigation.LeftmenuMode == "lines") 1780 { 1781 CssString += @" 1782 ul.dw-categories > li { 1783 border-bottom: 1px solid #EEE; 1784 } 1785 1786 ul.dw-categories { 1787 border: 0px solid #EEE; 1788 } 1789 1790 ul.dw-categories > li > ul { 1791 background: none repeat scroll 0% 0% #FFF; 1792 } 1793 1794 ul.dw-categories li a:hover, a:focus, a:active { 1795 background-color: #FFF !important; 1796 color: " + ColorSettings.Color.Primary + @" !important; 1797 } 1798 1799 .list-active, .list-active > a { 1800 background-color: #FFF; 1801 color: " + ColorSettings.Color.Primary + @" !important; 1802 } 1803 1804 .list-open-active { 1805 background-color: #FFF; 1806 color: " + ColorSettings.Color.Primary + @" !important; 1807 }"; 1808 } 1809 1810 if (GeneralSettings.Navigation.LeftmenuMode == "boxed") 1811 { 1812 CssString += @" 1813 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1814 border: 0px solid #EEE; 1815 } 1816 1817 .list-active, .list-active > a { 1818 background-color: " + ColorSettings.Color.Primary + @" !important; 1819 color: #FFF; 1820 }"; 1821 } 1822 1823 if (GeneralSettings.Navigation.LeftmenuMode == "border") 1824 { 1825 CssString += @" 1826 ul.dw-categories > li { 1827 border: 1px solid #EEE; 1828 } 1829 1830 ul.dw-categories > li > ul > li { 1831 border-top: 1px solid #EEE; 1832 } 1833 1834 .list-active, .list-active > a { 1835 background-color: " + ColorSettings.Color.Primary + @" !important; 1836 color: #FFF; 1837 }"; 1838 } 1839 1840 if (GeneralSettings.Navigation.LeftmenuMode == "light-color") 1841 { 1842 CssString += @" 1843 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active { 1844 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1845 } 1846 1847 ul.dw-categories .list-active > a { 1848 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1849 } 1850 1851 .btn-dw:hover, .btn-dw:focus, .btn-dw:active { 1852 1853 }"; 1854 } 1855 1856 1857 //Buttons custom designs 1858 if (GeneralSettings.Navigation.ButtonDesign == "light-rounded") 1859 { 1860 CssString += @" 1861 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1862 border-width: 0px; 1863 } 1864 1865 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1866 background-color: " + ColorSettings.Color.Secondary + @"; 1867 color: #FFF; 1868 border-width: 0px; 1869 } 1870 1871 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1872 background-color: " + ColorSettings.Color.Primary + @"; 1873 color: #FFF; 1874 border-width: 0px; 1875 } 1876 1877 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1878 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1879 color: #FFF; 1880 border-width: 0px; 1881 }"; 1882 } 1883 1884 if (GeneralSettings.Navigation.ButtonDesign == "corners") 1885 { 1886 CssString += @" 1887 .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart { 1888 border-radius: 0px !important; 1889 border-width: 0px; 1890 } 1891 1892 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1893 background-color: " + ColorSettings.Color.Secondary + @"; 1894 color: #FFF; 1895 border-width: 0px; 1896 } 1897 1898 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1899 background-color: " + ColorSettings.Color.Primary + @"; 1900 color: #FFF; 1901 border-width: 0px; 1902 } 1903 1904 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1905 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1906 color: #FFF; 1907 border-width: 0px; 1908 }"; 1909 } 1910 1911 if (GeneralSettings.Navigation.ButtonDesign == "round") 1912 { 1913 CssString += @" 1914 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1915 padding: 5px 15px; 1916 border-radius: 200px !important; 1917 border-width: 0px !important; 1918 } 1919 1920 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1921 background-color: " + ColorSettings.Color.Secondary + @"; 1922 color: #FFF; 1923 border-width: 0px !important; 1924 } 1925 1926 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1927 background-color: " + ColorSettings.Color.Primary + @"; 1928 color: #FFF; 1929 border-width: 0px !important; 1930 } 1931 1932 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1933 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1934 color: #FFF; 1935 border-width: 0px !important; 1936 }"; 1937 } 1938 1939 if (GeneralSettings.Navigation.ButtonDesign == "border") 1940 { 1941 CssString += @" 1942 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1943 background-color: transparent; 1944 } 1945 1946 .btn-dw-primary { 1947 border-width: 4px; 1948 padding: 3px 10px; 1949 color: " + ColorSettings.Color.Primary + @"; 1950 } 1951 1952 .btn-dw-secondary { 1953 border-width: 2px; 1954 color: " + ColorSettings.Color.Secondary + @"; 1955 } 1956 1957 .btn-dw-cart { 1958 border-width: 4px; 1959 padding: 3px 10px; 1960 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1961 } 1962 1963 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1964 background-color: " + ColorSettings.Color.Primary + @"; 1965 border-width: 4px; 1966 padding: 3px 10px; 1967 border-color: " + ColorSettings.Color.Primary + @"; 1968 color: #FFF; 1969 } 1970 1971 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1972 background-color: " + ColorSettings.Color.Primary + @"; 1973 border-width: 2px; 1974 color: #FFF; 1975 border-color: #FFF; 1976 } 1977 1978 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1979 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1980 border-width: 4px; 1981 padding: 3px 10px; 1982 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1983 color: #FFF; 1984 }"; 1985 } 1986 1987 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round") 1988 { 1989 CssString += @" 1990 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1991 background-color: transparent; 1992 } 1993 1994 .btn-dw-primary { 1995 border-width: 4px; 1996 padding: 3px 15px; 1997 color: " + ColorSettings.Color.Primary + @"; 1998 } 1999 2000 .btn-dw-secondary { 2001 border-width: 2px; 2002 padding: 5px 15px; 2003 color: " + ColorSettings.Color.Secondary + @"; 2004 } 2005 2006 .btn-dw-cart { 2007 border-width: 4px; 2008 padding: 3px 15px; 2009 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2010 } 2011 2012 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2013 background-color: " + ColorSettings.Color.Primary + @"; 2014 border-width: 4px; 2015 color: #FFF; 2016 padding: 3px 15px; 2017 border-color: " + ColorSettings.Color.Primary + @"; 2018 } 2019 2020 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2021 background-color: " + ColorSettings.Color.Primary + @"; 2022 border-width: 2px; 2023 color: #FFF; 2024 padding: 5px 15px; 2025 border-color: #FFF; 2026 } 2027 2028 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2029 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2030 border-width: 4px; 2031 color: #FFF; 2032 padding: 3px 15px; 2033 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2034 }"; 2035 } 2036 2037 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp") 2038 { 2039 CssString += @" 2040 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart, .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active, .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active, .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2041 border-radius: 0px !important; 2042 }"; 2043 } 2044 2045 if (GeneralSettings.Navigation.ButtonDesign == "border-round") 2046 { 2047 CssString += @" 2048 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart, .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active, .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active, .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2049 border-radius: 200px !important; 2050 }"; 2051 } 2052 2053 2054 //Headings custom settings 2055 if (GeneralSettings.Headings.Mode == "underline") 2056 { 2057 CssString += @" 2058 .dw-section-title { 2059 border-bottom: 2px solid; 2060 }"; 2061 } 2062 2063 if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line") 2064 { 2065 CssString += @" 2066 .dw-section-title span { 2067 background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2068 display: inline-block; 2069 padding: 8px 16px; 2070 color: #FFF; 2071 }"; 2072 2073 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2074 { 2075 CssString += @" 2076 .dw-section-title { 2077 background-color: " + ColorSettings.Color.Primary + @"; 2078 }"; 2079 } 2080 } 2081 2082 if (GeneralSettings.Headings.Mode == "boxed-line") 2083 { 2084 CssString += @" 2085 .dw-section-title span { 2086 margin-bottom: 2px; 2087 } 2088 2089 .dw-section-title { 2090 border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2091 }"; 2092 2093 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2094 { 2095 CssString += @" 2096 .dw-section-title { 2097 border-bottom: 2px solid " + ColorSettings.Color.Primary + @"; 2098 }"; 2099 } 2100 } 2101 2102 if (GeneralSettings.Headings.Mode == "outline") 2103 { 2104 CssString += @" 2105 .dw-section-title { 2106 color: #FFF; 2107 text-shadow: 2108 -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2109 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2110 -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2111 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2112 }"; 2113 2114 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2115 { 2116 CssString += @" 2117 .dw-section-title { 2118 text-shadow: 2119 -1px -1px 0 #1A1A1A, 2120 1px -1px 0 #1A1A1A, 2121 -1px 1px 0 #1A1A1A, 2122 1px 1px 0 #1A1A1A; 2123 }"; 2124 } 2125 } 2126 2127 return CssString; 2128 } 2129 2130 private string ClearBackground() { 2131 string CssString = ""; 2132 2133 CssString += @" 2134 .dw-navbar-button > a { 2135 background-color: rgba(0, 0, 0, 0.0) !important; 2136 } 2137 2138 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 2139 background-color: rgba(0, 0, 0, 0.0) !important; 2140 }"; 2141 2142 return CssString; 2143 } 2144 2145 private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) { 2146 int LogoHeight = 0; 2147 string CssString = ""; 2148 int Centerpos = 0; 2149 2150 if (GeneralSettings.Header.Mode != "solid"){ 2151 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2152 { 2153 LogoHeight = ImageHeight(); 2154 } 2155 else 2156 { 2157 LogoHeight = GetInteger("Item.Area.LogoFont.Size"); 2158 } 2159 } 2160 else 2161 { 2162 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2163 { 2164 LogoHeight = 18; 2165 } 2166 else 2167 { 2168 LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10; 2169 } 2170 } 2171 2172 if (margin == false) 2173 { 2174 Centerpos = (LogoHeight/2) + 6; 2175 2176 CssString += @" 2177 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2178 padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important; 2179 margin: " + extramargin + @"px " + extramargin + @"px !important; 2180 }"; 2181 } 2182 else 2183 { 2184 Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin); 2185 2186 CssString += @" 2187 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2188 padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important; 2189 margin: " + Centerpos + @"px 4px 0px 4px !important; 2190 }"; 2191 } 2192 2193 return CssString; 2194 } 2195 2196 private int ImageHeight () 2197 { 2198 int LogoHeight = 0; 2199 2200 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo"))) 2201 { 2202 string imageUrl = "https://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo"); 2203 2204 WebRequest request = WebRequest.Create(imageUrl); 2205 WebResponse response = request.GetResponse(); 2206 Image image = Image.FromStream(response.GetResponseStream()); 2207 2208 LogoHeight = image.Height; 2209 } 2210 else 2211 { 2212 LogoHeight = 38; 2213 } 2214 2215 return LogoHeight; 2216 } 2217 } 2218 2219 2220 2221 @{ 2222 InitGeneralSettings(); 2223 } 2224 2225 2226 <!-- Variables --> 2227 @{ 2228 string attrValue = ""; 2229 string loginpageid = ""; 2230 string FirstPg = GetInteger("DwAreaFirstActivePageID").ToString(); 2231 string SearchPID = GetInteger("DwAreaSearchPageID").ToString(); 2232 var cartid = GetInteger("DwAreaCartPageID").ToString(); 2233 string searchplaceholder = Translate("Search in all categories", "Search in all categories"); 2234 string saleid = "180"; 2235 string storelocation = "48"; 2236 2237 string myCurrentAbsoluteUriString = System.Web.HttpContext.Current.Request.Url.AbsoluteUri; 2238 Uri myCurrentAbsoluteUri = new Uri(myCurrentAbsoluteUriString); 2239 string myPlcUrl = myCurrentAbsoluteUri.Scheme + "://" + myCurrentAbsoluteUri.Host; 2240 } 2241 2242 <script> 2243 var websiteUrl = '@myPlcUrl'; 2244 </script> 2245 2246 @functions{ 2247 public static string RemoveWhiteSpaceFromStylesheets(string body) 2248 { 2249 body = Regex.Replace(body, @"[a-zA-Z]+#", "#"); 2250 body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty); 2251 body = Regex.Replace(body, @"\s+", " "); 2252 body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1"); 2253 body = body.Replace(";}", "}"); 2254 body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1"); 2255 // Remove comments from CSS 2256 body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty); 2257 return body; 2258 } 2259 } 2260 2261 <!-- Analytics code --> 2262 @{String googleTrackingId = GetString("Item.Area.Google_Analytics_");} 2263 @if (!string.IsNullOrWhiteSpace(googleTrackingId)) 2264 { 2265 <script type="text/javascript"> 2266 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 2267 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 2268 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 2269 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 2270 2271 ga('create', '@googleTrackingId', 'auto'); 2272 ga('set', 'userId', '@GetGlobalValue("Global:Extranet.UserName")'); // Set the user ID using signed-in user_id. 2273 ga('require','ecommerce','ecommerce.js'); 2274 ga('send', 'pageview'); 2275 </script> 2276 } 2277 <style> 2278 @@media screen and (min-width: 320px) and (max-width: 480px){ 2279 .vip-service { 2280 line-height: 1em !important; 2281 } 2282 } 2283 2284 .user-menu-dropdown { 2285 background-color: white; 2286 margin-left: -20px; 2287 position: absolute; 2288 z-index: 9999; 2289 box-shadow: 2px 2px 2px 2px #888888; 2290 width: 180px; 2291 display: none; 2292 } 2293 .user-menu-dropdown > ul { 2294 list-style: none; 2295 text-align: left; 2296 padding: 0px 10px 0px 10px; 2297 margin: 0px; 2298 } 2299 .user-menu-dropdown > ul > li { 2300 border-top: solid 1px #d4d4d4; 2301 padding: 10px 0px 10px 10px; 2302 } 2303 .user-menu-dropdown > ul > li > a { 2304 vertical-align: -webkit-baseline-middle; 2305 } 2306 .user-menu:hover .user-menu-dropdown, .user-menu-dropdown:hover { 2307 display: block; 2308 } 2309 .user-menu-mobile { 2310 2311 background:#333; 2312 border-bottom: #aaa 1px solid; 2313 height: 40px; 2314 } 2315 .user-menu-mobile > div { 2316 width:100%; 2317 } 2318 .user-menu-mobile > div > div { 2319 width:50%; 2320 float:left; 2321 text-align: -webkit-center; 2322 padding-top: 9px !important; 2323 } 2324 .user-menu-mobile > div > div > a { 2325 color: #ffc000 !important; 2326 font-size: 15px !important; 2327 } 2328 .user-menu-mobile > div > div > img { 2329 width: 20px; 2330 margin-top: -5px; 2331 } 2332 .user-menu-mobile > div > div > span { 2333 float: right; 2334 color: #ffc000; 2335 } 2336 2337 .contentwrapper2_whennoti{ 2338 top : unset; 2339 } 2340 hr{ 2341 margin-top: 0px; 2342 margin-bottom: 10px; 2343 } 2344 2345 @@media screen and (max-width: 2500px) and (min-width: 1000px) and (max-height: 3000px) { 2346 .content-wrapper2{ 2347 top: unset !important; 2348 } 2349 } 2350 2351 2352 @@media screen and (max-width: 2500px) and (min-width: 1000px) and (max-height: 3000px) { 2353 .content-wrapper{ 2354 top: unset !important; 2355 } 2356 } 2357 @@media screen and (max-width: 800px) and (min-width: 700px) and (max-height: 1050px) { 2358 .user-menu{ 2359 /*display:none !important;*/ 2360 padding-top: 10px; 2361 } 2362 } 2363 @@media screen and (max-width: 1050px) and (min-width: 1000px) and (max-height: 800px) { 2364 .user-menu-mobile{ 2365 display:none !important; 2366 } 2367 } 2368 @@media screen and (max-width: 1050px) and (min-width: 1000px) and (max-height: 800px) { 2369 .hideLogin{ 2370 display:block; 2371 } 2372 } 2373 @@media screen and (max-width: 800px) and (min-width: 750px) and (max-height: 1050px) { 2374 .hideLogin{ 2375 display:none; 2376 } 2377 } 2378 2379 /******************************added by AKS to fix menu overlapping on content in Ipad view**********************************/ 2380 @@media (max-width:768px){ 2381 header{ 2382 position: relative !important; 2383 } 2384 } 2385 @@media handheld, only screen and (max-width: 480px){ 2386 .content-wrapper#mainpg{ 2387 margin-top: -125px; 2388 } 2389 .content-wrapper{ 2390 top:0px; 2391 } 2392 .whenNoti { 2393 top: 0px!important; 2394 } 2395 } 2396 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 2397 .mblMenuStyleFixed { 2398 //position: fixed !important; 2399 //z-index: 10000; 2400 //height: 261px !important; 2401 //box-shadow: 0 2px 1px rgba(0,0,0,0.2) !important; 2402 } 2403 } 2404 /*********************************************************************/ 2405 .breadcrumb.style2 ul { 2406 margin: 0px 0px 5px 0px; 2407 } 2408 .zoomContainer { 2409 z-index: 999; 2410 margin-top: 0px !important; 2411 overflow: hidden; 2412 } 2413 2414 .zoomWindow{ 2415 border: #ccc 4px solid; 2416 background:#ccc; 2417 border-style: solid; 2418 width:100%; 2419 overflow:hidden; 2420 } 2421 .modal-open { 2422 position: inherit !important; 2423 padding-right : 0px !important; 2424 overflow-x : auto !important; 2425 overflow-y : auto !important; 2426 } 2427 .M1.dropdown-menu{ 2428 margin-top: 6px !important; 2429 } 2430 2431 a[href^=tel] { 2432 text-decoration:inherit; 2433 color: inherit; 2434 } 2435 2436 .alert-main { 2437 /*position: fixed;*/ 2438 width: 100%; 2439 top: 0; 2440 z-index: 99999; 2441 font-size: 14px; 2442 font-size: 1.4rem; 2443 -webkit-box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2444 -moz-box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2445 box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2446 background-color: #2e2e2e; 2447 color: #909090; 2448 font-weight: 500; 2449 } 2450 2451 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 750px) { 2452 .alert-main { 2453 position: fixed; 2454 width: 100%; 2455 top: 0; 2456 z-index: 99999; 2457 font-size: 14px; 2458 font-size: 1.4rem; 2459 -webkit-box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2460 -moz-box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2461 box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2462 background-color: #2e2e2e; 2463 color: #909090; 2464 font-weight: 500; 2465 height: 95px; 2466 } 2467 } 2468 @@media screen and (max-width: 380px){ 2469 .content-wrapper#mainpg { 2470 margin-top: -175px; 2471 } 2472 } 2473 @@media screen and (max-width: 700px) and (min-width: 650px) and (max-height: 400px) { 2474 .alert-main { 2475 position: fixed; 2476 width: 100%; 2477 top: 0; 2478 z-index: 99999; 2479 font-size: 14px; 2480 font-size: 1.4rem; 2481 -webkit-box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2482 -moz-box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2483 box-shadow: 0 2px 1px rgba(0,0,0,0.2); 2484 background-color: #2e2e2e; 2485 color: #909090; 2486 font-weight: 500; 2487 height: 65px; 2488 } 2489 } 2490 2491 .close-thik{ 2492 content: '✖'; /* UTF-8 symbol */ 2493 } 2494 2495 2496 @@media screen and (max-width: 800px) and (min-width: 765px) and (max-height: 1200px) { 2497 .mblMenuStyleFixed { 2498 //position: fixed !important; 2499 //z-index: 10000; 2500 height: 220px !important; 2501 //box-shadow: 0 2px 1px rgba(0,0,0,0.2) !important; 2502 } 2503 } 2504 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 2505 .whenNoti { 2506 top : 84px !important; 2507 } 2508 } 2509 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 2510 .whenNoti { 2511 top : 64px !important; 2512 } 2513 #searchMobile { 2514 top: 64px; 2515 } 2516 } 2517 @@media screen and (max-width: 800px) and (min-width: 765px) and (max-height: 1200px) { 2518 .whenNoti { 2519 /*top : 65px !important; AKS */ 2520 top : 0px !important; 2521 } 2522 } 2523 2524 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 2525 .whenNotiMainPg { 2526 margin-top : 60px !important; 2527 /*margin-top : 242px !important;*/ 2528 } 2529 } 2530 @@media screen and (max-width: 800px) and (min-width: 765px) and (max-height: 1200px) { 2531 .whenNotiMainPg { 2532 margin-top: 0px !important; 2533 } 2534 } 2535 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 2536 .whenNotiMainPg { 2537 margin-top: 320px !important; 2538 } 2539 } 2540 .whenNoti { 2541 top : 47px; 2542 } 2543 .whenNotiMainPg { 2544 margin-top : 20px; 2545 } 2546 2547 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 2548 .Noti_Remove{ 2549 //margin-top: 135px !important; 2550 } 2551 } 2552 2553 .product-count { 2554 background: none repeat scroll 0 0 #000; 2555 border-radius: 50%; 2556 color: #fff; 2557 display: inline-block; 2558 font-size: 10px; 2559 height: 20px; 2560 padding-top: 2px; 2561 position: absolute; 2562 right: 17px; 2563 text-align: center; 2564 top: 25px; 2565 width: 20px; 2566 } 2567 .product-count span.cart-no { 2568 position: relative; 2569 top: -11px; 2570 } 2571 2572 .borderLine{ 2573 float: right; 2574 font-size: 30px; 2575 color: #d4d4d4; 2576 padding-right: 10px; 2577 } 2578 2579 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 750px) { 2580 .mblProductCount{ 2581 top : 16px !important; 2582 } 2583 } 2584 2585 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 2586 .mblProductCount{ 2587 top : 21px !important; 2588 } 2589 } 2590 2591 2592 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 750px) { 2593 .mblCartNo{ 2594 top : -6px !important; 2595 } 2596 } 2597 2598 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 2599 .mblCartNo{ 2600 top : -11px !important; 2601 } 2602 } 2603 2604 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 2605 .mblCartNo{ 2606 top : -11px !important; 2607 } 2608 } 2609 2610 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 2611 .mblborderLine{ 2612 display :none; 2613 } 2614 } 2615 2616 @@media screen and (max-width: 500px) and (min-width: 400px) and (max-height: 750px) { 2617 .mblborderLine{ 2618 display :none; 2619 } 2620 } 2621 @@media screen and (max-width: 700px) and (min-width: 650px) and (max-height: 400px) { 2622 .mblborderLine{ 2623 display :none; 2624 } 2625 } 2626 2627 @@media screen and (max-width: 700px) and (min-width: 650px) and (max-height: 400px) { 2628 .mblLandScapeReorder{ 2629 float:right !important; 2630 } 2631 } 2632 2633 @@media screen and (max-width: 700px) and (min-width: 650px) and (max-height: 400px) { 2634 .mblLandScapeReorderDiv{ 2635 padding-left : 0px !important; 2636 } 2637 } 2638 2639 #myBtn { 2640 display: none; 2641 position: fixed; 2642 bottom: 55px; 2643 right: 9%; 2644 z-index: 99; 2645 font-size: 18px; 2646 border: none; 2647 outline: none; 2648 color: white; 2649 cursor: pointer; 2650 padding: 15px; 2651 border-radius: 4px; 2652 background-image: url(/Files/Templates/Designs/PLC/assets/images/up_arrow_icon.png); 2653 background-size: 35px; 2654 width: 35px; 2655 height: 35px; 2656 } 2657 2658 @@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 2659 .user-menu-mobile{display:none;} 2660 } 2661 2662 @@media handheld, only screen and (max-width: 768px){ 2663 .content-wrapper{top:10px;position:relative;} 2664 } 2665 2666 2667 /***********************loading screen*************************/ 2668 /* Absolute Center Spinner */ 2669 .loading { 2670 position: fixed; 2671 z-index: 999999; 2672 height: 2em; 2673 width: 2em; 2674 overflow: show; 2675 margin: auto; 2676 top: 0; 2677 left: 0; 2678 bottom: 0; 2679 right: 0; 2680 } 2681 2682 /* Transparent Overlay */ 2683 .loading:before { 2684 content: ''; 2685 display: block; 2686 position: fixed; 2687 top: 0; 2688 left: 0; 2689 width: 100%; 2690 height: 100%; 2691 background-color: rgba(0,0,0,0.3); 2692 } 2693 2694 /*----------------------------------------------------*/ 2695 @if(Pageview.Device.ToString().ToUpper() == "MOBILE") 2696 { 2697 <text>.jetmenu .dropdown{ display:none;}</text> 2698 } 2699 .lds-spinner { 2700 color: official; 2701 display: inline-block; 2702 position: relative; 2703 width: 15px; 2704 height: 15px; 2705 } 2706 .lds-spinner div { 2707 transform-origin: 2px 12px; 2708 animation: lds-spinner 1.2s linear infinite; 2709 } 2710 @if(Pageview.Device.ToString().ToUpper() == "MOBILE") 2711 { 2712 <text>.jetmenu .dropdown{ display:none;}</text> 2713 } 2714 .lds-spinner div:after { 2715 content: " "; 2716 display: block; 2717 position: absolute; 2718 2719 width: 2.5px; 2720 height: 7px; 2721 border-radius: 50%; 2722 background: #fff; 2723 } 2724 .lds-spinner div:nth-child(1) { 2725 transform: rotate(0deg); 2726 animation-delay: -1.1s; 2727 } 2728 .lds-spinner div:nth-child(2) { 2729 transform: rotate(30deg); 2730 animation-delay: -1s; 2731 } 2732 .lds-spinner div:nth-child(3) { 2733 transform: rotate(60deg); 2734 animation-delay: -0.9s; 2735 } 2736 .lds-spinner div:nth-child(4) { 2737 transform: rotate(90deg); 2738 animation-delay: -0.8s; 2739 } 2740 .lds-spinner div:nth-child(5) { 2741 transform: rotate(120deg); 2742 animation-delay: -0.7s; 2743 } 2744 .lds-spinner div:nth-child(6) { 2745 transform: rotate(150deg); 2746 animation-delay: -0.6s; 2747 } 2748 .lds-spinner div:nth-child(7) { 2749 transform: rotate(180deg); 2750 animation-delay: -0.5s; 2751 } 2752 .lds-spinner div:nth-child(8) { 2753 transform: rotate(210deg); 2754 animation-delay: -0.4s; 2755 } 2756 .lds-spinner div:nth-child(9) { 2757 transform: rotate(240deg); 2758 animation-delay: -0.3s; 2759 } 2760 .lds-spinner div:nth-child(10) { 2761 transform: rotate(270deg); 2762 animation-delay: -0.2s; 2763 } 2764 .lds-spinner div:nth-child(11) { 2765 transform: rotate(300deg); 2766 animation-delay: -0.1s; 2767 } 2768 .lds-spinner div:nth-child(12) { 2769 transform: rotate(330deg); 2770 animation-delay: 0s; 2771 } 2772 @@keyframes lds-spinner { 2773 0% { 2774 opacity: 1; 2775 } 2776 100% { 2777 opacity: 0; 2778 } 2779 } 2780 2781 /***********************loading screen end*************************/ 2782 </style> 2783 2784 <script> 2785 2786 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2787 { 2788 2789 var user = Dynamicweb.Security.UserManagement.User.GetCurrentUser(Dynamicweb.Security.UserManagement.PagePermissionLevels.Frontend); 2790 List<Dynamicweb.Security.UserManagement.Common.CustomFields.CustomFieldValue> custom_fields = user.CustomFieldValues; 2791 DateTime expiryDate =(DateTime) custom_fields.Find(x => x.CustomField.Name == "ExpryDate").Value; 2792 2793 if(DateTime.Now > expiryDate) 2794 { 2795 <text> 2796 var isVIPExpire = getCookie("IsVIPExpire"); 2797 if(isVIPExpire != 'IsShown') 2798 { 2799 document.cookie = "IsVIPExpire=true; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 2800 } 2801 </text> 2802 } 2803 else 2804 { 2805 <text> 2806 document.cookie = "IsVIPExpire=false; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 2807 </text> 2808 } 2809 } 2810 </script> 2811 2812 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2813 { 2814 2815 string loggedin = ""; 2816 var vbs = System.Web.HttpContext.Current.Request["loggedin"]; 2817 if (vbs != null) 2818 { 2819 loggedin = vbs.ToString(); 2820 } 2821 else 2822 { 2823 loggedin = "0"; 2824 } 2825 2826 string kemail = GetGlobalValue("Global:Extranet.UserName"); 2827 2828 if (loggedin == "1") 2829 { 2830 <script type="text/javascript"> 2831 2832 $(document).ready(function(){ 2833 window.DY = window.DY || {}; 2834 DY.API("event", { 2835 name: "Login", 2836 properties: { 2837 dyType: "login-v1", 2838 hashedEmail: DYO.dyhash.sha256('@kemail'), 2839 } 2840 }); 2841 if(window.location.href.indexOf("loggedin")>0 && window.location.href.indexOf("shopping")>0){ 2842 window.history.replaceState({}, document.title, "/" + "shopping-cart"); 2843 return; 2844 } 2845 if(window.location.href.indexOf("loggedin")>0){ 2846 window.history.replaceState({}, document.title, "/" + "home"); 2847 return; 2848 } 2849 }); 2850 </script> 2851 } 2852 } 2853 2854 2855 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker.min.css"> 2856 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker3.min.css"> 2857 <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.min.js"></script> 2858 @*<script type="text/javascript" src="//script.crazyegg.com/pages/scripts/0074/5989.js" async="async"></script>*@ 2859 2860 <!-- Start Alexa Certify Javascript --> 2861 2862 <script type="text/javascript"> 2863 _atrk_opts = { atrk_acct:"/z1pl1awEti2fn", domain:"@System.Web.HttpContext.Current.Request.Url.Host",dynamic: true}; 2864 (function() { var as = document.createElement('script'); as.type = 'text/javascript'; as.async = true; as.src = "https://certify-js.alexametrics.com/atrk.js"; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(as, s); })(); 2865 </script> 2866 <noscript><img src="https://certify.alexametrics.com/atrk.gif?account=/z1pl1awEti2fn" style="display:none" height="1" width="1" alt=""></noscript> 2867 <!-- End Alexa Certify Javascript --> 2868 2869 <!-- Google Tag Manager --> 2870 <script> 2871 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 2872 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 2873 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-WL9DZ49P'); 2874 </script> 2875 <!-- End Google Tag Manager --> 2876 2877 <link rel="preconnect" href="//cdn.dynamicyield.com"> 2878 <link rel="preconnect" href="//st.dynamicyield.com"> 2879 <link rel="preconnect" href="//rcom.dynamicyield.com"> 2880 <link rel="dns-prefetch" href="//cdn.dynamicyield.com"> 2881 <link rel="dns-prefetch" href="//st.dynamicyield.com"> 2882 <link rel="dns-prefetch" href="//rcom.dynamicyield.com"> 2883 <script type="text/javascript" src="//cdn.dynamicyield.com/api/8775945/api_dynamic.js"></script> 2884 <script type="text/javascript" src="//cdn.dynamicyield.com/api/8775945/api_static.js"></script> 2885 2886 <script> 2887 var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@1.3.1"; 2888 !function (e, a, t, n, s, i, c) { 2889 e.AlgoliaAnalyticsObject = s, e[s] = e[s] || function () { 2890 (e[s].queue = e[s].queue || []).push(arguments) 2891 }, i = a.createElement(t), c = a.getElementsByTagName(t)[0], 2892 i.async = 1, i.src = n, c.parentNode.insertBefore(i, c) 2893 }(window, document, "script", ALGOLIA_INSIGHTS_SRC, "AlgoliaInitializeLibrary"); 2894 // Initialize library 2895 2896 //AlgoliaInitializeLibrary('init', { appId: 'X0YY16BYKU', apiKey: '78192b0fabf9fecc59556f70106d3ac6' }); //SG-UAT 2897 AlgoliaInitializeLibrary('init', { appId: '44YPI21LC5', apiKey: '92453214b894c3dc2e5607e437a678f7' }); //MY-UAT 2898 </script> 2899 2900 <!--Meta Pixel Code--> 2901 <script> 2902 !function (f, b, e, v, n, t, s) { 2903 if (f.fbq) 2904 return; 2905 n = f.fbq = function () { 2906 n.callMethod ? 2907 n.callMethod.apply(n, arguments) : n.queue.push(arguments) 2908 }; 2909 if (!f._fbq) 2910 f._fbq = n; 2911 n.push = n; 2912 n.loaded = !0; 2913 n.version = '2.0'; 2914 n.queue = []; 2915 t = b.createElement(e); 2916 t.async = !0; 2917 t.src = v; 2918 s = b.getElementsByTagName(e)[0]; 2919 s.parentNode.insertBefore(t, s) 2920 } 2921 (window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); 2922 fbq('init', '909685934272717'); 2923 fbq('track', 'PageView'); 2924 </script> 2925 <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=909685934272717&ev=PageView&noscript=1"></noscript> 2926 <!--End Meta Pixel Code--> 2927 @GetValue("Stylesheets") 2928 @GetValue("Javascripts") 2929 </head> 2930 2931 <script> 2932 $(window).bind('scroll', function () { 2933 if ($(window).scrollTop() > 500) { 2934 $('header').addClass('nav-down'); 2935 } 2936 else{ 2937 $('header').removeClass('nav-down'); 2938 } 2939 }); 2940 2941 // Hide Header on on scroll down 2942 var didScroll; 2943 var lastScrollTop = 0; 2944 var delta = 5; 2945 var navbarHeight = $('header').outerHeight(); 2946 2947 $(window).scroll(function(event){ 2948 didScroll = true; 2949 }); 2950 2951 setInterval(function() { 2952 if (didScroll) { 2953 hasScrolled(); 2954 didScroll = false; 2955 } 2956 }, 500); 2957 2958 function hasScrolled() { 2959 var st = $(this).scrollTop(); 2960 2961 // Make sure they scroll more than delta 2962 if(Math.abs(lastScrollTop - st) <= delta) 2963 return; 2964 2965 // If they scrolled down and are past the navbar, add class .nav-up. 2966 // This is necessary so you never see what is "behind" the navbar. 2967 if (st > lastScrollTop && st > navbarHeight){ 2968 // Scroll Down 2969 $('header').removeClass('nav-down').addClass('nav-up'); 2970 } else { 2971 // Scroll Up 2972 if(st + $(window).height() < $(document).height()) { 2973 $('header').removeClass('nav-up'); 2974 } 2975 } 2976 2977 lastScrollTop = st; 2978 } 2979 </script> 2980 <script> 2981 function myFunction() { 2982 var x = document.getElementById("DrodownRspMenu"); 2983 if (x.style.display === "none") { 2984 x.style.display = "block"; 2985 } else { 2986 x.style.display = "none"; 2987 } 2988 } 2989 </script> 2990 <body> 2991 <style> 2992 #SearchLoading{ 2993 display:none; 2994 } 2995 .searchBackground{ 2996 background-color: unset !important; 2997 border: unset !important; 2998 } 2999 3000 .freezeBackground{ 3001 z-index: 1000; 3002 border: none; 3003 margin: 0px; 3004 padding: 0px; 3005 width: 100%; 3006 height: 100%; 3007 top: 0px; 3008 left: 0px; 3009 background-color: rgb(0, 0, 0); 3010 opacity: 0.6; 3011 cursor: wait; 3012 position: fixed; 3013 pointer-events: none; 3014 } 3015 3016 .loadingImg { 3017 position: absolute; 3018 top: 60%; 3019 z-index: 9999; 3020 left: 50%; 3021 } 3022 </style> 3023 3024 3025 <div id="loader" style="display:none" class="loading"> 3026 <div class="lds-spinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div> 3027 </div> 3028 3029 <!-- Google Tag Manager (noscript) --> 3030 <noscript> 3031 <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WL9DZ49P" height="0" width="0" style="display:none;visibility:hidden"></iframe> 3032 </noscript> 3033 <!-- End Google Tag Manager (noscript) --> 3034 3035 <div id="hidDiv"></div> 3036 <div class="pop-upnoti-mo-search"> 3037 <div class="alert-main" id="alertmain" style="display:none;"> 3038 <div class="container"> 3039 <div class="pro-contentbox"> 3040 <div class="pro-content"> 3041 <p> 3042 <i class="dot yellow"></i> 3043 <p style="text-align:center;color:white;"> 3044 @if(GetBoolean("Item.Area.Day_Notification_Bar_On_Off")) 3045 { 3046 if(checkDay == GetString("Item.Area.Day_Notification_Day") && serverTime > friStartTime && serverTime < friEndTime) 3047 { 3048 @fridayMaintenanceNoti 3049 }else{ 3050 if(GetBoolean("Item.Area.System_Notification_Bar_On_Off")) 3051 { 3052 if(serverTime > startTime && serverTime < endTime) 3053 { 3054 @sysMaintenanceNoti 3055 }else{ 3056 if(GetBoolean("Item.Area.Maintenance_Time_Notification_Bar_On_Off")) 3057 { 3058 if(GetString("Item.Area.Maintenance_Time_Notification_Day") != "DAILY") 3059 { 3060 if(checkDay == GetString("Item.Area.Maintenance_Time_Notification_Day") && serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3061 { 3062 @maintenanceTimeNoti 3063 }else{ 3064 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3065 { 3066 @GetString("Item.Area.Notification_Text") 3067 } 3068 } 3069 }else{ 3070 if(serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3071 { 3072 @maintenanceTimeNoti 3073 }else{ 3074 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3075 { 3076 @GetString("Item.Area.Notification_Text") 3077 } 3078 } 3079 } 3080 }else{ 3081 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3082 { 3083 @GetString("Item.Area.Notification_Text") 3084 } 3085 } 3086 } 3087 }else{ 3088 if(GetBoolean("Item.Area.Maintenance_Time_Notification_Bar_On_Off")) 3089 { 3090 if(GetString("Item.Area.Maintenance_Time_Notification_Day") != "DAILY") 3091 { 3092 if(checkDay == GetString("Item.Area.Maintenance_Time_Notification_Day") && serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3093 { 3094 @maintenanceTimeNoti 3095 }else{ 3096 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3097 { 3098 @GetString("Item.Area.Notification_Text") 3099 } 3100 } 3101 }else{ 3102 if(serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3103 { 3104 @maintenanceTimeNoti 3105 }else{ 3106 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3107 { 3108 @GetString("Item.Area.Notification_Text") 3109 } 3110 } 3111 } 3112 }else{ 3113 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3114 { 3115 @GetString("Item.Area.Notification_Text") 3116 } 3117 } 3118 } 3119 } 3120 }else{ 3121 if(GetBoolean("Item.Area.System_Notification_Bar_On_Off")) 3122 { 3123 if(serverTime > startTime && serverTime < endTime) 3124 { 3125 @sysMaintenanceNoti 3126 }else{ 3127 if(GetBoolean("Item.Area.Maintenance_Time_Notification_Bar_On_Off")) 3128 { 3129 if(GetString("Item.Area.Maintenance_Time_Notification_Day") != "DAILY") 3130 { 3131 if(checkDay == GetString("Item.Area.Maintenance_Time_Notification_Day") && serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3132 { 3133 @maintenanceTimeNoti 3134 }else{ 3135 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3136 { 3137 @GetString("Item.Area.Notification_Text") 3138 } 3139 } 3140 }else{ 3141 if(serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3142 { 3143 @maintenanceTimeNoti 3144 }else{ 3145 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3146 { 3147 @GetString("Item.Area.Notification_Text") 3148 } 3149 } 3150 } 3151 }else{ 3152 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3153 { 3154 @GetString("Item.Area.Notification_Text") 3155 } 3156 } 3157 } 3158 }else{ 3159 if(GetBoolean("Item.Area.Maintenance_Time_Notification_Bar_On_Off")) 3160 { 3161 if(GetString("Item.Area.Maintenance_Time_Notification_Day") != "DAILY") 3162 { 3163 if(checkDay == GetString("Item.Area.Maintenance_Time_Notification_Day") && serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3164 { 3165 @maintenanceTimeNoti 3166 }else{ 3167 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3168 { 3169 @GetString("Item.Area.Notification_Text") 3170 } 3171 } 3172 }else{ 3173 if(serverTime > maintenanceTimeNotiStartTime && serverTime < maintenanceTimeNotiEndTime) 3174 { 3175 @maintenanceTimeNoti 3176 }else{ 3177 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3178 { 3179 @GetString("Item.Area.Notification_Text") 3180 } 3181 } 3182 } 3183 }else{ 3184 if(GetBoolean("Item.Area.Notification_Bar_On_Off")) 3185 { 3186 @GetString("Item.Area.Notification_Text") 3187 } 3188 } 3189 } 3190 } 3191 <a href="javascript:void(0);divClose()" class="close" aria-label="Close" style="width: 10px;top: 0px;height: 10px;opacity: 1;"> 3192 <span aria-hidden="true" style="color:#F8F9F9;">&times;</span> 3193 </a> 3194 </p> 3195 </p> 3196 </div> 3197 </div> 3198 </div> 3199 </div> 3200 3201 <div class="prevent-overlay"></div> 3202 @if(Pageview.Device.ToString().ToUpper() == "MOBILE") 3203 { 3204 <div class="modal fade" id="searchMobile" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 3205 <div class="modal-dialog" style="top: 0px;padding: unset;margin: unset;"> 3206 <div class="modal-content" style=" background-color: #000 !important; border-radius: unset; width: 102%; left: -1px;"> 3207 <div class="modal-body" style="padding: 10px 25px 0px !important;"> 3208 <form method="get" id="searchForm" onsubmit="return tolower('#searchForm');" action="/Default.aspx"> 3209 <input type="hidden" name="ID" value="159"> 3210 <table style="width: 100%;"> 3211 <tr> 3212 <td style="width: 70%; position: relative; width: 240px;"> 3213 <input type="search" class="form-control" id="search" name="searchsuggest" tabindex="1" placeholder="@searchplaceholder" style="width: 100%;border:none: background:#fff; display:block; width: 100%; box-sizing: border-box" autocomplete="off"> 3214 <img src="/Files/Images/plc/images/Search_Remove_Icon.svg" onclick="return clearSearchText();" style=" position: absolute; top: 7px; right: 2px; width:21px; background-color: white;"> 3215 <ul class="searchSuggestUl" id="searchSuggest"></ul> 3216 </td> 3217 <td style="width: 20%;"> 3218 <input type="button" style=" border: unset; background-color: #000; color: #fff; padding-left: 20px;" onclick="removeSearchDiv()" alt="submit" name="submit" value="Cancel"> 3219 </td> 3220 </tr> 3221 </table> 3222 <button type="submit" id="submitSearch" class="my-search-icon hidden"> 3223 <i class="fa fa-search"></i> 3224 </button> 3225 </form> 3226 </div> 3227 </div> 3228 </div> 3229 </div> 3230 } 3231 </div> 3232 <div id="menusoverlay"></div> 3233 <div id="fb-root"></div> 3234 <script> 3235 function hideErrorMessage(){ 3236 $(".errorMsg").css("display", "none"); 3237 $(".cus-reg-para2").css("padding-bottom", "none"); 3238 $(".cus-modal").css("background-color", "white"); 3239 if($(window).width() > 1200){ 3240 $(".cus-reg-btn").css("margin-top","25px"); 3241 $(".cus-modal").css("height", "390px"); 3242 } 3243 if(screen.width > 800 && screen.width < 850 && screen.height > 1000 && screen.height < 1200){ 3244 $(".cus-reg-btn").css("margin-top","25px"); 3245 $(".cus-modal").css("height", "400px"); 3246 } 3247 if(screen.width > 450 && screen.width < 800 && screen.height > 1000 && screen.height < 1200){ 3248 $(".cus-reg-btn").css("margin-top","25px"); 3249 $(".cus-modal").css("height", "420px"); 3250 } 3251 } 3252 </script> 3253 <!-- MODALS --> 3254 <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 3255 <div class="modal-dialog"> 3256 <div class="modal-content cus-modal" style="background-color:white;"> 3257 <div> 3258 <button type="button" class="close cus-close" data-dismiss="modal" aria-hidden="true" onclick="hideErrorMessage()"><img class="cus-close-img" src="/Files/Templates/Designs/PLC/assets/images/cancel-img.png"></button> 3259 </div> 3260 <div class="modal-body cus-mod-body"> 3261 <div style="width:100%"><div class="cus-login"> 3262 <p class="login-para1" id="myModalLabel">@Translate("I have an online account", "I have an online account")</p> 3263 <p class="login-para2">@Translate("to place orders online","to place orders online")</p> 3264 @if(System.Web.HttpContext.Current.Request["loggin"] != null) 3265 { 3266 <text> 3267 <script> 3268 $(document).ready(function(){ 3269 $('#loginPopup').click(); 3270 }) 3271 </script> 3272 </text> 3273 } 3274 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) 3275 { 3276 var extranetError = GetString("DW_extranet_error_uk").Replace("username","email address"); 3277 var username = System.Web.HttpContext.Current.Request["UserName"]; 3278 if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk")) && GetString("DwPageID") != cartid) 3279 { 3280 <text> 3281 <script> 3282 3283 $(document).ready(function(){ 3284 $('#loginPopup').click(); 3285 }) 3286 </script> 3287 </text> 3288 } 3289 <style> 3290 .errorMsg { 3291 background-color: #ff9898; 3292 border: solid 1px #f21a1a; 3293 border-style: ridge; 3294 border-radius: 4px; 3295 margin-top: 5px; 3296 } 3297 </style> 3298 <script> 3299 $(document).ready(function(){ 3300 if(screen.width < 400 && screen.height < 580){ 3301 $(".cus-modal").css("height", "137%"); 3302 } 3303 3304 if(screen.width < 500 && screen.width > 850 && screen.height < 900){ 3305 $(".cus-modal").css("height", "110%"); 3306 } 3307 if(screen.width > 350 && screen.width < 400 && screen.height > 580 && screen.height < 800){ 3308 $(".cus-modal").css("height", "110%"); 3309 } 3310 }); 3311 </script> 3312 3313 <div class="form-group errorMsg @username"> 3314 @if(!string.IsNullOrEmpty(username)) 3315 { 3316 Dynamicweb.Security.UserManagement.User user = Dynamicweb.Security.UserManagement.User.GetUserByUserName(username); 3317 if(user != null && !user.Active){ 3318 <style> 3319 @@media only screen and (min-width:992px){ 3320 .cus-modal { 3321 height: 455px; 3322 } 3323 .cus-reg-btn { 3324 margin-top: 101px; 3325 } 3326 } 3327 @@media only screen and (device-width: 834px) and (device-height: 1194px){ 3328 .cus-modal { 3329 height: 500px; 3330 } 3331 .cus-reg-btn { 3332 margin-top: 118px; 3333 } 3334 } 3335 @@media only screen and (device-width: 712px) and (device-height: 1138px){ 3336 .cus-modal { 3337 height: 510px; 3338 } 3339 .cus-reg-btn { 3340 margin-top: 118px; 3341 } 3342 .errorMsg{ 3343 width: 93% !important; 3344 } 3345 } 3346 </style> 3347 <form method="post" class="" id="ResendActivateEmail" style="margin-bottom:0px; margin-top: 5px;" action='/Default.aspx?id=@GetPageIdByNavigationTag("ResendActivationLink")'> 3348 <input type="hidden" id="validateEmail" name="validateEmail" value="@username"> 3349 <div style="font-size:12px; margin-top: 5px;"> 3350 <span style="padding:10px;">Your online account is not activated yet.</span><br> 3351 <span style="display: inline-block; padding:0px 10px;">Please activate your online account via the activation link sent to your email.</span><br> 3352 <a href=""><input id="ResendActivateEmailSubmit" style="padding: 5px 10px; background: unset; width: auto;text-decoration: underline; color: #000;" type="submit" value="Resend activation link"></a> 3353 </div> 3354 </form> 3355 }else { 3356 <style> 3357 @@media only screen and (min-width:992px){ 3358 .cus-modal { 3359 height: 405px; 3360 } 3361 .cus-reg-btn { 3362 margin-top: 52px; 3363 } 3364 } 3365 @@media only screen and (device-width: 834px) and (device-height: 1194px){ 3366 .cus-modal { 3367 height: 430px; 3368 } 3369 .cus-reg-btn { 3370 margin-top: 53px; 3371 } 3372 } 3373 @@media only screen and (device-width: 712px) and (device-height: 1138px){ 3374 .cus-modal { 3375 height: 450px; 3376 } 3377 .cus-reg-btn { 3378 margin-top: 52px; 3379 } 3380 .errorMsg{ 3381 width: 95% !important; 3382 } 3383 } 3384 </style> 3385 <span style="padding:10px;">@extranetError</span> 3386 } 3387 } 3388 3389 </div> 3390 } 3391 <form class="form-horizontal cus-form-padd" role="form" id="loginform" method="post" action="/home"> 3392 <!--<input type="hidden" name="ID" value="@Pageview.ID" />--> 3393 <input type="hidden" name="ID" value="@FirstPg"> 3394 <input type="hidden" name="DWExtranetUsernameRemember" value="True"> 3395 <input type="hidden" name="DWExtranetPasswordRemember" value="True"> 3396 @if (string.IsNullOrWhiteSpace(GetString("UserManagement:User.Login.SuccessRedirectToPage"))) { 3397 <input type="hidden" name="Redirect" value="/Default.aspx?ID=@Pageview.ID&loggedin=1"> 3398 } 3399 <div class="cus-form form-group"> 3400 @{ attrValue = Translate("Enter email address", "Enter email address"); 3401 var username2 = @GetValue("DWExtranetUsername"); 3402 } 3403 <label for="username" class="cus-email-label col-sm-3">@Translate("Email address", "Email address")</label> 3404 <div class="form-text-width cus-padding col-sm-7"><input type="email" id="LoginEmail" class="cus-form2 form-control" name="username" id="username" onkeypress="prevent(event)" value="@username2" required=""></div> 3405 </div> 3406 <div class="cus-form1 form-group"> 3407 @{ attrValue = Translate("Enter password", "Enter password"); 3408 } 3409 <label for="password" class="cus-password col-sm-3">@Translate("Password", "Password")</label> 3410 <div class="form-text-width cus-pass-text col-sm-7"><input type="password" id="LoginPassword" class="cus-form2 form-control" name="password" id="password" onkeypress="prevent(event)" required=""></div> 3411 &nbsp; 3412 <a class="cus-forget-pass pull-left" href="/Default.aspx?ID=73&LoginAction=Recovery&firsttime=true">@Translate("Forgot password?", "Forgot password?")</a> 3413 &nbsp; 3414 </div> 3415 <div class="cus-footer modal-footer"> 3416 <div class="checkbox cus-keepsign" style="padding:10 0 20 0;"> 3417 <label> 3418 <!--<input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me")</input>--> 3419 <input type="checkbox" name="Autologin" checked="checked" value="True" class="cus-checkbox"> <div class="checkbox-text">@Translate("Keep me logged in", "Keep me logged in")</div> 3420 </label> 3421 </div> 3422 <!--<button type="submit" class="btn btn-xs btn-base pull-right"></button>--> 3423 <input class="cus-login-btn" name="btnSubmit" type="submit" value='@Translate("Log In", "Log In")' id="btnSubmit"> 3424 </div> 3425 3426 @if (GetLoop("DWExtranetExternalLoginProviders").Count != 0) 3427 { 3428 <div class=".cus-footer modal-footer"> 3429 <div class="row"> 3430 <div class="col-md-12"> 3431 <div class="pull-left">@Translate("Or sign in using", "Or sign in using"):</div> 3432 <p> 3433 </div> 3434 </div> 3435 <div class="row"> 3436 <div class="col-md-12"> 3437 @foreach (LoopItem LoginProvider in GetLoop("DWExtranetExternalLoginProviders")) 3438 { 3439 var ProviderName = LoginProvider.GetString("ProviderName").ToLower(); 3440 var ProviderID = LoginProvider.GetValue("ProviderID"); 3441 <a href='/Admin/Public/Social/ExternalLogin.aspx?action=login&amp;providerID=@ProviderID' class="btn btn-xs btn-base pull-left"><i class="fa fa-@ProviderName"></i>@LoginProvider.GetString("ProviderName")</a><text></text> 3442 } 3443 </div> 3444 </div> 3445 </div> 3446 } 3447 3448 <div class="cus-show"><h2 class="cus-line"><span class="cus-text">or</span></h2></div> 3449 </form></div> 3450 <div class="part2"> 3451 <div class="ver-line"><hr width="1" size="500" class="cus-hr"></div> 3452 <div class="or">or</div> 3453 <div class="ver-line"><hr width="1" size="500" class="cus-hr"></div> 3454 </div> 3455 <div class="cus-reg"> 3456 <p class="cus-reg-para1">@Translate("I have a VIP membership but no online account","I have a VIP membership but no online account")</p> 3457 <p class="cus-reg-para2">@Translate("Register for an online account and link your VIP membership","Register for an online account and link your VIP membership")</p> 3458 <a href="/register"><button class="cus-reg-btn">@Translate("Register","Register")</button></a> 3459 </div> 3460 </div></div> 3461 3462 </div> 3463 </div> 3464 </div> 3465 <header class="grid-full mblMenuStyleFixed" id="noprint"> 3466 <div class="top-bar" id="noprint"> 3467 <div class="grid" id="noprint"> 3468 @if(Pageview.Device.ToString().ToUpper() == "MOBILE" || (Pageview.Device.ToString().ToUpper() == "TABLET" && Pageview.Platform.ToString().ToUpper() == "ANDROID")) 3469 { 3470 <div class="col-1-2 tab-1-1 nopadding ipad-tab-1"> 3471 <div class="welcome-text alignment-welcome-text-topbar">Asia’s <i>preferred</i> Pet Store!</div> 3472 <div class="customercare-text align-customer-service-toolbar"> 3473 <a href="https://customercare.petloverscentre.com.my/hc/en-us" class="bold">Customer Care 3474 </a></div> 3475 <div class="call-text alignment-call-text-topbar mbl-flex"> 3476 <img style="width:15px;height:15px;" src="@sitepath/assets/images/icons8-phone-26.png" alt="icon" title="chat or call us at"><span class="bold">1800-88-7387 <br>for Phone Order</span></div> 3477 3478 </div> 3479 } 3480 else{ 3481 <div class="col-1-2 tab-1-1 nopadding ipad-tab-1"> 3482 3483 <div class="welcome-text">Asia’s <i>preferred</i> Pet Store!</div> 3484 <div class="call-text"><img style="width:15px;height:15px;" src="@sitepath/assets/images/icons8-phone-26.png" alt="icon" title="chat or call us at"><span class="bold">1800-88-7387 for Phone Order</span></div> 3485 <div class="customercare-text align-customer-service-toolbar"> 3486 <a href="https://customercare.petloverscentre.com.my/hc/en-us" class="bold">Customer Care 3487 </a></div> 3488 </div> 3489 } 3490 3491 3492 3493 <div class="col-1-2 tab-1-1 nopadding ipad-tab-2" id="noprint"> 3494 <div class="country-box" id="noprint"> 3495 <div id="countryDropdown" class="wrapper-dropdown-3 dd1 alignment-countryDropdown-topbar" tabindex="1"> 3496 @countrySelection 3497 @*---- BEGAN Country Selection Hard Code ----*@ 3498 @*<span style="background:url(https://uat.petloverscentre.com/Files/Templates/Designs/PLC//assets/images/flag_sg.gif) no-repeat;">Singapore</span>*@ 3499 <ul class="dropdown"> 3500 <li onclick="window.location.href=$(this).find(&quot;a&quot;).attr(&quot;href&quot;);"><a href="http://www.petloverscentre.com.my"><img src="https://uat.petloverscentre.com/Files/Templates/Designs/PLC//assets/images/flag_my.gif" alt="flag image" title="Malaysia"> Malaysia</a></li> 3501 <li onclick="window.location.href=$(this).find(&quot;a&quot;).attr(&quot;href&quot;);"><a href="https://www.petloverscentre.com"><img src="https://uat.petloverscentre.com/Files/Templates/Designs/PLC//assets/images/flag_sg.gif" alt="flag image" title="Singapore"> Singapore</a></li> 3502 <li onclick="window.location.href=$(this).find(&quot;a&quot;).attr(&quot;href&quot;);"><a href="http://www.petloverscentre.co.th"><img src="https://uat.petloverscentre.com/Files/Templates/Designs/PLC//assets/images/flag_th.gif" alt="flag image" title="Thailand"> Thailand</a></li> 3503 <li onclick="window.location.href=$(this).find(&quot;a&quot;).attr(&quot;href&quot;);"><a href="https://vietnam.petloverscentre.com"><img src="https://uat.petloverscentre.com/Files/Templates/Designs/PLC//assets/images/flag_vn.gif" alt="flag image" title="Vietnam"> Vietnam</a></li> 3504 @*<li onclick="window.location.href=$(this).find(&quot;a&quot;).attr(&quot;href&quot;);"><a href="https://brunei.petloverscentre.com"><img src="https://uat.petloverscentre.com/Files/Templates/Designs/PLC//assets/images/flag_bn.gif" alt="flag image" title="Brunei"> Brunei</a></li>*@ 3505 <li onclick="window.location.href=$(this).find(&quot;a&quot;).attr(&quot;href&quot;);"><a href="https://petloverscentre.gocart.ph"><img src="https://uat.petloverscentre.com/Files/Templates/Designs/PLC//assets/images/flag_ph.gif" alt="flag image" title="Philippines"> Philippines</a></li> 3506 </ul> 3507 @*---- END Country Selection Hard Code ----*@ 3508 @*<span style="background:url(@sitepath/assets/images/flag_sg.gif) no-repeat;">Malaysia</span> 3509 <ul class="dropdown"> 3510 <li><a href="#"><img src="@sitepath/assets/images/flag_my.gif" alt="flag image" title="Malaysia"> Malaysia</a></li> 3511 <!--<li><a href="#"><img src="@sitepath/assets/images/flag_sg.gif" alt="flag image" title="Singapore"> Singapore</a></li>--> 3512 </ul>*@ 3513 </div> 3514 </div> 3515 @if(Pageview.Device.ToString().ToUpper() == "MOBILE" || Pageview.Device.ToString().ToUpper() == "TABLET" ||(Pageview.Device.ToString().ToUpper() == "TABLET" && Pageview.Platform.ToString().ToUpper() == "ANDROID")) 3516 { 3517 <div class="store-link alignment-store-link-topbar" id="noprint"> 3518 <a href="Default.aspx?ID=@storelocation"> 3519 <span class="bold">Stores </span> 3520 </a> 3521 </div> 3522 3523 } 3524 <div class="dropdown-box vip-box @Pageview.Device.ToString()" id="noprint"> 3525 <div class="wrapper-dropdown-3 dd2 alignment-vipmembership-topbar" tabindex="1"> 3526 <span class="bold">VIP Membership</span> 3527 <ul class="dropdown"> 3528 @GetValue("DwNavigation(vipcard)") 3529 </ul> 3530 </div> 3531 </div> 3532 @if(Pageview.Device.ToString().ToUpper() == "DESKTOP" || (Pageview.Device.ToString().ToUpper() == "DESKTOP" && Pageview.Platform.ToString().ToUpper() == "IOS")) 3533 { 3534 3535 <div class="store-link alignment-store-link-topbar" id="noprint"> 3536 <a href="Default.aspx?ID=@storelocation"> 3537 <span class="bold">Stores </span> 3538 </a> 3539 </div> 3540 } 3541 </div> 3542 3543 </div> 3544 </div> 3545 3546 <div class="grid" id="noprint"> 3547 <div class="top-info" id="noprint"> 3548 3549 3550 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Logo"))) 3551 { 3552 string logo=GetString("Item.Area.Logo"); 3553 string areaName = GetString("DwAreaName"); 3554 3555 <a href="@globalurl"> 3556 <div class="logo"> 3557 3558 <img src="@logo" alt="Logo" title="@areaName"> 3559 3560 </div> 3561 </a> 3562 } 3563 3564 3565 <div class="top-info-right" id="noprint"> 3566 <div class="top-info-content"> 3567 @if(!GetBoolean("Item.Area.Enable")){ 3568 <div class="top-cart-info" id="noprint"> 3569 <span class="borderLine">|<span> 3570 <img src="@sitepath/assets/images/shopping-cart.png"> 3571 <a class="dw-minicart" id="minipagecart-button"> 3572 <i class="fa fa-shopping-cart"></i> 3573 <span class="product-count mblProductCount"><span class="cart-no mblCartNo"> @productQty </span> 3574 <!--My Cart : @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span class="amount">@GetValue("Ecom:Order.OrderLines.Total.PriceWithVAT")</span>--> 3575 </span></a> 3576 </span></span></div> 3577 if(Pageview.Device.ToString().ToUpper() == "MOBILE"){ 3578 <div class="mblLandScapeReorderDiv"> 3579 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))){ 3580 <a href="javascript:void(0)" data-toggle="modal" data-target="#login"><img src="@sitepath/assets/images/Non_Login_Reorder.png" style="width: 65px;float:right;" class="mblLandScapeReorder"></a> 3581 }else{ 3582 <a href="/orders"><img src="@sitepath/assets/images/Reorder.png" style="width: 65px;float:right;" class="mblLandScapeReorder"></a> 3583 } 3584 <span class="borderLine mblborderLine">|<span> 3585 </span></span></div> 3586 }else if(Pageview.Device.ToString().ToUpper() == "TABLET"){ 3587 <div> 3588 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))){ 3589 <a href="javascript:void(0)" data-toggle="modal" data-target="#login"><img src="@sitepath/assets/images/Non_Login_Reorder.png" style="width: 70px;float:right;"></a> 3590 }else{ 3591 <a href="/orders"><img src="@sitepath/assets/images/Reorder.png" style="width: 70px;float:right;"></a> 3592 } 3593 <span class="borderLine" style="padding-top: 3.5px;">|<span> 3594 </span></span></div> 3595 }else{ 3596 <div> 3597 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))){ 3598 <a href="javascript:void(0)" data-toggle="modal" data-target="#login"><img src="@sitepath/assets/images/Non_Login_Reorder.png" style="width: 70px;float:right;"></a> 3599 }else{ 3600 <a href="/orders"><img src="@sitepath/assets/images/Reorder.png" style="width: 70px;float:right;"></a> 3601 } 3602 <span class="borderLine" style="padding-top: 3.5px;">|<span> 3603 </span></span></div> 3604 } 3605 3606 if(Pageview.Device.ToString().ToUpper() == "MOBILE"){ 3607 <!-- Remove Free Delivery Logo --> 3608 @*<span class="borderLine" style="padding-top: 3.5px;">|</span> 3609 <div> 3610 <img src="@sitepath/assets/images/Free_Delivery.png" style="width: 50px; padding-top: 9px; padding-right: 9px; float:right;" class=""> 3611 <!--<span style="font-weight: bold; font-size: 12px; float:right;">Above $80</span>--> 3612 </div>*@ 3613 } 3614 <div class="cart-info-box" style="display:none;"> 3615 <ul class="sub-menu" style="list-style:none;"> 3616 <li id="smallscreen-minicart"> 3617 @MiniCart() 3618 </li> 3619 </ul> 3620 </div> 3621 3622 <div class="top-sign hideLogin" id="noprint" style="width:auto;"> 3623 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3624 { 3625 if(Pageview.Device.ToString().ToUpper() != "MOBILE") 3626 { 3627 <div class="ShowHideLogIn"> 3628 <a href="#" id="loginPopup" data-toggle="modal" data-target="#login">Log In</a> 3629 <text>|</text> 3630 <br class="showhide-br"> 3631 <a href="Default.aspx?ID=142">Register</a> 3632 </div> 3633 } 3634 else 3635 { 3636 <br class="showhide-br" style="display:block;"> 3637 <br class="showhide-br" style="display:block;"> 3638 } 3639 } 3640 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))){ 3641 @*<a href="Default.aspx?ID=70"><strong>Hi @GetGlobalValue("Global:Extranet.Name")</strong></a> 3642 <br class="showhide-br"> 3643 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=3' class="btnLogout">@Translate("Logout", "Logout")</a>*@ 3644 3645 <div class="user-menu"> 3646 3647 @if(Pageview.Device.ToString().ToUpper() != "MOBILE") { 3648 <a href="Default.aspx?ID=70"><strong>Hi @GetGlobalValue("Global:Extranet.FirstName")</strong></a> 3649 <div class="user-menu-dropdown"> 3650 <ul> 3651 <li style="border: none;"><a href='/view-profile'>@Translate("View Profile", "View Profile")</a></li> 3652 <li><a href='/edit-user-profile'>@Translate("Edit User Profile", "Edit User Profile")</a></li> 3653 <li><a href='/orders'>@Translate("Orders", "Orders")</a></li> 3654 <li><a href='javascript:void(0);SiteLogout()'>@Translate("Logout", "Logout")</a></li> 3655 </ul> 3656 </div> 3657 } 3658 <br class="showhide-br"> 3659 </div> 3660 3661 } 3662 @*<p style="margin-top: -11px;">@GetGlobalValue("Global:Extranet.SecondaryUser.UserID")</p>*@ 3663 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")) && GetLoop("DWExtranetSecondaryUsers").Count > 0) 3664 { 3665 3666 <div class="impersonation-panel" style="margin-bottom: -20px;"> 3667 @*Impersonation*@ 3668 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserName"))) 3669 { 3670 <input class="btn btn-default" style="width: 100% !important;padding-top: 0px !important;background-color: #ad2c13 !important;font-size: 12px; " type="button" id='showhidebtn' value='Impersonated by @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")'> 3671 } 3672 <div id="impersonDiv" style="margin-bottom: -20px;position: absolute;background-color: white;z-index: 9999;border: 1px solid;display:none;padding: 0.5em 0.5em 0.5em 1em; line-height: 3px;"> 3673 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserName"))) 3674 { 3675 3676 string stopImpersonateTranslation = Translate("Stop impersonation", "Stop impersonation"); 3677 <i class="fa fa-user-secret"></i> 3678 <p>@Pageview.User.UserName<text>&nbsp;</text>@Translate("is impersonated by")<text>&nbsp;</text></p><p>@GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</p> 3679 <form method="post"> 3680 <input type="submit" class="btn btn-default" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation" style="width: 139px !important;padding-top: 0px !important;background-color: #ad2c13 !important; "> 3681 </form> 3682 3683 } 3684 else 3685 { 3686 @*<a href="/Default.aspx?ID=2953" title="View the list of users you can impersonate"><i class="fa fa-user-secret"></i>@Translate("View the list of users you can impersonate", "View the list of users you can impersonate")</a>*@ 3687 @*<a href="/Default.aspx?ID=2953" title="View the list of users you can impersonate"><i class="fa fa-user-secret"></i>@Translate("View impersonated user list", "View impersonated user list")</a>*@ 3688 } 3689 </div> 3690 <div> 3691 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserName"))) 3692 { 3693 <a href="/Default.aspx?ID=2953" title="View the list of users you can impersonate"><i class="fa fa-user-secret"></i>@Translate("View impersonated user list", "View impersonated user list")</a> 3694 } 3695 </div> 3696 </div> 3697 } 3698 <!--<div class="login-name">Welcome <br class="showhide-br">@GetString("DWExtranetUsername") | <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.ID"><i class="fa fa-sign-out"></i></a></div>--> 3699 3700 3701 </div> 3702 } 3703 3704 @if(Pageview.Device.ToString().ToUpper() != "MOBILE") 3705 { <!-- Remove Free Delivery Logo --> 3706 @*<span class="borderLine ShowHideLogIn hideLogin" style="padding-top: 3.5px;">|</span> 3707 <div class="top-sign" id="noprint" style="width:auto; padding-top: 5px;"> 3708 <div style="float:left;"><img src="@sitepath/assets/images/Free_Delivery.png" style="width: 60px;"></div> 3709 <!-- <div style="float:left; line-height: 47px;"><span style="font-weight: bold; padding-left: 5px;">Above $80</span></div>--> 3710 </div>*@ 3711 } 3712 3713 @*<div class="searchBox" style="float: none; width: 50%;margin-left: -2px !important; "> 3714 <div class="searchBox_innner"> 3715 <form method="get" id="searchForm" onsubmit="return tolower('#searchForm');" action="Default.aspx"> 3716 <input type="hidden" name="ID" value="159"> 3717 <div class="input-group" style="width: 60%;"> 3718 <input type="text" class="form-control" id="search" name="q" tabindex="1" placeholder="@searchplaceholder" style="width: 170%;"> 3719 <span class="input-group-btn"> 3720 <button name="submit" type="submit" id="submit"><i class="fa fa-search"></i></button> 3721 </span> 3722 </div> 3723 </form> 3724 </div> 3725 </div>*@ 3726 <style> 3727 .searchBox_innner { 3728 border-bottom: unset !important; 3729 margin: 2px 5% 8px 5% !important; 3730 } 3731 3732 .top-info-content { 3733 border-bottom: #d8d8d8 1px solid !important; 3734 } 3735 </style> 3736 @if(Pageview.Device.ToString().ToUpper() != "MOBILE") 3737 { 3738 <div class="ais-InstantSearch" id="AlgoliaSearchDiv"> 3739 <div id="searchbox" onclick="searchclick()" onkeypress="" class="ais-SearchBox"></div> 3740 <div id="pro_popup_bg"></div> 3741 <div id="pro_popup_first" class="popup_first"> 3742 <div id="first_search" style="display:none;"> 3743 <h4 class="sugg_name">Trending Search Terms</h4> 3744 <div id="trend_search" class="recent"></div> 3745 <hr class="sep_bar"> 3746 <h4 class="sugg_name">Recent Searches</h4> 3747 <div id="recent_search" class="recent"></div> 3748 <div id="pagination"></div> 3749 </div> 3750 </div> 3751 <div id="pro_popup_second" class="popup_second"> 3752 <div id="second_search" style="display:none;"> 3753 <div class="grid"> 3754 <h4 class="sugg_name" style="display: inline-block;">Products</h4> 3755 </div> 3756 <div id="product"></div> 3757 <div id="searchproducts"></div> 3758 3759 <div class="grid"> 3760 <h4 class="sugg_name" style="display: inline-block;">Brands</h4> 3761 </div> 3762 <div id="brand"></div> 3763 3764 <h4 class="sugg_name">Categories</h4> 3765 <div id="catego"></div> 3766 3767 <div id="AlgoliaTrickingId" style="display:none"></div> 3768 <hr class="sec_bar"> 3769 </div> 3770 </div> 3771 </div> 3772 } 3773 @if(Pageview.Device.ToString().ToUpper() == "MOBILE") 3774 { 3775 <!-- MODALS --> 3776 <style> 3777 input[type=search] { 3778 width: 300px; 3779 box-sizing: border-box; 3780 border: 2px solid #ccc; 3781 border-radius: 4px; 3782 font-size: 16px; 3783 background-color: white; 3784 background-image: url(/files/images/plc/images/search-icon.svg); 3785 background-position: 6px 4px; 3786 background-repeat: no-repeat; 3787 padding: 12px 20px 12px 40px; 3788 -webkit-transition: width 0.4s ease-in-out; 3789 transition: width 0.4s ease-in-out; 3790 } 3791 </style> 3792 3793 <div class="ais-InstantSearch" id="AlgoliaSearchDiv" style="display:none;"> 3794 <div id="searchbox" onclick="searchclick()" onkeyup="typesearch()" class="ais-SearchBox"></div> 3795 <div id="pro_popup_bg" class="popup_bg"></div> 3796 <div id="pro_popup_first" class="popup_first"> 3797 <div id="first_search" style="display:none;"> 3798 <h4 class="sugg_name">Trending Search Terms</h4> 3799 <div id="trend_search" class="recent"></div> 3800 <hr class="sep_bar"> 3801 <h4 class="sugg_name">Recent Searches</h4> 3802 <div id="recent_search" class="recent"></div> 3803 </div> 3804 </div> 3805 <div id="pro_popup_second" class="popup_second"> 3806 <div id="second_search" style="display:none;"> 3807 <div class="grid"> 3808 <h4 class="sugg_name" style="display: inline-block;">Products</h4> 3809 </div> 3810 <div id="product"></div> 3811 <div id="searchproducts"></div> 3812 3813 <div class="grid"> 3814 <h4 class="sugg_name" style="display: inline-block;">Brands</h4> 3815 </div> 3816 <div id="brand"></div> 3817 3818 <h4 class="sugg_name">Categories</h4> 3819 <div id="catego"></div> 3820 3821 <div id="AlgoliaTrickingId" style="display:none;"></div> 3822 <hr class="sec_bar"> 3823 </div> 3824 </div> 3825 <input type="button" class="cancel_btn" onclick="removeSearchDiv()" alt="submit" name="submit" value="Cancel"> 3826 </div> 3827 3828 <script> 3829 3830 function showsearch(){ 3831 $('#AlgoliaSearchDiv').css("display","block"); 3832 } 3833 function removeSearchDiv() 3834 { 3835 $('#AlgoliaSearchDiv').css("display","none"); 3836 } 3837 3838 function clearSearchText(){ 3839 $('#search').val(''); 3840 return false; 3841 } 3842 3843 </script> 3844 } 3845 </div> 3846 3847 <div style="" id="mainMenu" class="top-navi"> 3848 @{ 3849 var menuSelect = ""; 3850 switch (Pageview.Device.ToString().ToUpper()) 3851 { 3852 case "MOBILE" : 3853 @RenderNavigation(new{ 3854 startlevel = "1", 3855 endlevel = "4", 3856 template = "LiCleanBootstrapDropdown_for_Mobile.xslt", 3857 expandmode = "all" 3858 }) 3859 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/css/algolia_Mobile.css?v=1.3.7"> 3860 break; 3861 case "TABLET" : 3862 @RenderNavigation(new{ 3863 startlevel = "1", 3864 endlevel = "4", 3865 //template = "LiCleanBootstrapDropdown_for_Mobile.xslt", 3866 template = "LiCleanBootstrapDropdown_for_Tablet_New.xslt", 3867 //template = "LiCleanBootstrapDropdown.xslt", 3868 expandmode = "all" 3869 }) 3870 <script> 3871 $(document).ready(function(){ 3872 TabletNavigationMenuHandler(); 3873 $( window ).on( "orientationchange", function( event ) { 3874 if('@GetString("DWPageName")' == 'Shopping Cart') { 3875 //prevention order process crush, doesn't reload 3876 } else if('@GetInteger("DWPageID")' == '67') { 3877 //prevention order process crush, doesn't reload 3878 } else { 3879 location.reload(); 3880 } 3881 TabletNavigationMenuHandler(); 3882 }); 3883 3884 //prevention display:none when second time click on burger menu 3885 $('.showhide').click(function(){ 3886 if (window.matchMedia('(max-width: 768px)').matches) { 3887 $('.navigationSafri').find('.dropdown-column').attr('style','display: block'); 3888 $('.M2').find('.dropdown').attr('style','display: block'); 3889 $('.dropdown-column').attr('style','text-indent: -5px !important'); 3890 } else { 3891 //nothing doing for landscape view 3892 } 3893 }); 3894 }); 3895 function TabletNavigationMenuHandler(){ 3896 if (window.matchMedia('(max-width: 768px)').matches) { 3897 $('.showhide').find('.title').attr('style','display: block'); 3898 $('.showhide').find('.icon').attr('style','display: block'); 3899 $('.M1.dropdown-menu').attr('style','margin-top: 0px !important'); 3900 $('.dropdown-column').attr('style','text-indent: -5px !important'); 3901 } else { 3902 $('.showhide').click(); 3903 $('.showhide').find('.title').attr('style','display: none'); 3904 $('.showhide').find('.icon').attr('style','display: none'); 3905 $('.showhide').attr('style','display: none'); 3906 } 3907 } 3908 //----------------- BEGIN Tablet Menu Touch and Go ----------------- 3909 $('.m-col ul li a').on('click touchend', function(e) { 3910 var el = $(this); 3911 var link = el.attr('href'); 3912 3913 if(link.indexOf('/') != -1 && !window.matchMedia('(max-width: 768px)').matches) { 3914 window.location = link; 3915 } 3916 }); 3917 //----------------- End Tablet Menu Touch and Go ----------------- 3918 </script> 3919 if(System.Web.HttpContext.Current.Request.UserAgent.Split('(')[1].Split(')')[0].ToUpper().Contains("ANDROID")) 3920 { 3921 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/css/algolia_Tablet_Android.css?v=1.0.5"> 3922 } 3923 else 3924 { 3925 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/css/algolia_Tablet.css?v=1.0.1"> 3926 } 3927 break; 3928 default : 3929 @RenderNavigation(new{ 3930 startlevel = "1", 3931 endlevel = "4", 3932 template = "LiCleanBootstrapDropdown.xslt", 3933 expandmode = "all" 3934 }) 3935 @*<text>@GetValue("DwNavigation(jetmenutopnavigation)")</text>*@ 3936 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/css/algolia_Tablet.css?v=1.0.0"> 3937 break; 3938 } 3939 } 3940 </div> 3941 <div> 3942 @if(Pageview.Device.ToString().ToUpper() == "TABLET"){ 3943 <script> 3944 $(document).ready(function(){ 3945 $(".jetmenu").jetmenu(); 3946 }); 3947 </script> 3948 } 3949 @if(Pageview.Device.ToString().ToUpper() == "MOBILE") 3950 { 3951 <script> 3952 $(document).ready(function(){ 3953 $(".jetmenu").jetmenu(); 3954 }); 3955 </script> 3956 <style> 3957 .search-mobile-algolia { 3958 position: relative; 3959 z-index: 9999; 3960 padding: 5px 10px 0px 0px; 3961 float: right; 3962 } 3963 @@media (max-width: 375px) .btn-sale { 3964 position: inherit !important; 3965 top: auto !important; 3966 } 3967 @@media (max-width: 480px) .btn-sale { 3968 position: inherit !important; 3969 top: auto !important; 3970 } 3971 @@media (max-width: 600px) .btn-sale { 3972 position: inherit !important; 3973 top: auto !important; 3974 } 3975 @@media (max-width: 768px) .btn-sale { 3976 position: inherit !important; 3977 top: auto !important; 3978 } 3979 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 3980 .search-mobile { 3981 padding-top: 20px; 3982 } 3983 3984 .btn-sale-mobile { 3985 padding-top: 20px; 3986 } 3987 } 3988 .search-mobile { 3989 float: right; 3990 } 3991 .search-mobile > a > img { 3992 width: 20px; 3993 } 3994 .btn-sale-mobile { 3995 float: right; 3996 } 3997 .btn-sale-mobile > a > img { 3998 width: 80px; 3999 margin-top: -6px; 4000 } 4001 </style> 4002 <div class="btn-sale-mobile" style="display:none;"> 4003 <a href="Default.aspx?ID=@saleid&productclassic=true"> 4004 <img src="/Files/Templates/Designs/PLC/assets/images/btn_sale.png" alt="button image" title="Sale"> 4005 </a> 4006 </div> 4007 <!--<div class="search-mobile"> 4008 <a href="#" id="search-mobile-a" data-toggle="modal" data-target="#searchMobile"> 4009 <img src="assets/images/icon_Search.svg" alt="Search" title="Search" style="margin-top: -3;"> 4010 </a> 4011 </div>--> 4012 <div id="show_icon" class="search-mobile search-mobile-algolia" onclick="showsearch()"> 4013 <img src="/Files/Templates/Designs/PLC/assets/images/icon_Search.svg" alt="Search" title="Search" style="width: 20;cursor: pointer;"> 4014 </div> 4015 } 4016 </div> 4017 @if(Pageview.Device.ToString().ToUpper() != "MOBILE") 4018 { 4019 <div class="btn-sale" style="display:none;"> 4020 <a href="Default.aspx?ID=@saleid&productclassic=true"> 4021 <img src="/Files/Templates/Designs/PLC/assets/images/btn_sale.png" alt="button image" title="Sale"> 4022 </a> 4023 </div> 4024 } 4025 </div> 4026 </div> 4027 </div> 4028 </header> 4029 @if(Pageview.Device.ToString().ToUpper() == "MOBILE" ){ 4030 <div class="clearfix mbl_buttompadding"></div> 4031 } 4032 <div class="content-wrapper grid-full" id="mainpg"> 4033 <div onclick="topFunction()" id="myBtn" title="Go to top"></div> 4034 4035 <script> 4036 $(document).ready(function() { 4037 $('.top').tipso({ 4038 position: 'top', 4039 background: '#000', 4040 useTitle: false, 4041 width: '', 4042 size: 'tiny', 4043 maxWidth: 250 4044 }); 4045 }); 4046 var FacetDeisign = ""; 4047 </script> 4048 @GetValue("Title(Full width page)") 4049 @GetValue("Description(Use this page for full width pages with no left navigation.)") 4050 4051 @{ 4052 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 4053 string target = GetString("Item.Page.Target.Options"); 4054 } 4055 4056 <div class="content-wrapper2 grid-full"> 4057 4058 @if(GetString("DwPageName_4").Length>0){ 4059 <script> 4060 window.DY = window.DY || {}; 4061 DY.recommendationContext = { type : "CATEGORY" , data : [ "@GetString("DwPageName_1").Trim()","@GetString("DwPageName_2").Trim()" ,"@GetString("DwPageName_3").Trim()","@GetString("DwPageName_4").Trim()" ]}; 4062 </script> 4063 }else if(GetString("DwPageName_3").Length>0){ 4064 <script> 4065 window.DY = window.DY || {}; 4066 DY.recommendationContext = { type : "CATEGORY" , data : [ "@GetString("DwPageName_1").Trim()","@GetString("DwPageName_2").Trim()" ,"@GetString("DwPageName_3").Trim()" ]}; 4067 </script> 4068 }else if(GetString("DwPageName_2").Length>0){ 4069 <script> 4070 window.DY = window.DY || {}; 4071 DY.recommendationContext = { type : "CATEGORY" , data : [ "@GetString("DwPageName_1").Trim()","@GetString("DwPageName_2").Trim()" ]}; 4072 </script> 4073 } 4074 else if(GetString("DwPageName_1").Length>0){ 4075 <script> 4076 window.DY = window.DY || {}; 4077 DY.recommendationContext = { type : "CATEGORY" , data : [ "@GetString("DwPageName_1").Trim()" ]}; 4078 </script> 4079 } 4080 4081 4082 <div class="inner-content grid" style="background-color:#fff;"> 4083 @if (GetBoolean("Item.Page.LayoutShowBreadcrumb")) 4084 { 4085 <div class="breadcrumb style2 col-1-1"> 4086 @GetValue("DwNavigation(breadcrumb)") 4087 </div> 4088 <hr> 4089 } 4090 4091 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 4092 { 4093 <div class="col-md-3 col-sm-3 col-3-12"> 4094 <div class="widget"> 4095 <div class="sidenavi-title col-1-1"> 4096 @GetGlobalValue("Global:Page.Top.Name") 4097 </div> 4098 4099 <ul class="sidenavi"> 4100 <li class="current curSub"> 4101 <a><span>@GetGlobalValue("Global:Page.Top.Name")</span></a> 4102 @GetValue("DwNavigation(leftnavigation)") 4103 </li> 4104 </ul> 4105 </div> 4106 @RenderSnippet("facetSnippet") 4107 </div> 4108 if(Pageview.Device.ToString().ToUpper() == "MOBILE"){ 4109 <div class='clearfix'></div> 4110 } 4111 4112 } 4113 4114 @{ 4115 var attributeValue = "col-md-9 col-sm-9 col-xs-12"; 4116 4117 if (GetBoolean("Item.Page.LayoutHideLeftMenu")) 4118 { 4119 attributeValue = "col-md-12 col-sm-12 col-xm-12"; 4120 } 4121 } 4122 4123 <div class="@attributeValue"> 4124 <div class="grid" id="maincontent">@GetValue("DwContent(maincontent)")</div> 4125 </div> 4126 @*<div align="right" class="col-1-1"> 4127 <a onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');" href="javascript:void(0)" class="btn-arrow"><i class="fa fa-chevron-circle-up"></i> Top </a> 4128 </div>*@ 4129 </div> 4130 </div> 4131 <div hidden=""> 4132 <!-- Page proterty Custom_Script --> 4133 @SnippetStart("CustomScriptSnippet") 4134 @GetString("Item.Page.Custom_Script") 4135 @SnippetEnd("CustomScriptSnippet") 4136 </div> 4137 <script> 4138 $(document).ready(function () { 4139 $('.dw-categories > li > a > span').click(function (e) { 4140 e.preventDefault(); 4141 $that = $(this); 4142 $that.closest('li').find('ul').slideToggle(); 4143 $that.closest('li').toggleClass("list-open-active"); 4144 }); 4145 $('.dw-categories > li > ul > li > a > span').click(function (e) { 4146 e.preventDefault(); 4147 $that = $(this); 4148 $that.closest('li').find('ul').slideToggle(); 4149 $that.closest('li').toggleClass("list-open-active"); 4150 $that.closest('span').toggleClass("active-close"); 4151 }); 4152 $('.dw-categories > li > a > span').click(function (e) { 4153 e.preventDefault(); 4154 $that = $(this); 4155 $that.closest('li').toggleClass("list-open-active"); 4156 $that.closest('span').toggleClass("active-close"); 4157 }); 4158 }); 4159 4160 @if(Pageview.Device.ToString().ToUpper() == "TABLET"){ 4161 <text>$('.user-menu-mobile').attr('style','display:none'); 4162 </text> 4163 } 4164 4165 </script> 4166 4167 </div> 4168 4169 <footer class="grid-full" id="noprint"> 4170 <div class="grid"> 4171 <div class="footer1"> 4172 <div class="col-1-2 tab-col-1-2 mobile-col-1-1"> 4173 <div class="col-1-2 tab-col-1-1 mobile-col-1-1"> 4174 <ul class="footer_list"> 4175 <li class="title">Brand Profile</li> 4176 @GetValue("DwNavigation(Brand)") 4177 </ul> 4178 4179 <br> 4180 4181 <ul class="footer_list"> 4182 <li class="title">Shopping</li> 4183 @GetValue("DwNavigation(Shopping)") 4184 </ul> 4185 </div> 4186 4187 <div class="col-1-2 tab-col-1-1 mobile-col-1-1"> 4188 @*<br class="only-small-screen" style="display:none;">*@ 4189 <ul class="footer_list"> 4190 <li class="title">Our Services</li> 4191 @GetValue("DwNavigation(Services)") 4192 </ul> 4193 4194 <br> 4195 4196 <ul class="footer_list"> 4197 <li class="title">Learning Centre</li> 4198 @GetValue("DwNavigation(LearningCentre)") 4199 </ul> 4200 </div> 4201 </div> 4202 4203 4204 <div class="col-1-2 tab-col-1-2 mobile-col-1-1"> 4205 <div class="col-1-2 tab-col-1-1 mobile-col-1-1"> 4206 <ul class="footer_list"> 4207 <li class="title">Members' Lounge</li> 4208 @GetValue("DwNavigation(Members)") 4209 </ul> 4210 <br> 4211 4212 <ul class="footer_list"> 4213 <li class="title">Policies</li> 4214 @GetValue("DwNavigation(Policies)") 4215 </ul> 4216 </div> 4217 4218 <div class="col-1-2 mobile-col-1-1"> 4219 @*<br class="only-small-screen" style="display:none;">*@ 4220 <ul class="footer_list"> 4221 <li class="title">Resources</li> 4222 @GetValue("DwNavigation(Resources)") 4223 </ul> 4224 4225 <br> 4226 4227 <ul class="footer_list"> 4228 @GetValue("DwNavigation(Locations)") 4229 </ul> 4230 4231 <br> 4232 4233 <ul class="footer_list"> 4234 <li class="title">Customer Care</li> 4235 @GetValue("DwNavigation(Care)") 4236 </ul> 4237 </div> 4238 </div> 4239 4240 </div> 4241 4242 4243 <div class="footer2"> 4244 <div class="col-1-2" style="display:none;"> 4245 <div id="likebox-wrapper"> 4246 @*@GetString("Item.Area.Facebook_Like_Box")*@ 4247 </div> 4248 </div> 4249 <div class="row" style="margin-left:0;margin-right:0;"> 4250 <div class="col-lg-6 subscribe-box" id="test"> 4251 @{ 4252 if(GetBoolean("Item.Area.News_Letter_") && !Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 4253 { 4254 <div class="signup-box"> 4255 <h2>Subscribe to our Newsletter!</h2> 4256 4257 <div class="signupBox"> 4258 <div class="signupBox_innner"> 4259 <form action="/Default.aspx?ID=157" method="post"> 4260 <input name="UserManagement_Form_Email" type="text" id="UserManagement_Form_Email" placeholder="Enter your email address"> 4261 <input name="submit" type="image" src="/Files/Templates/Designs/PLC/assets/images/icon_go.png" id="submit"> 4262 </form> 4263 </div> 4264 </div> 4265 </div> 4266 } 4267 } 4268 <div class="question-box"> 4269 <h2>@GetString("Item.Area.Question_Box_Label")</h2> 4270 @GetString("Item.Area.Question_Box_Description") 4271 </div> 4272 </div> 4273 <div class="col-lg-6 vip-concierge" style="padding: 10px 20px 20px 18px;"> 4274 <p style="font-size: 17px; margin-top: -0.5em;"> 4275 <h2 style="font-weight: normal; font-size: 20px;">Download <strong>VIP Concierge</strong> Today!</h2> 4276 <p class="vip-service" style="line-height: 21%;"> 4277 Your one-stop app for all VIP Membership services. 4278 </p> 4279 </p> 4280 @if(Pageview.Device.ToString().ToUpper() == "DESKTOP"){ 4281 <div class="row" style="margin-bottom:10px;"> 4282 <img src="/Files/Images/plc/images/QR_code.png" style="margin-left:12px;width:29%;"> 4283 </div> 4284 }else{ 4285 <div class="row" style="margin-bottom:10px;"> 4286 <a href="https://apps.apple.com/my/app/plc-vip-concierge-my/id6447611585" target="_blank"> 4287 <img src="/Files/Images/plc/images/Recurring/AppStore.png" style="width:11.2em;"> 4288 </a> 4289 <a href="https://play.google.com/store/apps/details?id=com.petloverscentre.vipconcierge.malaysia&pli=1" target="_blank"> 4290 <img src="/Files/Images/plc/images/Recurring/GoogleStore.png" style="width:11.2em;"> 4291 </a> 4292 </div> 4293 } 4294 </div> 4295 </div> 4296 <div class="row" style="margin-left:0;margin-right:0;"> 4297 <div class="col-lg-6 social-box" style="width: "> 4298 <p class="bold">Connect with us</p> 4299 <ul> 4300 @{ 4301 string FB=GetString("Item.Area.Facebook_Link"); 4302 string Youtube=GetString("Item.Area.YouTube_Link"); 4303 string twitter=GetString("Item.Area.Twitter_Link"); 4304 string instagram=GetString("Item.Area.Instagram_Link"); 4305 4306 } 4307 <li><a href="@FB" target="_blank"><img src="/Files/Templates/Designs/PLC/assets/images/icon_fb.png" alt="icon" title="Facebook"></a></li> 4308 <li><a href="@twitter" target="_blank"><img src="/Files/Templates/Designs/PLC/assets/images/icon_tw.png" alt="icon" title="Twitter"></a></li> 4309 <li><a href="@Youtube" target="_blank"><img src="/Files/Templates/Designs/PLC/assets/images/icon_yt.png" alt="icon" title="Youtube"></a></li> 4310 <li><a href="@instagram" target="_blank"><img src="/Files/Templates/Designs/PLC/assets/images/ig_icon.png" alt="icon" title="Instagram"></a></li> 4311 </ul> 4312 </div> 4313 <div class="col-lg-6 site-info"> 4314 <p>This site is best viewed in Chrome v.66, Safari v.11, Microsoft Edge v.42 and above for desktop & mobile.</p> 4315 </div> 4316 </div> 4317 </div> 4318 </div> 4319 4320 4321 4322 <div class="grid-full footer-bottom"> 4323 <div class="grid"> 4324 <p class="footer-bottom1"><a href="javascript:void(0);" style="cursor: default;">Asia's <span style="font-style: italic;">preferred</span> Pet Store!</a></p> 4325 <p class="footer-bottom2">@GetString("Item.Area.Footer")</p> 4326 4327 </div> 4328 </div> 4329 4330 </footer> 4331 4332 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 4333 { 4334 int i=Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID")); 4335 DateTime today=DateTime.Now; 4336 DateTime expDate = new DateTime(); 4337 DateTime dobDate = new DateTime(); 4338 var VIPCard=""; 4339 4340 Dynamicweb.Security.UserManagement.User u = Dynamicweb.Security.UserManagement.User.GetUserByID(i); 4341 4342 foreach (CustomFieldValue val in u.CustomFieldValues) 4343 { 4344 CustomField field = val.CustomField; 4345 string fieldName=field.Name; 4346 if(fieldName=="DOB") 4347 { 4348 dobDate=(DateTime)val.Value; 4349 } 4350 if(fieldName=="ExpryDate") 4351 { 4352 expDate=(DateTime)val.Value; 4353 } 4354 if(fieldName=="VIP Card No") 4355 { 4356 VIPCard=(string)val.Value; 4357 } 4358 } 4359 if( !string.IsNullOrWhiteSpace(VIPCard)) 4360 { 4361 if(expDate.Date.AddYears(-1) <= today.Date) 4362 { 4363 <text> 4364 <style> 4365 a:hover{ 4366 border-bottom: unset !Important; 4367 } 4368 </style> 4369 <script type="text/javascript"> 4370 $(document).ready(function(){ 4371 var alerted = getCookie("IsVIPExpire"); 4372 console.log(alerted); 4373 if (alerted == 'true'){ 4374 expiredVIP(); 4375 document.cookie = "IsVIPExpire=IsShown; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 4376 } 4377 }) 4378 4379 4380 function expiredVIP() 4381 { 4382 var mobileDevice2 = '@Pageview.Device.ToString().ToUpper()'; 4383 console.log(mobileDevice2); 4384 if(mobileDevice2 == "MOBILE") 4385 { 4386 var customCSS = '<style>'; 4387 customCSS += '.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-dialog-buttons{ top: 375px !important; width: 100% !important; z-index: 999999 !important; left: unset !important;}'; 4388 customCSS += '.ui-icon{ margin-top: .3em !important; float: right !important;} .ui-dialog-titlebar-close{ border: none !important; }'; 4389 customCSS += '.ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix{ border: none; background: no-repeat; }'; 4390 customCSS += '.ui-widget-content{ border: none; }'; 4391 customCSS += '</style>'; 4392 var messageBody = '<div style="text-align: right;"><a href="javascript:void(0);CloseFunction();"><img src="/Files/Images/plc/images/remove_icon.svg" style="width:15px;"></a></div>'; 4393 messageBody += '<style>.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {display:none !important;} .ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix {display:none !important;}</style>'; 4394 messageBody += '<div style=" font-size: 18px; text-align: center; color: #ec1d23; font-weight: 700;">You VIP membership has expired</div>'; 4395 messageBody += '<div style=" font-size: 18px; text-align: center; padding-top: 19px;"><span>Renew your VIP membership to enjoy exclusive</span> <span>Members&#39; Pricings, Birthday Offers and earn Loyalty</span> <span>Points to redeem for vouchers!</span></div>'; 4396 messageBody += '<div style="padding-top:20px; height: 75px;"><a style="color: #fff !important; background-color: #ad2c13; padding: 10px 20px 10px 20px; border-radius: 20px; font-size: 18px; " href="javascript:void(0);ClearPopup();">Renew VIP membership</a></div>'; 4397 //messageBody += '<a style="padding: 10px 20px 10px 20px; border-radius: 20px; font-size: 18px;"></div>'; 4398 var htmlMessgarPara = '<div class="popup" style="text-align: center; margin-top: -15px;padding-left:5px;">' + customCSS + messageBody + '</div>' 4399 }else{ 4400 var customCSS = '<style>'; 4401 customCSS += '.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-dialog-buttons{ top: 375px !important; width: 450px !important; z-index: 999999 !important;}'; 4402 customCSS += '.ui-icon{ margin-top: .3em !important; float: right !important;} .ui-dialog-titlebar-close{ border: none !important; }'; 4403 customCSS += '.ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix{ border: none; background: no-repeat; }'; 4404 customCSS += '.ui-widget-content{ border: none; }'; 4405 customCSS += '</style>'; 4406 var messageBody = '<div style="text-align: right;"><a href="javascript:void(0);CloseFunction();"><img src="/Files/Images/plc/images/remove_icon.svg" style="width:15px;"></a></div>'; 4407 messageBody += '<style>.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {display:none !important;} .ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix {display:none !important;}</style>'; 4408 messageBody += '<div style=" font-size: 18px; text-align: center; color: #ec1d23; font-weight: 700;">You VIP membership has expired</div>'; 4409 messageBody += '<div style=" font-size: 18px; text-align: center; padding-top: 19px;"><span>Renew your VIP membership to enjoy exclusive</span><br><span>Members&#39; Pricings, Birthday Offers and earn Loyalty</span><br><span>Points to redeem for vouchers!</span></div>'; 4410 messageBody += '<div style="padding-top:20px; height: 75px;"><a style="color: #fff !important; background-color: #ad2c13; padding: 10px 20px 10px 20px; border-radius: 20px; font-size: 18px; " href="javascript:void(0);ClearPopup();">Renew VIP membership</a></div>'; 4411 //messageBody += '<a style="padding: 10px 20px 10px 20px; border-radius: 20px; font-size: 18px;"></div>'; 4412 var htmlMessgarPara = '<div class="popup" style="text-align: center; margin-top: -15px;padding-left:5px;">' + customCSS + messageBody + '</div>' 4413 } 4414 document.cookie = "IsVIPExpire=False; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 4415 ShowVIPExpiredMessage(htmlMessgarPara); 4416 } 4417 4418 function CloseFunction(){ 4419 $('.ui-dialog-buttonset').find("button").click(); 4420 } 4421 4422 function ClearPopup() 4423 { 4424 CloseFunction(); 4425 window.location.href = "https://vip.petloverscentre.com.my/en_MY/renew-card"; 4426 } 4427 4428 function ShowVIPExpiredMessage(messgarPara) { 4429 var NewDialog; 4430 NewDialog = $('<div class="popup" title="Message" style="text-align:center; padding-top:2em;">' + messgarPara + '</div>'); 4431 NewDialog.dialog({ 4432 resizable: false, 4433 modal: true, 4434 open: function(event, ui) { 4435 $(".ui-dialog-titlebar-close").hide(); 4436 }, 4437 show: 'clip', 4438 buttons: { 4439 "Ok": function() { 4440 //$(this).dialog("close"); 4441 $(this).dialog('destroy').remove(); 4442 } 4443 } 4444 }); 4445 } 4446 </script> 4447 </text> 4448 } 4449 } 4450 } 4451 4452 4453 <script src="/Files/Templates/Designs/PLC/js/dropdown.js" type="text/javascript"></script> 4454 <script type="text/javascript"> 4455 $(function() { 4456 var dd1 = new DropDown1( $('.dd1') ); 4457 var dd2 = new DropDown2( $('.dd2') ); 4458 $(document).click(function() { 4459 $('.wrapper-dropdown-3').removeClass('active'); 4460 }); 4461 4462 }); 4463 </script> 4464 4465 4466 4467 4468 4469 <!--<script> 4470 (function($){ 4471 $(window).load(function(){ 4472 $(".cart-content").mCustomScrollbar({ 4473 theme:"dark-thick" 4474 }); 4475 }); 4476 })(jQuery); 4477 </script>--> 4478 4479 4480 <!--<script> 4481 $('.top-navi').addClass('original').clone().insertAfter('.top-navi').addClass('cloned').css('position','fixed').css('top','0').css('margin-top','0').css('z-index','10000').removeClass('original').hide(); 4482 4483 scrollIntervalID = setInterval(stickIt, 10); 4484 4485 function stickIt() { 4486 4487 var orgElementPos = $('.original').offset(); 4488 orgElementTop = orgElementPos.top; 4489 4490 if ($(window).scrollTop() >= (orgElementTop)) { 4491 // scrolled past the original position; now only show the cloned, sticky element. 4492 4493 // Cloned element should always have same left position and width as original element. 4494 orgElement = $('.original'); 4495 coordsOrgElement = orgElement.offset(); 4496 leftOrgElement = coordsOrgElement.left; 4497 widthOrgElement = orgElement.css('width'); 4498 $('.cloned').css('left',0).css('box-shadow','3px 3px 3px 3px rgba(0,0,0,0.32)').css('top',0).css('background','#FFFFFF').css('width','100%').show(); 4499 $('.cloned .jetmenu').css('padding-left',leftOrgElement+'px'); 4500 $('.original').css('visibility','hidden'); 4501 } else { 4502 // not scrolled past the menu; only show the original menu. 4503 $('.cloned').hide(); 4504 $('.original').css('visibility','visible'); 4505 } 4506 } 4507 </script> --> 4508 4509 4510 4511 <script type="text/javascript"> 4512 function queryStringLinks(){ 4513 var mainLinks = document.getElementsByName("main"); 4514 for(var i = 0;i< mainLinks.length; i++){ 4515 if(mainLinks[i].innerHTML == "Brand" || mainLinks[i].innerHTML == "Burb" || mainLinks[i].innerHTML == "applpaws" ){} 4516 else if( mainLinks[i].innerHTML =="Home"){mainLinks[i].href="@globalurl";} 4517 else if(mainLinks[i].innerHTML != "Fish"){ 4518 mainLinks[i].href += "?firstgroup="+(mainLinks[i].innerHTML.substring(0,mainLinks[i].innerHTML.length -1).toLowerCase()); 4519 } 4520 else{ 4521 mainLinks[i].href += "?firstgroup="+(mainLinks[i].innerHTML).toLowerCase(); 4522 } 4523 } 4524 var mainmenu = document.getElementsByName("mainmenu"); 4525 for(var i = 0;i< mainmenu.length; i++){ 4526 var firstLinks = mainmenu[i].querySelectorAll('[name=first]'); 4527 var thirdMenu = mainmenu[i].querySelectorAll('[name=Third]'); 4528 var secondLinks = mainmenu[i].querySelectorAll('[name=second]'); 4529 var nothirdLinks = 0; 4530 if(mainmenu[i].getAttribute("id") == "Small Pets"){ 4531 mainmenu[i].setAttribute("id","SmallPets"); 4532 } 4533 var firstLinkHTML = ""; 4534 var mainLinks = document.getElementsByName("main"); 4535 4536 for(var k = 0;k<firstLinks.length; k++){ 4537 if(k==0){ 4538 if(firstLinks[k].innerHTML !="Fish"){ 4539 if(firstLinks[k].innerHTML !="Brand"){ 4540 firstLinkHTML = firstLinks[k].innerHTML.substring(0,firstLinks[k].innerHTML.length -1); 4541 firstLinks[k].href += "?firstgroup="+(firstLinkHTML).toLowerCase(); 4542 } 4543 else{ 4544 firstLinks[k].href += "/"+(firstLinkHTML).toLowerCase(); 4545 } 4546 4547 } 4548 else{ 4549 firstLinkHTML = firstLinks[k].innerHTML; 4550 firstLinks[k].href += "?firstgroup="+(firstLinkHTML).toLowerCase(); 4551 } 4552 } 4553 else{ 4554 firstLinks[k].href += "/"+(firstLinkHTML).toLowerCase(); 4555 } 4556 } 4557 4558 4559 for(var j=0;j<secondLinks.length;j++){ 4560 if(firstLinks[0].href.indexOf("brand")>-1){ 4561 4562 } 4563 else{ 4564 secondLinks[j].href = firstLinks[0].href+"&secondgroup="+(secondLinks[j].innerHTML.replace("&amp;","-a-")).toLowerCase(); 4565 } 4566 } 4567 4568 4569 for(var j=0;j<secondLinks.length;j++){ 4570 if(secondLinks[j].parentNode.getElementsByTagName('ul').length ==0){ 4571 nothirdLinks++; 4572 } 4573 if(thirdMenu[j]!=null){ 4574 var thirdLinks = thirdMenu[j].querySelectorAll("a"); 4575 for(var l=0;l<thirdLinks.length;l++){ 4576 4577 thirdLinks[l].href = secondLinks[j+nothirdLinks].href+"&thirdgroup="+(thirdLinks[l].innerHTML.replace("&amp;","-a-")).toLowerCase(); 4578 4579 } 4580 } 4581 } 4582 4583 4584 4585 } 4586 } 4587 4588 $(document).ready(function() { 4589 $('#tableData').paging({limit:50}); 4590 //queryStringLinks(); 4591 }); 4592 $(document).ready(function(){ 4593 $(".dropdown").hover( 4594 function() { $('.dropdown-menu', this).fadeIn("fast"); 4595 }, 4596 function() { $('.dropdown-menu', this).fadeOut("fast"); 4597 }); 4598 }); 4599 4600 function RefreshImage(valImageId) { 4601 var objImage = document.images[valImageId]; 4602 if (objImage == undefined) { return; } 4603 var now = new Date(); objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString(); } 4604 $(document).ready(function(){ $("#btnSubmit").click( 4605 function() { 4606 // alert($("#captchacode").val()) 4607 $.getJSON("/inc/captcha.asp?validateCaptchaCode=" + $("#captchacode").val() + "&format=json&jsoncallback=?", function(data) { 4608 if (data.status == "1") { $("#moreinfo-form").submit(); result = true; } 4609 else { if (data.session == "0") RefreshImage("imgCaptcha"); 4610 alert("Enter captcha code correctly please"); 4611 $("#captchacode").focus(); result = false; } 4612 }); 4613 }); 4614 }); 4615 </script> 4616 <!--------------------------------------------------------------Search ---------------------------------------------------------------> 4617 <script> 4618 function tolower(id){ 4619 document.getElementById('search').value=(document.getElementById('search').value).toLowerCase(); 4620 } 4621 </script> 4622 <!----------------------------------------------------------------------Search End------------------------------------------------------------> 4623 <style> 4624 #AddtoItem { 4625 position: fixed; 4626 top: 0%; 4627 width: 260px; 4628 background: #fff; 4629 height: 420px; 4630 -webkit-box-shadow: 1px 1px 6px 0px rgba(50, 50, 50, 0.75); 4631 -moz-box-shadow: 1px 1px 6px 0px rgba(50, 50, 50, 0.75); 4632 box-shadow: 1px 1px 6px 0px rgba(50, 50, 50, 0.75); 4633 overflow-y: hidden; 4634 overflow-x: hidden; 4635 margin: 10px; 4636 right: 20px; 4637 font-weight: 700; 4638 } 4639 4640 #AddtoItem .modal-backdrop.in { 4641 opacity: 0; 4642 } 4643 4644 img#show { 4645 border: 1px solid #bbb; 4646 width: 100px; 4647 height: auto; 4648 margin: 0px auto; 4649 display: block; 4650 } 4651 4652 #AddtoItem h4 { 4653 margin: 10px; 4654 } 4655 4656 #AddtoItem hr { 4657 width: 90%; 4658 display: block; 4659 margin: 0px auto; 4660 } 4661 4662 #showbox .op { 4663 color: #c8c8c8; 4664 text-decoration: line-through; 4665 float: left; 4666 } 4667 4668 #showbox .np { 4669 float: right; 4670 } 4671 4672 #showbox .save-price { 4673 width: 100%; 4674 font-size: 12px; 4675 float: left; 4676 margin: 0; 4677 } 4678 .M2 > li > a { 4679 margin-left: 0px !important; 4680 } 4681 </style> 4682 4683 <div class="modal fade" id="AddtoItem"> 4684 <h3 style="text-align: center;">Added to Cart</h3> 4685 <table id="showbox"> 4686 </table> 4687 </div><!-- /.modal --> 4688 4689 <div id="clientLoginForm" style="display:none;padding: 0px 5px;"> 4690 <h3>Login to demo site</h3> 4691 <p><label>Password:</label>&nbsp;&nbsp;<input type="text" name="clientLoginPassword" id="clientLoginPassword" style="width:90%;"></p> 4692 <input type="button" onclick="checkPassword()" value="Login"><br> <br> 4693 </div> 4694 4695 <div id="addingToCart" style="display:none; background: none;"> 4696 <h3><img src="/Files/Templates/Designs/PLC/fancybox/fancybox_loading.gif"></h3> 4697 </div> 4698 4699 <!--@Snippet(CustomScriptSnippet)--> 4700 4701 <!-- Start of petloverscentre-my Zendesk Widget script --> 4702 <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=338f9f03-4f2f-4040-b7da-e660a6ce94b9"> </script> 4703 <!-- End of petloverscentre-my Zendesk Widget script --> 4704 <script type="" text/javascript""=""> 4705 zE('messenger:set', 'locale', 'en-US'); 4706 </script> 4707 4708 <!--Start of Zopim Live Chat Script--> 4709 @*<script type="text/javascript"> 4710 window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= 4711 d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set. 4712 _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8"); 4713 $.src="//v2.zopim.com/?2IGUlip9pCiqtmLFJm7euVrlIr1wF3OM";z.t=+new Date;$. 4714 type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script"); 4715 $zopim(function() { 4716 $zopim.livechat.departments.filter('Malaysia Support Team','Pet Care General Enquiries'); 4717 }); 4718 </script> 4719 <!--End of Zopim Live Chat Script--> 4720 <script> 4721 $zopim(function() { 4722 $zopim.livechat.badge.hide(); 4723 }); 4724 </script>*@ 4725 4726 4727 <script> 4728 @*<!-- User Search History BEGIN -->*@ 4729 @if(!string.IsNullOrEmpty(GetString("DW_extranet_AccessUserID")) || string.IsNullOrEmpty(GetString("DW_extranet_AccessUserID"))) 4730 { 4731 <text> 4732 function getUserSearchHistory() { 4733 //document.cookie = "UserSearchHistoryCookieData=" + userSearchHistoryCookieData1 + "; expires=Sat, 31 Dec 2050 12:00:00 UTC"; 4734 var userSearchHistory = []; 4735 var userSearchHistoryCookieData = getCookie("UserSearchHistoryCookieData"); 4736 if(userSearchHistoryCookieData != null && userSearchHistoryCookieData != "" && userSearchHistoryCookieData.length > 0) { 4737 userSearchHistory = userSearchHistoryCookieData.split(","); 4738 } 4739 return userSearchHistory; 4740 } 4741 4742 function displayUserSearchHistory() { 4743 var userSearchHistory = getUserSearchHistory(); 4744 var userSearchHistoryHtmlString = '<div class="ais-Hits ais-Hits--empty">No results</div>'; 4745 if(userSearchHistory.length > 0) { 4746 userSearchHistoryHtmlString = '<div class="ais-Hits"><ol class="ais-Hits-list">'; 4747 $.each(userSearchHistory, function( index, value ) { 4748 userSearchHistoryHtmlString += '<li class="ais-Hits-item">'; 4749 userSearchHistoryHtmlString += '<div><div class="recent-name"><a href="/search?searchsuggest=' + value + '" class="link_recent" >' + value.toUpperCase() + '</a></div></div>'; 4750 userSearchHistoryHtmlString += '</li>'; 4751 }); 4752 userSearchHistoryHtmlString += '</ol></div>'; 4753 } 4754 $('#recent_search').html(''); 4755 $('#recent_search').append(userSearchHistoryHtmlString); 4756 } 4757 4758 function addUserSearchHistory(searchKeyWord) { 4759 var userSearchHistoryLimit = 6; 4760 var userSearchHistory = []; 4761 var userSearchHistoryCookieData = getCookie("UserSearchHistoryCookieData"); 4762 if(userSearchHistoryCookieData != null && userSearchHistoryCookieData != "" && userSearchHistoryCookieData.length > 0) { 4763 userSearchHistory = userSearchHistoryCookieData.split(","); 4764 //console.log(userSearchHistory.length); 4765 if(userSearchHistory.length >= userSearchHistoryLimit) { 4766 userSearchHistory.shift(); 4767 } 4768 } 4769 userSearchHistory.push(searchKeyWord); 4770 document.cookie = "UserSearchHistoryCookieData=" + userSearchHistory + "; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/"; 4771 return userSearchHistory; 4772 } 4773 4774 $(document).ready(function(){ 4775 @if(Pageview.Device.ToString().ToUpper() != "MOBILE") { 4776 <text> 4777 $("#searchbox").keyup(function() { 4778 if($("#searchbox").find("input").val() != null && $("#searchbox").find("input").val() != "" && $("#searchbox").find("input").val().length > 0) { 4779 typesearch(); 4780 } 4781 }); 4782 </text> 4783 } 4784 //alert("Document: " + $(document).width() + ", window: " + $(window).width() + "Device info: @System.Web.HttpContext.Current.Request.UserAgent.Split('(')[1].Split(')')[0].ToUpper()"); 4785 }); 4786 4787 $(window).on('load', function() { 4788 $("#searchbox").find("input").keypress(function(event){ 4789 if (event.keyCode === 13 || event.which === 13) { 4790 if($("#searchbox").find("input").val() != null && $("#searchbox").find("input").val() != "" && $("#searchbox").find("input").val().length > 0) { 4791 var userSearchKeyInWord = $("#searchbox").find("input").val(); 4792 //addUserSearchHistory(userSearchKeyInWord); 4793 //displayUserSearchHistory(); 4794 window.location.href = "/search?searchsuggest=" + userSearchKeyInWord; 4795 } 4796 } 4797 }); 4798 //Search icon work 4799 $( ".ais-SearchBox-submit" ).click(function() { 4800 if($("#searchbox").find("input").val() != null && $("#searchbox").find("input").val() != "" && $("#searchbox").find("input").val().length > 0) { 4801 var userSearchKeyInWord = $("#searchbox").find("input").val(); 4802 addUserSearchHistory(userSearchKeyInWord); 4803 displayUserSearchHistory(); 4804 window.location.href = "/search?searchsuggest=" + userSearchKeyInWord; 4805 } 4806 }); 4807 $("#viewAllProduct").click(function() { 4808 if($("#searchbox").find("input").val() != null && $("#searchbox").find("input").val() != "" && $("#searchbox").find("input").val().length > 0) { 4809 var userSearchKeyInWord = $("#searchbox").find("input").val(); 4810 addUserSearchHistory(userSearchKeyInWord); 4811 displayUserSearchHistory(); 4812 window.location.href = "/search?searchsuggest=" + userSearchKeyInWord; 4813 } 4814 }); 4815 }); 4816 4817 </text> 4818 } 4819 @*<!-- User Search History END -->*@ 4820 </script> 4821 <script> 4822 <!-- Algolia retrieve data from json files BEGIN --> 4823 <!-- Start Trending Search--> 4824 4825 var algoliaTrendURLs = {}; 4826 var algoliaCategoryUrls = {}; 4827 var algoliaBrandUrls = {}; 4828 4829 $(document).ready(function(){ 4830 var algoliaTrendUrlJsonFileUrl = "/utilities/json-trending-search"; 4831 $.ajax({ 4832 type : 'GET', 4833 url : algoliaTrendUrlJsonFileUrl, 4834 async : false, 4835 success : function(algoliaTrendData) 4836 { 4837 algoliaTrendURLs = algoliaTrendData; 4838 } 4839 }); 4840 4841 var TrendingSearchHtmlString = '<div class="ais-Hits ais-Hits--empty">No results</div>'; 4842 if(Object.keys(algoliaTrendURLs).length !== 0 && algoliaTrendURLs != null) { 4843 TrendingSearchHtmlString = '<div class="ais-Hits"><ol class="ais-Hits-list">'; 4844 for(var i=0; i<6; i++){ 4845 TrendingSearchHtmlString += '<li class="ais-Hits-item">'; 4846 TrendingSearchHtmlString += '<div><div class="recent-name"><a href="' + algoliaTrendURLs[i].url + '" class="link_recent" >' + algoliaTrendURLs[i].Name + '</a></div></div>'; 4847 //TrendingSearchHtmlString += '<div><div class="recent-name"><text class="link_recent" onclick="TrendingSearch(\''+ algoliaTrendURLs[i].Name +'\')">' + algoliaTrendURLs[i].Name + '</text></div></div>'; 4848 TrendingSearchHtmlString += '</li>'; 4849 } 4850 TrendingSearchHtmlString += '</ol></div>'; 4851 } 4852 $('#trend_search').html(''); 4853 $('#trend_search').append(TrendingSearchHtmlString); 4854 4855 var algoliaCategoryUrlJsonFileUrl = "https://uat.petloverscentre.com.my/Files/Files/Algolia/AlgoliaCategoryUrls.json?v=" + (new Date()).getTime(); 4856 $.ajax({ 4857 type : 'GET', 4858 url : algoliaCategoryUrlJsonFileUrl, 4859 async : false, 4860 success : function(algoliaCategoryUrlsData) 4861 { 4862 algoliaCategoryUrls = algoliaCategoryUrlsData; 4863 } 4864 }); 4865 4866 var algoliaBrandUrlJsonFileUrl = "https://uat.petloverscentre.com.my/Files/Files/Algolia/AlgoliaBrandUrls.json?v=" + (new Date()).getTime(); 4867 $.ajax({ 4868 type : 'GET', 4869 url : algoliaBrandUrlJsonFileUrl, 4870 async : false, 4871 success : function(algoliaBrandUrlsData) 4872 { 4873 algoliaBrandUrls = algoliaBrandUrlsData; 4874 } 4875 }); 4876 4877 $("#searchbox").keyup(function() { 4878 if($("#searchbox").find("input").val() != null && $("#searchbox").find("input").val() != "" && $("#searchbox").find("input").val().length > 0) { 4879 typesearch(); 4880 } 4881 }); 4882 }); 4883 4884 function TrendingSearch(name){ 4885 //$("#searchbox").find("input").val(name); 4886 //window.location="/search?searchsuggest="+name 4887 //var $inputbox =$("input.ais-SearchBox-input"); 4888 //$inputbox.addClass('focus-visible'); 4889 //$inputbox.val(name); 4890 //$inputbox.keyup(); 4891 //$("#searchbox").find("form").submit(); 4892 4893 //$inputbox.keypress(); 4894 //$inputbox.keyup(); 4895 4896 //$inputbox.keypress(); 4897 4898 //document.getElementsByClassName('ais-SearchBox-input')[0].value=name; 4899 //$("#searchbox").find("input").val(name); 4900 //$("#searchbox").keypress(); 4901 //$("#searchbox").find("input").click(); 4902 //$("#searchbox").find("input").keydown(); 4903 //var DownEvent = jQuery.Event("keydown"); 4904 //DownEvent.which = 32; 4905 //$("#searchbox").find("input").trigger(DownEvent); 4906 4907 //var PressEvent = jQuery.Event("keypress"); 4908 //PressEvent.which = 32; 4909 //$("#searchbox").find("input").keypress(); 4910 //$("#searchbox").find("input").keyup(); 4911 //$("#searchbox").find("input").blur() 4912 } 4913 4914 <!--End Trending Search--> 4915 <!-- Algolia retrieve data from json files END --> 4916 4917 function ReplaceText(txt){ 4918 document.getElementsByClassName("MyCustomSearchBox")[0].value=txt; 4919 search.refresh(); 4920 } 4921 4922 4923 <!--<p>------------------------------------------Begin Affinity js---------------------------------------------------------------------<p>--> 4924 4925 4926 4927 var userId = DYO.StorageUtils.get('_dyid','localStorage'); 4928 if(userId == null) { 4929 console.log('Null _dyid:' + userId); 4930 } else { 4931 console.log('NotNull _dyid:' + userId); 4932 $.ajax({ 4933 url: '/utilities/set_dyid_server', 4934 type: 'POST', 4935 dataType: 'json', 4936 data: { "set_dyid_server": userId }, 4937 success: function (data) { 4938 console.log('_dyid_server'); 4939 console.log(data); 4940 console.log('_dyid_server'); 4941 } 4942 }); 4943 } 4944 var dyHost = "https://"+DYO.hosts.rcom; 4945 window.DY.CS = window.DY.CS || {}; 4946 getAffinity(DY.scsec, userId, 2) 4947 function getAffinity(section,userId,limit){ 4948 4949 var xhr = new XMLHttpRequest(); 4950 xhr.open('GET', dyHost + '/userAffinities?limit='+limit+'&sec='+section+(userId?'&uid='+userId:"")); 4951 xhr.onload = function() { 4952 if (xhr.status === 200) { 4953 console.log('got user affinity : ' +xhr.responseText); 4954 DY.CS.affinityAlgolia = DYAffinityToAlgoliaFilter(JSON.parse(xhr.responseText)); 4955 index.search({ 4956 clickAnalytics: true, 4957 optionalFilters: DY.CS.affinityAlgolia 4958 }).then(res => { 4959 console.log(res); 4960 }); 4961 } 4962 else { 4963 console.log('error getting affinity'); 4964 } 4965 }; 4966 xhr.send(); 4967 } 4968 4969 4970 function DYAffinityToAlgoliaFilter(affinities) { 4971 var filter = []; 4972 if (affinities !== {}) { 4973 for (var affinity in affinities) { 4974 for (var val in affinities[affinity]) { 4975 filter.push(affinity + ":" + val + "<score=" + affinities[affinity][val] + ">") 4976 } 4977 } 4978 } 4979 return filter; 4980 } 4981 4982 4983 4984 function AffinitySearch(searchKeywordAffinity, objectID, productId) { 4985 4986 console.log("searchKeywordAffinity : " + searchKeywordAffinity + ", objectID : " + objectID + ", productId : " + productId) 4987 4988 searchKeywordAffinity = searchKeywordAffinity.replace(" ...", ""); 4989 4990 index.search({ 4991 clickAnalytics: true, 4992 query: searchKeywordAffinity, 4993 optionalFilters: DY.CS.affinityAlgolia 4994 }).then(res => { 4995 console.log(res); 4996 }); 4997 return true; 4998 } 4999 5000 <!--<p>------------------------------------------End Affinity js-----------------------------------------------------------------------<p>--> 5001 5002 5003 5004 <!-- Start Algolia instance search js --> 5005 5006 var curlyBracesOpen = "{"; 5007 var curlyBracesClose = "}"; 5008 var categoryInfoHtmlStr = ''; 5009 var brandInfoHtmlStr = ''; 5010 var brandDivHtmlStr = ''; 5011 var trendInfoHtmlStr =''; 5012 var loopname; 5013 5014 //const searchClient = algoliasearch('X0YY16BYKU', '78192b0fabf9fecc59556f70106d3ac6'); //SG-UAT 5015 //var index = searchClient.initIndex('Pet_Lovers_Centre_-_STG'); //SG-UAT 5016 5017 const searchClient = algoliasearch('44YPI21LC5', '92453214b894c3dc2e5607e437a678f7'); 5018 var index = searchClient.initIndex('(MY)_PLC_-_Staging'); 5019 5020 const search = instantsearch({ 5021 indexName: '(MY)_PLC_-_Staging', 5022 insightsClient: window.AlgoliaInitializeLibrary, 5023 searchClient, 5024 searchParameters: { 5025 "hitsPerPage": 30, 5026 } 5027 }); 5028 5029 search.addWidgets([ 5030 instantsearch.widgets.configure({ 5031 clickAnalytics: true, 5032 }), 5033 ]); 5034 5035 5036 index.search({ 5037 "page": 0, 5038 "filters": "in_stock:true", 5039 "analytics": true, 5040 "attributesToRetrieve": "*", 5041 "attributesToSnippet": "*:20", 5042 "highlightPreTag": "<em>", 5043 "highlightPostTag": "</em>", 5044 "getRankingInfo": true, 5045 "clickAnalytics": true, 5046 "snippetEllipsisText": "…", 5047 "responseFields": "*", 5048 "facets": "*," 5049 }).then(function searchDone(algoliaContent) { 5050 search.addWidget( 5051 5052 instantsearch.widgets.searchBox({ 5053 5054 container: '#searchbox', 5055 placeholder: 'Search for all categories', 5056 attribute: 'firstname', 5057 templates: { 5058 reset: 'X' 5059 }, 5060 cssClasses: { 5061 root: 'MyCustomrootSearchBox', 5062 input: ['MyCustomSearchBox', 'MyCustomSearchBoxForm--subclass'], 5063 button: ['searchicon'] 5064 }, 5065 id: { 5066 root: 'searchrootid', 5067 input: 'searchid' 5068 } 5069 }) 5070 ); 5071 5072 search.addWidgets( 5073 [ 5074 instantsearch.widgets.configure({ 5075 clickAnalytics: true, 5076 5077 }), 5078 instantsearch.widgets.hits({ 5079 filters: "in_stock:true", 5080 container: '#product', 5081 transformItems(items) { 5082 5083 return items.map(item => { 5084 @if(Pageview.Device.ToString().ToUpper() != "MOBILE") { 5085 <text> 5086 item.name = item.name.substring(0, 32) + " ..."; 5087 </text> 5088 } 5089 5090 return item; 5091 }); 5092 }, 5093 templates: { 5094 item: '<img src="' + curlyBracesOpen + curlyBracesOpen + 'image_url' + curlyBracesClose + curlyBracesClose + '" align="left" alt="' + curlyBracesOpen + curlyBracesOpen + 'name' + curlyBracesClose + curlyBracesClose + '" class="p_img"/>' + 5095 '<div class="product_fields">' + 5096 '<div class="hit-products-name"><a href="https://uat.petloverscentre.com.my/default.aspx?ID=298&productid=' + curlyBracesOpen + curlyBracesOpen + 'productID' + curlyBracesClose + curlyBracesClose + '" class="link_proname" onclick="return AffinitySearch(\'' + curlyBracesOpen + curlyBracesOpen + 'brand' + curlyBracesClose + curlyBracesClose + '\'' + ',\'' + curlyBracesOpen + curlyBracesOpen + 'objectID' + curlyBracesClose + curlyBracesClose + '\'' + ',\'' + curlyBracesOpen + curlyBracesOpen + 'productID' + curlyBracesClose + curlyBracesClose + '\'' + ');" >' + curlyBracesOpen + curlyBracesOpen + '#helpers.highlight' + curlyBracesClose + curlyBracesClose + '{ "attribute": "brand" }' + curlyBracesOpen + curlyBracesOpen + '/helpers.highlight' + curlyBracesClose + curlyBracesClose + '</a></div> ' + 5097 '<div class="hit-products-description" ><a href="https://uat.petloverscentre.com.my/default.aspx?ID=298&productid=' + curlyBracesOpen + curlyBracesOpen + 'productID' + curlyBracesClose + curlyBracesClose + '" class="link_desc" id="name_desc" onclick="return AffinitySearch(\'' + curlyBracesOpen + curlyBracesOpen + 'name' + curlyBracesClose + curlyBracesClose + '\');">' + curlyBracesOpen + curlyBracesOpen + 'name' + curlyBracesClose + curlyBracesClose + '</a></div>' + 5098 '</div>' 5099 }, 5100 cssClasses: { 5101 root: 'MyCustomHits hidden', 5102 item: ['MyCustomHitsListitem', 'MyCustomHitsListitem--subclass'] 5103 } 5104 }) 5105 ] 5106 ); 5107 5108 search.addWidget( 5109 instantsearch.widgets.refinementList({ 5110 container: '#AlgoliaTrickingId', 5111 attribute: 'brand', 5112 limit: 30, 5113 transformItems(items) { 5114 var searchUserInput = $("#searchbox").find("input").val(); 5115 liststyleChanged(); 5116 SetHeight(); 5117 $('#brand').html(''); 5118 var i = 0; 5119 brandInfoHtmlStr = ''; 5120 brandDivHtmlStr = ''; 5121 var lists = ''; 5122 if(items.length > 0){ 5123 while (i < items.length) { 5124 var lists = ''; 5125 for(var j=i ; j < i+6 ; j++){ 5126 if(typeof items[j] !== 'undefined') 5127 { 5128 var algoliaBrandUrl = "/brandsourcustomerslove"; 5129 try { algoliaBrandUrl = algoliaBrandUrls.find(x => x.BrandName.toUpperCase() === items[j].label.toUpperCase()).Url; } 5130 catch (ex) { algoliaBrandUrl = "/brandsourcustomerslove"; } 5131 lists += '<li class="ais-Hits-item subitem"><div class="brand_name"><a href="' + algoliaBrandUrl + '" class="link_recent">'; 5132 lists += items[j].value.replace(searchUserInput.toUpperCase(), '<mark class="ais-Highlight-highlighted">' + searchUserInput.toUpperCase() + '</mark>'); 5133 lists += '</a></div></li>'; 5134 } 5135 } 5136 if(i == 0){ 5137 brandDivHtmlStr += '<div class="item active"><ol class="ais-Hits-list">'+ lists +'</ol></div>'; 5138 } 5139 else{ 5140 brandDivHtmlStr += '<div class="item"><ol class="ais-Hits-list">'+ lists +'</ol></div>'; 5141 } 5142 i = i + 6; 5143 } 5144 var carouselSlider = ""; 5145 if(items.length > 6){ 5146 carouselSlider = '<div class="control-box"><div data-slide="prev" class="carousel-control div-btn-arrow left" id="previousbrand" href="#BrandCarousel"></div><div data-slide="next" class="carousel-control div-btn-arrow right" id="nextbrand" href="#BrandCarousel"></div></div>'; 5147 } 5148 brandInfoHtmlStr = '<div class="ais-Hits MyBrandHits carousel slide" id="BrandCarousel"><div class="carousel-inner">' + brandDivHtmlStr + '</div>'+ carouselSlider +'</div>'; 5149 } 5150 5151 if (brandInfoHtmlStr == "") { 5152 $("#brand").html("<div class='noresult'>No Result</div>"); 5153 } else { 5154 $('#brand').append(brandInfoHtmlStr); 5155 } 5156 $("#BrandCarousel").carousel({ 5157 pause: true, 5158 interval: false, 5159 wrap: false 5160 }); 5161 5162 $('#previousbrand').hide(); 5163 $('#nextbrand').show(); 5164 $('#BrandCarousel').on('slid.bs.carousel', function (e) { 5165 $('#BrandCarousel').carousel('pause'); 5166 if ($('#BrandCarousel .item:last').hasClass('active')) { 5167 $('#nextbrand').hide(); 5168 $('#previousbrand').show(); 5169 } 5170 else if ($('#BrandCarousel .item:first').hasClass('active')) { 5171 $('#previousbrand').hide(); 5172 $('#nextbrand').show(); 5173 }else{ 5174 $('#previousbrand').show(); 5175 $('#nextbrand').show(); 5176 } 5177 }); 5178 var elmntBrand = document.getElementById("BrandCarousel"); 5179 var elmntBrandOffsetHeight = 0; 5180 if(elmntBrand != null && elmntBrand.offsetHeight != null) { 5181 elmntBrandOffsetHeight = elmntBrand.offsetHeight; 5182 } 5183 $("#nextbrand").css("margin-top",elmntBrandOffsetHeight/2 -15.5); 5184 $("#previousbrand").css("margin-top",elmntBrandOffsetHeight/2 -15.5); 5185 $("#BrandCarousel").css("min-height",elmntBrandOffsetHeight); 5186 return []; 5187 }, 5188 templates: { 5189 item:'' 5190 } 5191 }) 5192 ); 5193 5194 search.addWidget( 5195 instantsearch.widgets.refinementList({ 5196 container: '#AlgoliaTrickingId', 5197 attribute: 'categories', 5198 limit: 30, 5199 transformItems(items) { 5200 var searchUserInput = $("#searchbox").find("input").val(); 5201 var searchUserInputPattern = new RegExp(searchUserInput, 'gi'); 5202 $('#catego').html(''); 5203 categoryInfoHtmlStr = ''; 5204 var categoDiv = ''; 5205 var i = 0; 5206 if(items.length > 0){ 5207 while (i < items.length) { 5208 var categoList = ''; 5209 for(var j = i; j < i+6 ; j++) { 5210 if(typeof items[j] !== 'undefined') { 5211 var algoliaCategoryUrl = "/"; 5212 try { algoliaCategoryUrl = algoliaCategoryUrls.find(x => x.FirstCategory.toUpperCase() === items[j].label.split('|')[0].toUpperCase() && x.SecondCategory.toUpperCase().replace('&', 'AND') === items[j].label.split('|')[1].toUpperCase().replace('&', 'AND').replace(' ', ' ')).Url; } 5213 catch (ex) { algoliaCategoryUrl = "/"; } 5214 categoList += '<li class="ais-Hits-item subitem"><div class="brand_name"><a href="' + algoliaCategoryUrl + '" class="link_recent">'; 5215 var cattext = items[j].value.split('|'); 5216 var displaycattext = cattext[0] +' > '+cattext[1]; 5217 5218 if(searchUserInput != null && searchUserInput != "" && searchUserInput != " " && searchUserInput.length > 0) { 5219 categoList += displaycattext.replace(searchUserInputPattern, '<mark class="ais-Highlight-highlighted">' + searchUserInput.toUpperCase() + '</mark>'); 5220 } else { 5221 categoList += displaycattext; 5222 } 5223 categoList += '</a></div></li>'; 5224 } 5225 } 5226 if(i == 0) { 5227 categoDiv += '<div class="item active"><ol class="ais-Hits-list">'+ categoList +'</ol></div>'; 5228 } else { 5229 categoDiv += '<div class="item"><ol class="ais-Hits-list">'+ categoList +'</ol></div>'; 5230 } 5231 i = i + 6; 5232 } 5233 var carouselSlider = ""; 5234 if(items.length > 6){ 5235 carouselSlider = '<div class="control-box"><div data-slide="prev" class="carousel-control div-btn-arrow left" id="previouscategory" href="#CategoryCarousel"></div><div data-slide="next" class="carousel-control div-btn-arrow right" id="nextcategory" href="#CategoryCarousel"></div></div>'; 5236 } 5237 categoryInfoHtmlStr = '<div class="ais-Hits MyCategoHits carousel slide" id="CategoryCarousel"><div class="carousel-inner">' + categoDiv + '</div>'+ carouselSlider +'</div>'; 5238 } 5239 if( categoryInfoHtmlStr == "") { 5240 $("#catego").html("<div class='noresult'>No Result</div>"); 5241 } else { 5242 $('#catego').append(categoryInfoHtmlStr); 5243 } 5244 $("#CategoryCarousel").carousel({ 5245 pause: true, 5246 interval: false, 5247 wrap: false 5248 }); 5249 5250 $('#previouscategory').hide(); 5251 $('#nextcategory').show(); 5252 $('#CategoryCarousel').on('slid.bs.carousel', function (e) { 5253 $('#CategoryCarousel').carousel('pause'); 5254 if ($('#CategoryCarousel .item:last').hasClass('active')) { 5255 $('#nextcategory').hide(); 5256 $('#previouscategory').show(); 5257 } 5258 else if ($('#CategoryCarousel .item:first').hasClass('active')) { 5259 $('#previouscategory').hide(); 5260 $('#nextcategory').show(); 5261 } else { 5262 $('#previouscategory').show(); 5263 $('#nextcategory').show(); 5264 } 5265 }); 5266 var elmntCategory = document.getElementById("CategoryCarousel"); 5267 var elmntCategoryOffsetHeight = 0; 5268 if(elmntCategory != null && elmntCategory.offsetHeight != null) { 5269 elmntCategoryOffsetHeight = elmntCategory.offsetHeight; 5270 } 5271 $("#nextcategory").css("margin-top",elmntCategoryOffsetHeight/2 -15.5); 5272 $("#previouscategory").css("margin-top",elmntCategoryOffsetHeight/2 -15.5); 5273 $("#CategoryCarousel").css("min-height",elmntCategoryOffsetHeight); 5274 return []; 5275 }, 5276 templates: { 5277 item:'' 5278 } 5279 }) 5280 ); 5281 5282 @*<!--------------- BEGIN Display User Search History ---------------->*@ 5283 displayUserSearchHistory(); 5284 @*<!--------------- END Display User Search History ---------------->*@ 5285 5286 search.start(); 5287 5288 }).catch(function searchFailure(err) { 5289 console.error("Algolia ERROR: " + err); 5290 }); 5291 function SetHeight(){ 5292 var elmntProduct = document.getElementById("myCarousel"); 5293 if (typeof(elmntProduct) != 'undefined' && elmntProduct != null) 5294 { 5295 var height = elmntProduct.offsetHeight ; 5296 if(elmntProduct.offsetHeight < 200 ){ 5297 height = 270; 5298 } 5299 $("#nextlist").css("margin-top",height/2 - 11); 5300 $("#previouslist").css("margin-top",height/2 -11); 5301 $("#myCarousel").css("min-height", elmntProduct.offsetHeight ); 5302 } 5303 } 5304 async function liststyleChanged(){ 5305 $('#searchproducts').html(''); 5306 var products = []; 5307 var index = 0; 5308 $(".MyCustomHitsListitem ").each(function() { 5309 products.push($(this).html()); 5310 }); 5311 var i=0; 5312 var div1 = document.createElement('div'); 5313 div1.setAttribute('class', 'carousel slide'); 5314 div1.setAttribute('id', 'myCarousel'); 5315 document.getElementById('searchproducts').appendChild(div1); 5316 5317 var div2 = document.createElement('div'); 5318 div2.setAttribute('class', 'carousel-inner'); 5319 div1.appendChild(div2); 5320 if(products.length > 6) 5321 { 5322 var div4= document.createElement('div'); 5323 div4.setAttribute('class', 'control-box'); 5324 div1.appendChild(div4); 5325 var prev = document.createElement('div'); 5326 prev.setAttribute('data-slide', 'prev'); 5327 prev.setAttribute('class', 'carousel-control div-btn-arrow left'); 5328 prev.setAttribute('id','previouslist'); 5329 prev.setAttribute('href', '#myCarousel'); 5330 var next = document.createElement('div'); 5331 next.setAttribute('data-slide', 'next'); 5332 next.setAttribute('class', 'carousel-control div-btn-arrow right'); 5333 next.setAttribute('id','nextlist'); 5334 next.setAttribute('href', '#myCarousel'); 5335 div4.appendChild(prev); 5336 div4.appendChild(next); 5337 } 5338 else if(products.length == 0){ 5339 $("#searchproducts").html("<div class='noresult'>No Result</div>"); 5340 } 5341 while (i < products.length) { 5342 var div3 = document.createElement('div'); 5343 if(i == 0){ 5344 div3.setAttribute('class', 'item active product-item ais-Hits MyCustomHits'); 5345 } 5346 else{ 5347 div3.setAttribute('class', 'item ais-Hits product-item MyCustomHits'); 5348 } 5349 div2.appendChild(div3); 5350 var ul = document.createElement('ul'); 5351 ul.setAttribute('class', 'ais-Hits-list'); 5352 div3.appendChild(ul); 5353 for(var j=i; j < i+6; j++){ 5354 if(typeof products[j] !== 'undefined') 5355 { 5356 var li = document.createElement('li'); 5357 li.innerHTML += products[j]; 5358 li.setAttribute('class', 'ais-Hits-item MyCustomHitsListitem MyCustomHitsListitem--subclass'); 5359 ul.appendChild(li); 5360 } 5361 } 5362 i= i+6; 5363 } 5364 var elmntProduct = document.getElementById("myCarousel"); 5365 if(elmntProduct!== null){ 5366 var height = elmntProduct.offsetHeight ; 5367 if(elmntProduct.offsetHeight < 250 ){ 5368 height = 270; 5369 } 5370 $("#nextlist").css("margin-top",height/2 - 11); 5371 $("#previouslist").css("margin-top",height/2 -11); 5372 $("#myCarousel").css("min-height",elmntProduct.offsetHeight); 5373 } 5374 $("#myCarousel").carousel({ 5375 pause: true, 5376 interval: false, 5377 wrap: false 5378 }); 5379 $('#previouslist').hide(); 5380 $('#nextlist').show(); 5381 $('#myCarousel').on('slid.bs.carousel', function (e) { 5382 $('#myCarousel').carousel('pause'); 5383 if ($('#myCarousel .item:last').hasClass('active')) { 5384 $('#nextlist').hide(); 5385 $('#previouslist').show(); 5386 } 5387 else if ($('#myCarousel .item:first').hasClass('active')) { 5388 $('#previouslist').hide(); 5389 $('#nextlist').show(); 5390 }else{ 5391 $('#previouslist').show(); 5392 $('#nextlist').show(); 5393 } 5394 }); 5395 5396 } 5397 5398 5399 <!--<p>------------------------------------------End Algolia search instance js---------------------------------------------------------------------<p>--> 5400 5401 5402 </script> 5403 </body> 5404 </html> 5405 <script> 5406 $(".sidenavi-title").click(function(){ 5407 $(".sidenavi").slideToggle(); 5408 $('.sidenavi-title').toggleClass('active'); 5409 },function(){ 5410 $(".sidenavi").slideToggle(); 5411 $('.sidenavi-title').toggleClass('active'); 5412 }) 5413 @if(Pageview.Device.ToString().ToUpper() == "MOBILE" || Pageview.Device.ToString().ToUpper() == "TABLET") 5414 { 5415 <text> 5416 $(document).ready(function(){ 5417 $(".category-title").click(); 5418 }) 5419 //$("#megaIdPetId").click(function(){location.href= "https://blog.petloverscentre.com/";}); 5420 $("#megaIdPetId").on('click touchend', function(e) { 5421 window.location.href= "http://blog.petloverscentre.com.my"; 5422 }); 5423 </text> 5424 } 5425 5426 @if(Pageview.Device.ToString().ToUpper() == "MOBILE") 5427 { 5428 <text> 5429 $(document).ready(function(){ 5430 $(".sidenavi-title").click(); 5431 $(".category-title").addClass('active'); 5432 $("#FacetFilters").hide(); 5433 5434 $(".category-title").click(function(){ 5435 if ($("#FacetFilters").css('display') == 'none') { 5436 $(".category-title").attr('style','margin-bottom: 0px'); 5437 $(".category-title").removeClass('active'); 5438 $("#FacetFilters").show(); 5439 } else { 5440 $(".category-title").attr('style','margin-bottom: 50px'); 5441 $(".category-title").addClass('active'); 5442 $("#FacetFilters").hide(); 5443 } 5444 }) 5445 }) 5446 </text> 5447 } 5448 5449 var baseUrl = "@HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)" + "/utilities/json-search-suggest?q="; 5450 baseUrl = "@HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)" + "/utilities/json-search-suggest?searchsuggest="; 5451 $(document).ready(function(){ 5452 $('#search').keyup(function(e){ 5453 if (e.keyCode == 27) { 5454 $('#search').val(''); 5455 } 5456 }); 5457 5458 //start loading icon when enter 5459 $("#search").on('submit', function (e) { 5460 if (e.keyCode == 13 ) { 5461 //$.blockUI({message : $('#SearchLoading'), css: { border: 'none', background: 'none'}});//comment by AKS Aug-6-2019 5462 setTimeout(function(){ $('#submitSearch').click(); }, 3000); 5463 } 5464 }); 5465 //end 5466 5467 $('#search').keyup(function(){ 5468 var body = $('body'); 5469 5470 if($('#search').val().length <= 0 ) 5471 { 5472 body.removeClass('noscroll'); 5473 $('#searchSuggest').html(''); 5474 $('#searchSuggest').hide(); 5475 } 5476 if($('#search').val().length >= 1) 5477 { 5478 var url = baseUrl + $('#search').val().toLowerCase(); 5479 $.ajax({ 5480 url: url, 5481 dataType: "json", 5482 type: 'GET', 5483 success: function(data){ 5484 var productArr = []; 5485 var autoSuggest = '<li class="searchSuggestLi">' + 'No Product found' + '</li>' 5486 if(data.length > 0) { 5487 productArr = data; 5488 autoSuggest = ""; 5489 for(var i = 0; i < productArr.length; i++ ) 5490 { 5491 autoSuggest += '<li class="searchSuggestLi" name="' + productArr[i].Name + '" onclick="searchSuggestData(this.id);" id="' + productArr[i].ID + '">' + productArr[i].Brand + ": " + productArr[i].Name + '</li>'; 5492 } 5493 } 5494 body.addClass('noscroll'); 5495 $('#searchSuggest').html(''); 5496 $('#searchSuggest').append(autoSuggest); 5497 $('#searchSuggest').show(); 5498 }, 5499 error: function(jqXHR, textStatus, errorThrown) { 5500 console.log(textStatus + ': ' + errorThrown); 5501 }, 5502 cache: true 5503 }); 5504 } 5505 }); 5506 }); 5507 5508 function searchSuggestData(selectSuggest) 5509 { 5510 //$.blockUI({message : $('#SearchLoading'), css: { border: 'none', background: 'none'}});//comment by AKS Aug-6-2019 5511 selectSuggest = selectSuggest.replace('&amp;','&'); 5512 //console.log(selectSuggest); 5513 $('#search').val(''); 5514 $('#search').val(selectSuggest); 5515 $('#search').focus(); 5516 setTimeout(function(){ $('#submitSearch').click(); }, 500); 5517 5518 } 5519 5520 $(document).click(function(){ 5521 @* --------- solve for menu item disappear in second time Begin ----------*@ 5522 @if(Pageview.Device.ToString().ToUpper() == "MOBILE") 5523 { 5524 <text> 5525 $("#mainMenu").find(".M1").find(".dropdown").each(function(){ 5526 $(this).css('display', 'block'); 5527 }); 5528 </text> 5529 } 5530 @* --------- solve for menu item disappear in second time End ----------*@ 5531 5532 setTimeout(function(){ 5533 $('#searchSuggest').hide(); 5534 },500); 5535 }); 5536 5537 $(document).scroll(function(){ 5538 $('#searchSuggest').hide(); 5539 }); 5540 5541 //----------------- UI Block functions Begin --------------------- 5542 $(document).ready(function(){ 5543 var UI_Unblock = getCookie("UI_Unblock"); 5544 if(UI_Unblock == "True") { 5545 //$.unblockUI(); 5546 } else { 5547 // This is block for go live. 5548 $.blockUI({message : $('#clientLoginForm')}); 5549 } 5550 5551 @*var firstTimeVisiting = getCookie("First_Time_Visiting"); 5552 if(firstTimeVisiting == "False") { 5553 //$.unblockUI(); 5554 } else { 5555 showTitle = true; 5556 showTitleCloseBtn = true; 5557 showButton = false; 5558 okReload = false; 5559 var mobileDevice2 = '@Pageview.Device.ToString().ToUpper()'; 5560 if(mobileDevice2 =="TABLET") { 5561 var customCSS = '<style>'; 5562 customCSS += '.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-dialog-buttons{ top: 80px !important; width: 80% !important; z-index: 999999 !important;}'; 5563 customCSS += '.ui-icon{ margin-top: .3em !important; float: right !important;} .ui-dialog-titlebar-close{ border: none !important; }'; 5564 customCSS += '.ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix{ border: none; background: no-repeat; }'; 5565 customCSS += '.ui-widget-content{ border: none; }'; 5566 customCSS += '.ui-dialog .ui-dialog-content{ overflow: unset; }'; 5567 customCSS += '</style>'; 5568 var messageBody = '<p style="font-weight: bold; font-size:18px;">New to our Site?</p>'; 5569 messageBody += '<p style=" font-size:18px; text-align: center; color:#BB3618;">Register an online account and enjoy RM15 OFF your 1<sup>st</sup> purchase with a min RM240 spend.</p>'; 5570 messageBody += '<style>th{ padding-right:0.25em; vertical-align:top;border:1px solid #E2E1E9;border-width:0 1px;} </style>'; 5571 messageBody +='<table rules="cols" style="width:100%;"><tr><th><h3 align="center" style="color:#BB3618;">VIP Members</h3></th><th><h3 align="center" style="color: #BB3618;">Non VIP Members</h3></th></tr><tr><th style="width:50%;"><p style="text-align: left;font-size:12px;margin:20px;width:80%;">Your activated VIP membership does not automatically translate to an online account. Please register for an online account and link your VIP membership if you have not, to enjoy VIP privileges when you shop online.</p></th><th style="width:50%;" ><a href="/register" style="background-color: #BB3618; border:none;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px;cursor: pointer;width: 80%;color:#fff !important;margin:20px;">Register an Online Account</a></center></th></tr>'; 5572 messageBody +='<th style="width:50%"><a href="/register" style="color: green; background-color: #BB3618; border: none;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px; margin:4px 25px;cursor: pointer; width: 80%;color:#fff !important;margin-top:20px;">Register & Link VIP Membership</a></th>'; 5573 messageBody +='<th style="width:50%"> <a href="/" style=" background-color: #ffffff; border: solid; border-width: thin; color: red;color: white;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px;cursor: pointer; width: 80%;margin:20px; ">Continue Shopping</a></th></tr></table>'; 5574 messageBody += '<p><a href="https://customercare.petloverscentre.com/hc/en-us/articles/360000118901-What-do-I-enjoy-with-an-online-account-" target="_blank" style="text-align:center;color:black !important;font-size:11px; margin-top: 20px;"><u>Learn more on the benefits of an online account</u></a></p>'; 5575 var htmlMessgarPara = '<div class="popup" style="text-align: center; margin-top: -15px;padding-left:5px;">' + customCSS + messageBody + '</div>' 5576 ShowMessageGlobalDialog(htmlMessgarPara, showTitle, showTitleCloseBtn, showButton, okReload); 5577 document.cookie = "First_Time_Visiting=False; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5578 } else { 5579 var mobileDevice1 = '@Pageview.Device.ToString().ToUpper()'; 5580 if(mobileDevice1 == 'MOBILE') { 5581 //$.blockUI({message : $('#clientLoginForm')}); 5582 var customCSS = '<style>'; 5583 customCSS += '.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-dialog-buttons{ top: 80px !important; width: 100% !important; z-index: 999999 !important;}'; 5584 customCSS += '.ui-icon{ margin-top: .3em !important; float: right !important;} .ui-dialog-titlebar-close{ border: none !important; }'; 5585 customCSS += '.ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix{ border: none; background: no-repeat; }'; 5586 customCSS += '.ui-widget-content{ border: none; }'; 5587 customCSS += '.ui-dialog .ui-dialog-content{ overflow: unset; }'; 5588 customCSS += '</style>'; 5589 var messageBody = '<p style="font-weight: bold; font-size:18px;">New to our Site?</p>'; 5590 messageBody += '<p style=" font-size:18px; text-align: center;color:#BB3618;width:90%;margin:15px;">Register an online account and enjoy RM15 OFF your 1<sup>st</sup> purchase with a min RM240 spend.</p>'; 5591 messageBody +='<table rules="cols" style="width:100%;"><tr><h3 align="center" style="color: #BB3618;">VIP Members</h3></tr><tr><p style="text-align: left;font-size:12px; margin:30px;with:80%;">Your activated VIP membership does not automatically translate to an online account. Please register for an online account and link your VIP membership if you have not, to enjoy VIP privileges when you shop online.</p></tr>'; 5592 messageBody +='<tr><a href="/register" style="color: green; background-color: #BB3618; border: none;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px; margin:20px;cursor: pointer; width: 80%;color:#fff !important;">Register & Link VIP Membership</a></tr> <hr style="color:#E2E1E9;">'; 5593 messageBody +='<tr><h3 align="center" style="color: #BB3618;">Non VIP Members</h3></tr>'; 5594 messageBody +='<tr><a href="/register" style="background-color: #BB3618; border:none;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px; margin:20px; cursor: pointer; width:80%;color:#fff !important;">Register an Online Account</a></center></tr>'; 5595 messageBody +='<tr><a href="/" style=" background-color: #ffffff; border: solid; border-width: thin; color: red !important;color: white;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px;cursor: pointer; width: 80%;margin:20px;margin-top:0px; ">Continue Shopping</a></tr></table>'; 5596 messageBody += '<p><a href="https://customercare.petloverscentre.com/hc/en-us/articles/360000118901-What-do-I-enjoy-with-an-online-account-" target="_blank" style="text-align:center;color:black !important;font-size:11px; margin-top: 0px;"><u>Learn more on the benefits of an online account</u></a></p>'; 5597 var htmlMessgarPara = '<div class="popup" style="text-align: center; margin-top: -15px;padding-left:5px;">' + customCSS + messageBody + '</div>' 5598 ShowMessageGlobalDialog(htmlMessgarPara, showTitle, showTitleCloseBtn, showButton, okReload); 5599 document.cookie = "First_Time_Visiting=False; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5600 } else { 5601 var customCSS = '<style>'; 5602 customCSS += '.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-draggable.ui-dialog-buttons{ top: 80px !important; width: 50% !important; z-index: 999999 !important;}'; 5603 customCSS += '.ui-icon{ margin-top: .3em !important; float: right !important;} .ui-dialog-titlebar-close{ border: none !important; }'; 5604 customCSS += '.ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix{ border: none; background: no-repeat; }'; 5605 customCSS += '.ui-widget-content{ border: none; }'; 5606 customCSS += '.ui-dialog .ui-dialog-content{ overflow: unset; }'; 5607 customCSS += '</style>'; 5608 var messageBody = '<p style="font-weight: bold; font-size:18px;">New to our Site?</p>'; 5609 messageBody += '<p style=" font-size:18px; text-align: center; color:#BB3618;">Register an online account and enjoy RM15 OFF your 1<sup>st</sup> purchase with a min RM240 spend.</p>'; 5610 messageBody += '<style>th{ padding-right:0.25em; vertical-align:top;border:1px solid #E2E1E9;border-width:0 1px;} </style>'; 5611 messageBody +='<table rules="cols" style="width:100%;"><tr><th><h3 align="center" style="color:#BB3618;">VIP Members</h3></th><th><h3 align="center" style="color: #BB3618;">Non VIP Members</h3></th></tr><tr><th style="width:50%;"><p style="text-align: left;font-size:12px;margin:20px;width:80%;">Your activated VIP membership does not automatically translate to an online account. Please register for an online account and link your VIP membership if you have not, to enjoy VIP privileges when you shop online.</p></th><th style="width:50%;" ><a href="/register" style="background-color: #BB3618; border:none;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px;cursor: pointer;width: 80%;color:#fff !important;margin:20px;">Register an Online Account</a></center></th></tr>'; 5612 messageBody +='<th style="width:50%"><a href="/register" style="color: green; background-color: #BB3618; border: none;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px; margin:4px 25px;cursor: pointer; width: 80%;color:#fff !important;margin-top:20px;">Register & Link VIP Membership</a></th>'; 5613 messageBody +='<th style="width:50%"> <a href="/" style=" background-color: #ffffff; border: solid; border-width: thin; color: red;color: white;padding: 13px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 12px;cursor: pointer; width: 80%;margin:20px; ">Continue Shopping</a></th></tr></table>'; 5614 messageBody += '<p><a href="https://customercare.petloverscentre.com/hc/en-us/articles/360000118901-What-do-I-enjoy-with-an-online-account-" target="_blank" style="text-align:center;color:black !important;font-size:11px; margin-top: 20px;"><u>Learn more on the benefits of an online account</u></a></p>'; 5615 var htmlMessgarPara = '<div class="popup" style="text-align: center; margin-top: -15px;padding-left:5px;">' + customCSS + messageBody + '</div>' 5616 ShowMessageGlobalDialog(htmlMessgarPara, showTitle, showTitleCloseBtn, showButton, okReload); 5617 document.cookie = "First_Time_Visiting=False; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5618 } 5619 } 5620 }*@ 5621 }); 5622 function checkPassword() 5623 { 5624 console.log("here password"); 5625 $.blockUI(); 5626 var uiLoginResult = ""; 5627 $.ajax({ 5628 url: '@myPlcUrl' + '/utilities/json-ui-login?pwd=' + $('#clientLoginPassword').val(), 5629 type: 'GET', 5630 success: function(data){ 5631 console.log(data); 5632 uiLoginResult = data.result == "True"; 5633 console.log(uiLoginResult); 5634 if(uiLoginResult) { 5635 document.cookie = "UI_Unblock=True; expires=Mon, 31 Dec 2035 12:00:00 UTC"; 5636 $.unblockUI(); 5637 } else { 5638 document.cookie = "UI_Unblock=False; expires=Thu, 31 Dec 2020 12:00:00 UTC"; 5639 $.blockUI({message : $('#clientLoginForm')}); 5640 } 5641 }, 5642 error: function(jqXHR, textStatus, errorThrown) { 5643 console.log(textStatus + ': ' + errorThrown); 5644 $.blockUI({message : $('#clientLoginForm')}); 5645 }, 5646 cache: true 5647 }); 5648 } 5649 5650 $("#ResendActivateEmail").submit(function( event ) { 5651 $.ajax({ 5652 url: '@myPlcUrl' + '/utilities/activate-email-sending?Email=' + $('#validateEmail').val(), 5653 type: 'GET', 5654 success: function(data){}, 5655 cache: true 5656 }); 5657 }); 5658 //----------------- UI Block functions End --------------------- 5659 5660 //----------------- Ajax Add To Cart functions Begin --------------------- 5661 function AjaxAddToCart(parameter, requestProductID) { 5662 $.blockUI({message : $('#addingToCart'), css: { border: 'none', background: 'none'}}); 5663 $.ajax({ 5664 url: websiteUrl + parameter + $("#quantityInput_" + requestProductID).val(), 5665 type: 'GET', 5666 success: function(data){ 5667 $("#AddtoItem").modal('hide'); 5668 $.unblockUI(); 5669 $('#minipagecart-button').html(''); 5670 $('#minipagecart-button').html($(data).find("#minipagecart-button").html()); 5671 $('#smallscreen-minicart').find('.dropdown-cart').find('.dropdown-cart').html(''); 5672 $('#smallscreen-minicart').find('.dropdown-cart').html($(data).find("#smallscreen-minicart").find('.dropdown-cart').html()); 5673 }, 5674 error: function(jqXHR, textStatus, errorThrown) { 5675 $.unblockUI(); 5676 }, 5677 cache: true 5678 }); 5679 } 5680 5681 5682 5683 //----------------DY Add to cart 5684 function DYAddToCart(id, requestQty, totalPrice, pName, prodNO, Currcode, prodGroupsforFBpixel) { 5685 window.DY = window.DY || {}; 5686 $.ajax({ 5687 url: websiteUrl + "/Default.aspx?ID=3306&ProductID=" + id, 5688 dataType: "json", 5689 type: "GET", 5690 success: function(data) { 5691 var skuNumber = data["productNumber"]; 5692 pName = data["productName"]; 5693 prodNO = data["productNumber"]; 5694 $.ajax({ 5695 url: websiteUrl + "/Default.aspx?ID=6761", 5696 dataType: "json", 5697 type: "GET", 5698 success: function(jsonData) { 5699 DY.API("event", { 5700 name: "Add to Cart", 5701 properties: { 5702 dyType: "add-to-cart-v1", 5703 value: parseFloat(totalPrice), 5704 currency: "MYR", 5705 productId: skuNumber, 5706 quantity: parseFloat(requestQty), 5707 cart: jsonData 5708 } 5709 }); 5710 5711 5712 }, 5713 error: function(jqXHR, textStatus, errorThrown) { 5714 console.log(textStatus + ': ' + errorThrown); 5715 }, 5716 cache: true 5717 }); 5718 }, 5719 error: function(jqXHR, textStatus, errorThrown) { 5720 $.unblockUI(); 5721 console.log(textStatus + ': ' + errorThrown); 5722 }, 5723 cache: true 5724 }); 5725 } 5726 5727 function LoadaddtoCartPopDY(id,pBrand,pName,requestQty,pPrice){ 5728 5729 var toAppendData = ""; 5730 toAppendData = '<tr><td colspan="2"><img src="https://cdn.petloverscentre.com/Admin/Public/Getimage.ashx?width=147&compression=85&Crop=5&image=/Files/Images/Ecom/Products/' + id + '.jpg" id="show" alt="product image"></td></tr>'; 5731 toAppendData += '<tr><td width="250px" style="padding:20px;" colspan="2">'; 5732 toAppendData += '<div class="pid" hidden>' + id + '</div>'; 5733 toAppendData += '<div class="pbrand">' + pBrand.replace(" myAND ", " & ") + '</div>'; 5734 toAppendData += '<div class="pname">' + pName.replace(" myAND ", " & ") + '</div>'; 5735 toAppendData += '<div class="qty">QTY: ' + requestQty + '<span class="count"></span></div>'; 5736 toAppendData += '</td></tr><tr><td colspan="2"><hr /></td></tr><tr>'; 5737 toAppendData += '</tr>'; 5738 $("#showbox").html(""); 5739 $("#showbox").append(toAppendData); 5740 5741 $("#AddtoItem").modal('show'); 5742 setTimeout(function(){$("#AddtoItem").modal('hide'); }, 1500); 5743 5744 } 5745 5746 5747 //----------------- Add To Cart PopUp functions Begin --------------------- 5748 function showaddedItem(url, id, pBrand, pName, pPrice, currencySymbol, requestQty, visible) { 5749 $.ajax({ 5750 url: websiteUrl + "/Default.aspx?ID=3306&ProductID=" + id, 5751 dataType: "json", 5752 type: "GET", 5753 success: function(data){ 5754 //console.log(data["isInCartQtyProduct"]); 5755 if(data["isInCartQtyProduct"] == "True") { 5756 requestQty = parseInt(data["inCartQty"]) + parseInt(requestQty); 5757 id = data["productID"]; 5758 pBrand = data["productBrand"]; 5759 pName = data["productName"]; 5760 pPrice = data["unitPriceWithVAT"]; 5761 currencySymbol = data["currencySymbol"]; 5762 } 5763 5764 var totalPrice = (parseFloat(pPrice) * parseFloat(requestQty)).toFixed(2); 5765 var toAppendData = ""; 5766 toAppendData = '<tr><td colspan="2"><img src="/Admin/Public/Getimage.ashx?width=147&compression=85&Crop=5&image=/Files/Images/Ecom/Products/' + id + '.jpg" id="show" alt="product image"></td></tr>'; 5767 toAppendData += '<tr><td width="250px" style="padding:20px;" colspan="2">'; 5768 toAppendData += '<div class="pid" hidden>' + id + '</div>'; 5769 toAppendData += '<div class="pbrand">' + pBrand + '</div>'; 5770 toAppendData += '<div class="pname">' + pName + '</div>'; 5771 toAppendData += '<div class="qty">QTY: ' + requestQty + '<span class="count"></span></div>'; 5772 toAppendData += '<div class="price">' + currencySymbol + pPrice + '</div>'; 5773 toAppendData += '</td></tr><tr><td colspan="2"><hr /></td></tr><tr>'; 5774 toAppendData += '<td><p style="padding:10px 30px 10px 30px;">Cart Total: ' + currencySymbol + totalPrice + '</p></td>'; 5775 toAppendData += '<td><p class="Itotalprice" style="padding:10px;"></p></td>'; 5776 toAppendData += '</tr>'; 5777 $("#showbox").html(""); 5778 $("#showbox").append(toAppendData); 5779 5780 $("#AddtoItem").modal('show'); 5781 setTimeout(function(){$("#AddtoItem").modal('hide');}, 3000); 5782 }, 5783 error: function(jqXHR, textStatus, errorThrown) { 5784 console.log(textStatus + ': ' + errorThrown); 5785 }, 5786 cache: true 5787 }); 5788 } 5789 5790 function ShowAddedItem_Then_AjaxAddToCart(url, id, pBrand, pName, pPrice, currencySymbol, requestQty, visible, parameter,prodNO,Currcode,prodGroupsforFBpixel, productSize, productFlavour, productColor) { 5791 var value = (parseFloat(pPrice) * parseFloat(requestQty)).toFixed(2); 5792 var categories = prodGroupsforFBpixel.split(","); 5793 gtag("event", "add_to_cart", { 5794 currency: Currcode, 5795 value: parseFloat(value), 5796 items: [ 5797 { 5798 item_id: id, 5799 item_name: pName, 5800 currency: Currcode, 5801 index: 0, 5802 item_brand: pBrand, 5803 item_category: categories[0], 5804 item_category2: categories[1], 5805 item_category3: categories[2], 5806 item_variant: productFlavour, 5807 item_variant2: productColor, 5808 item_variant3: productSize, 5809 price: parseInt(pPrice), 5810 quantity: parseInt(requestQty) 5811 } 5812 ] 5813 }); 5814 5815 $.blockUI({message : $('#addingToCart'), css: { border: 'none', background: 'none'}}); 5816 5817 var DYrequestQty=requestQty; 5818 var Currcode="MYR"; 5819 5820 var totalPrice = (parseFloat(pPrice) * parseFloat(requestQty)).toFixed(2); 5821 var toAppendData = ""; 5822 toAppendData = '<tr><td colspan="2"><img src="/Admin/Public/Getimage.ashx?width=147&compression=85&Crop=5&image=/Files/Images/Ecom/Products/' + id + '.jpg" id="show" alt="product image"></td></tr>'; 5823 toAppendData += '<tr><td width="250px" style="padding:20px;" colspan="2">'; 5824 toAppendData += '<div class="pid" hidden>' + id + '</div>'; 5825 toAppendData += '<div class="pbrand">' + pBrand.replace(" myAND ", " & ") + '</div>'; 5826 toAppendData += '<div class="pname">' + pName.replace(" myAND ", " & ") + '</div>'; 5827 toAppendData += '<div class="qty">QTY: ' + requestQty + '<span class="count"></span></div>'; 5828 toAppendData += '<div class="price">' + currencySymbol + pPrice + '</div>'; 5829 toAppendData += '</td></tr><tr><td colspan="2"><hr /></td></tr><tr>'; 5830 toAppendData += '<td><p style="padding:10px 30px 10px 30px;">Total: ' + currencySymbol + totalPrice + '</p></td>'; 5831 toAppendData += '<td><p class="Itotalprice" style="padding:10px;"></p></td>'; 5832 toAppendData += '</tr>'; 5833 $("#showbox").html(""); 5834 $("#showbox").append(toAppendData); 5835 5836 var DYtotalPrice = (parseFloat(pPrice) * parseFloat(DYrequestQty)).toFixed(2); 5837 5838 $("#AddtoItem").modal('show'); 5839 $("body").removeClass("modal-open"); 5840 $("body").removeAttr("style"); 5841 setTimeout(function(){$("#AddtoItem").modal('hide');$.unblockUI();}, 1000); 5842 5843 $.ajax({ 5844 url: websiteUrl + "/Default.aspx?ID=6520" + parameter + $("#quantityInput_" + id).val() +"&redirect=false", 5845 type: 'GET', 5846 success: function(data){ 5847 $("#AddtoItem").modal('hide'); 5848 $.unblockUI(); 5849 $('#minipagecart-button').html(''); 5850 $('#minipagecart-button').html($(data).find("#minipagecart-button").html()); 5851 $('#smallscreen-minicart').find('.dropdown-cart').find('.dropdown-cart').html(''); 5852 $('#smallscreen-minicart').find('.dropdown-cart').html($(data).find("#smallscreen-minicart").find('.dropdown-cart').html()); 5853 DYAddToCart(id, DYrequestQty, DYtotalPrice, pName, prodNO, Currcode, "" ); 5854 }, 5855 error: function(jqXHR, textStatus, errorThrown) { 5856 $.unblockUI(); 5857 }, 5858 cache: true 5859 }); 5860 //}, 5861 //error: function(jqXHR, textStatus, errorThrown) { 5862 // $.unblockUI(); 5863 // console.log(textStatus + ': ' + errorThrown); 5864 //}, 5865 //cache: true 5866 //}); 5867 } 5868 //----------------- Ajax Add To Cart functions End --------------------- 5869 //----------------- Add To Cart PopUp functions End --------------------- 5870 5871 //----------------- Show Message Global Dialog Brgin --------------------- 5872 function ShowMessageGlobalDialog(htmlMessgarPara, showTitle, showTitleCloseBtn, showButton, okReload) { 5873 var NewDialog; 5874 NewDialog = $(htmlMessgarPara); 5875 NewDialog.dialog({ 5876 resizable: false, 5877 modal: true, 5878 open: function(event, ui) { 5879 if(showTitle) { 5880 $(".ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix").show(); 5881 if(showTitleCloseBtn) { 5882 $(".ui-dialog-titlebar-close").show(); 5883 } 5884 else { 5885 $(".ui-dialog-titlebar-close").hide(); 5886 } 5887 } 5888 else { 5889 $(".ui-dialog-titlebar.ui-widget-header.ui-corner-all.ui-helper-clearfix").hide(); 5890 } 5891 if(showButton) { 5892 $('.ui-dialog-buttonset').show(); 5893 } 5894 else { 5895 $('.ui-dialog-buttonset').hide(); 5896 } 5897 }, 5898 show: 'clip', 5899 buttons: { 5900 "Ok": function() { 5901 $(this).dialog("close"); 5902 if(okReload) 5903 { 5904 location.reload(); 5905 } 5906 } 5907 } 5908 }); 5909 } 5910 //----------------- Show Message Global Dialog End--------------------- 5911 5912 //----------------- Document . Ready Begin --------------------- 5913 $(document).ready(function(){ 5914 $('.blockList>li.dropdown').addClass('fixedBlock'); 5915 }); 5916 //----------------- Document . Ready End --------------------- 5917 5918 5919 //----------------- Notification Bar --------------------- 5920 @if(GetBoolean("Item.Area.Notification_Bar_On_Off") || GetBoolean("Item.Area.System_Notification_Bar_On_Off") || GetBoolean("Item.Area.Day_Notification_Bar_On_Off") || GetBoolean("Item.Area.Maintenance_Time_Notification_Bar_On_Off")) 5921 { 5922 DateTime notiExpDate = DateTime.Now.AddDays(1).Date; 5923 String ExpDateDay = notiExpDate.ToString("dddd").Substring(0, 3); 5924 string ExpDateString = ExpDateDay + ", " + notiExpDate.ToString("dd MMMM yyyy 12:00:00") + " " + "UTC"; 5925 <text> 5926 $(document).ready(function() { 5927 var hasnoti = getCookie("PLCBlackNotiBar"); 5928 if(hasnoti == "show") { 5929 if(history.length == 2) 5930 { 5931 $("#alertmain").show(); 5932 $(".content-wrapper2").addClass("contentwrapper2_whennoti"); 5933 $("header").addClass("whenNoti"); 5934 $("#mainpg").addClass("whenNotiMainPg"); 5935 document.cookie = "PLCBlackNotiBar=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5936 }else{ 5937 $("#alertmain").hide(); 5938 } 5939 } else { 5940 var notibar='@GetString("Item.Area.Notification_Bar_On_Off")'; 5941 var sysnotibar = '@GetString("Item.Area.System_Notification_Bar_On_Off")'; 5942 var daynotibar = '@GetString("Item.Area.Day_Notification_Bar_On_Off")'; 5943 var mainnotibar = '@GetString("Item.Area.Maintenance_Time_Notification_Bar_On_Off")'; 5944 if(notibar == 'True') 5945 { 5946 if(sysnotibar == 'True') 5947 { 5948 if('@serverTime' > '@startTime' && '@serverTime' < '@endTime') 5949 { 5950 $("#alertmain").show(); 5951 $("header").addClass("whenNoti"); 5952 $("#mainpg").addClass("whenNotiMainPg"); 5953 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5954 }else{ 5955 if(mainnotibar == 'True') 5956 { 5957 if('@GetString("Item.Area.Maintenance_Time_Notification_Day")' != "DAILY") 5958 { 5959 if('@checkDay' == '@GetString("Item.Area.Maintenance_Time_Notification_Day")' && '@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 5960 { 5961 $("#alertmain").show(); 5962 $("header").addClass("whenNoti"); 5963 $("#mainpg").addClass("whenNotiMainPg"); 5964 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5965 }else{ 5966 if(daynotibar == 'True') 5967 { 5968 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 5969 { 5970 $("#alertmain").show(); 5971 $("header").addClass("whenNoti"); 5972 $("#mainpg").addClass("whenNotiMainPg"); 5973 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5974 }else{ 5975 if(notibar == 'True') 5976 { 5977 $("#alertmain").show(); 5978 $("header").addClass("whenNoti"); 5979 $("#mainpg").addClass("whenNotiMainPg"); 5980 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5981 } 5982 } 5983 }else{ 5984 if(notibar == 'True') 5985 { 5986 $("#alertmain").show(); 5987 $("header").addClass("whenNoti"); 5988 $("#mainpg").addClass("whenNotiMainPg"); 5989 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 5990 } 5991 } 5992 } 5993 }else{ 5994 if('@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 5995 { 5996 $("#alertmain").show(); 5997 $("header").addClass("whenNoti"); 5998 $("#mainpg").addClass("whenNotiMainPg"); 5999 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6000 }else{ 6001 if(notibar == 'True') 6002 { 6003 $("#alertmain").show(); 6004 $("header").addClass("whenNoti"); 6005 $("#mainpg").addClass("whenNotiMainPg"); 6006 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6007 } 6008 } 6009 } 6010 }else{ 6011 if(daynotibar == 'True') 6012 { 6013 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6014 { 6015 $("#alertmain").show(); 6016 $("header").addClass("whenNoti"); 6017 $("#mainpg").addClass("whenNotiMainPg"); 6018 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6019 }else{ 6020 if(notibar == 'True') 6021 { 6022 $("#alertmain").show(); 6023 $("header").addClass("whenNoti"); 6024 $("#mainpg").addClass("whenNotiMainPg"); 6025 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6026 } 6027 } 6028 }else{ 6029 if(notibar == 'True') 6030 { 6031 $("#alertmain").show(); 6032 $("header").addClass("whenNoti"); 6033 $("#mainpg").addClass("whenNotiMainPg"); 6034 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6035 } 6036 } 6037 } 6038 } 6039 }else{ 6040 if(mainnotibar == 'True') 6041 { 6042 if('@GetString("Item.Area.Maintenance_Time_Notification_Day")' != "DAILY") 6043 { 6044 if('@checkDay' == '@GetString("Item.Area.Maintenance_Time_Notification_Day")' && '@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 6045 { 6046 $("#alertmain").show(); 6047 $("header").addClass("whenNoti"); 6048 $("#mainpg").addClass("whenNotiMainPg"); 6049 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6050 }else{ 6051 if(daynotibar == 'True') 6052 { 6053 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6054 { 6055 $("#alertmain").show(); 6056 $("header").addClass("whenNoti"); 6057 $("#mainpg").addClass("whenNotiMainPg"); 6058 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6059 }else{ 6060 if(notibar == 'True') 6061 { 6062 $("#alertmain").show(); 6063 $("header").addClass("whenNoti"); 6064 $("#mainpg").addClass("whenNotiMainPg"); 6065 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6066 } 6067 } 6068 }else{ 6069 if(notibar == 'True') 6070 { 6071 $("#alertmain").show(); 6072 $("header").addClass("whenNoti"); 6073 $("#mainpg").addClass("whenNotiMainPg"); 6074 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6075 } 6076 } 6077 } 6078 }else{ 6079 if('@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 6080 { 6081 $("#alertmain").show(); 6082 $("header").addClass("whenNoti"); 6083 $("#mainpg").addClass("whenNotiMainPg"); 6084 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6085 }else{ 6086 if(daynotibar == 'True') 6087 { 6088 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6089 { 6090 $("#alertmain").show(); 6091 $("header").addClass("whenNoti"); 6092 $("#mainpg").addClass("whenNotiMainPg"); 6093 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6094 }else{ 6095 if(notibar == 'True') 6096 { 6097 $("#alertmain").show(); 6098 $("header").addClass("whenNoti"); 6099 $("#mainpg").addClass("whenNotiMainPg"); 6100 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6101 } 6102 } 6103 }else{ 6104 if(notibar == 'True') 6105 { 6106 $("#alertmain").show(); 6107 $("header").addClass("whenNoti"); 6108 $("#mainpg").addClass("whenNotiMainPg"); 6109 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6110 } 6111 } 6112 } 6113 } 6114 }else{ 6115 if(daynotibar == 'True') 6116 { 6117 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6118 { 6119 $("#alertmain").show(); 6120 $("header").addClass("whenNoti"); 6121 $("#mainpg").addClass("whenNotiMainPg"); 6122 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6123 }else{ 6124 if(notibar == 'True') 6125 { 6126 $("#alertmain").show(); 6127 $("header").addClass("whenNoti"); 6128 $("#mainpg").addClass("whenNotiMainPg"); 6129 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6130 } 6131 } 6132 }else{ 6133 if(notibar == 'True') 6134 { 6135 $("#alertmain").show(); 6136 $("header").addClass("whenNoti"); 6137 $("#mainpg").addClass("whenNotiMainPg"); 6138 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6139 } 6140 } 6141 } 6142 } 6143 }else{ 6144 if(sysnotibar == 'True') 6145 { 6146 if('@serverTime' > '@startTime' && '@serverTime' < '@endTime') 6147 { 6148 $("#alertmain").show(); 6149 $("header").addClass("whenNoti"); 6150 $("#mainpg").addClass("whenNotiMainPg"); 6151 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6152 }else{ 6153 if(mainnotibar == 'True') 6154 { 6155 if('@GetString("Item.Area.Maintenance_Time_Notification_Day")' != "DAILY") 6156 { console.log("test"); 6157 if('@checkDay' == '@GetString("Item.Area.Maintenance_Time_Notification_Day")' && '@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 6158 { 6159 $("#alertmain").show(); 6160 $("header").addClass("whenNoti"); 6161 $("#mainpg").addClass("whenNotiMainPg"); 6162 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6163 }else{ 6164 if(daynotibar == 'True') 6165 { 6166 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6167 { 6168 $("#alertmain").show(); 6169 $("header").addClass("whenNoti"); 6170 $("#mainpg").addClass("whenNotiMainPg"); 6171 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6172 }else{ 6173 if(notibar == 'True') 6174 { 6175 $("#alertmain").show(); 6176 $("header").addClass("whenNoti"); 6177 $("#mainpg").addClass("whenNotiMainPg"); 6178 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6179 } 6180 } 6181 }else{ 6182 if(notibar == 'True') 6183 { 6184 $("#alertmain").show(); 6185 $("header").addClass("whenNoti"); 6186 $("#mainpg").addClass("whenNotiMainPg"); 6187 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6188 } 6189 } 6190 } 6191 }else{ 6192 if('@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 6193 { 6194 $("#alertmain").show(); 6195 $("header").addClass("whenNoti"); 6196 $("#mainpg").addClass("whenNotiMainPg"); 6197 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6198 }else{ 6199 if(notibar == 'True') 6200 { 6201 $("#alertmain").show(); 6202 $("header").addClass("whenNoti"); 6203 $("#mainpg").addClass("whenNotiMainPg"); 6204 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6205 } 6206 } 6207 } 6208 }else{ 6209 if(daynotibar == 'True') 6210 { 6211 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6212 { 6213 $("#alertmain").show(); 6214 $("header").addClass("whenNoti"); 6215 $("#mainpg").addClass("whenNotiMainPg"); 6216 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6217 } 6218 } 6219 } 6220 } 6221 }else{ 6222 if(mainnotibar == 'True') 6223 { 6224 if('@GetString("Item.Area.Maintenance_Time_Notification_Day")' != "DAILY") 6225 { 6226 if('@checkDay' == '@GetString("Item.Area.Maintenance_Time_Notification_Day")' && '@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 6227 { 6228 $("#alertmain").show(); 6229 $("header").addClass("whenNoti"); 6230 $("#mainpg").addClass("whenNotiMainPg"); 6231 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6232 }else{ 6233 if(daynotibar == 'True') 6234 { 6235 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6236 { 6237 $("#alertmain").show(); 6238 $("header").addClass("whenNoti"); 6239 $("#mainpg").addClass("whenNotiMainPg"); 6240 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6241 }else{ 6242 if(notibar == 'True') 6243 { 6244 $("#alertmain").show(); 6245 $("header").addClass("whenNoti"); 6246 $("#mainpg").addClass("whenNotiMainPg"); 6247 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6248 } 6249 } 6250 }else{ 6251 if(notibar == 'True') 6252 { 6253 $("#alertmain").show(); 6254 $("header").addClass("whenNoti"); 6255 $("#mainpg").addClass("whenNotiMainPg"); 6256 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6257 } 6258 } 6259 } 6260 }else{ 6261 if('@serverTime' > '@maintenanceTimeNotiStartTime' && '@serverTime' < '@maintenanceTimeNotiEndTime') 6262 { 6263 $("#alertmain").show(); 6264 $("header").addClass("whenNoti"); 6265 $("#mainpg").addClass("whenNotiMainPg"); 6266 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6267 }else{ 6268 if(notibar == 'True') 6269 { 6270 $("#alertmain").show(); 6271 $("header").addClass("whenNoti"); 6272 $("#mainpg").addClass("whenNotiMainPg"); 6273 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6274 } 6275 } 6276 } 6277 }else{ 6278 if(daynotibar == 'True') 6279 { 6280 if('@checkDay' == '@GetString("Item.Area.Day_Notification_Day")' && '@serverTime' > '@friStartTime' && '@serverTime' < '@friEndTime') 6281 { 6282 $("#alertmain").show(); 6283 $("header").addClass("whenNoti"); 6284 $("#mainpg").addClass("whenNotiMainPg"); 6285 document.cookie = "notikey=show; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6286 } 6287 } 6288 } 6289 } 6290 } 6291 } 6292 }); 6293 6294 function divClose() { 6295 $("#alertmain").hide(); 6296 $(".content-wrapper2").removeClass("contentwrapper2_whennoti"); 6297 $("header").removeClass("whenNoti"); 6298 $("#mainpg").removeClass("whenNotiMainPg"); 6299 $("#mainpg").addClass("Noti_Remove"); 6300 var now = new Date(); 6301 var time = now.getTime(); 6302 time += 24 * 3600 * 1000; 6303 now.setTime(time); 6304 //document.cookie = "notikey=noti; expires=Sat, 31 Dec 2050 12:00:00 UTC"; 6305 document.cookie = "PLCBlackNotiBar=show; expires=" + '@ExpDateString' + "; path=/"; 6306 } 6307 </text> 6308 } 6309 //----------------- Notification Bar End --------------------- 6310 6311 function SiteLogout() 6312 { 6313 document.cookie = "IsVIPExpire=true; expires=Sat, 31 Dec 2050 12:00:00 UTC; path=/;"; 6314 window.location.href = '/Admin/Public/ExtranetLogoff.aspx?ID=3'; 6315 } 6316 6317 function topFunction() { 6318 //document.body.scrollTop = 0; 6319 //document.documentElement.scrollTop = 0; 6320 $('html, body').animate({ scrollTop: 0 }, 'fast') 6321 } 6322 6323 window.onscroll = function() {scrollFunction()}; 6324 6325 function scrollFunction() { 6326 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 6327 document.getElementById("myBtn").style.display = "block"; 6328 } else { 6329 document.getElementById("myBtn").style.display = "none"; 6330 } 6331 } 6332 6333 //----------------- BEGIN Update VIP Info and Assigning Groups per Day ----------------- 6334 $(document).ready(function(){ 6335 if('@GetGlobalValue("Global:Extranet.UserID")' != 0) 6336 { 6337 var todayDate = new Date(); 6338 todayDate.setDate(todayDate.getDate() + 1); 6339 todayDate.setHours(0,0,0,0); 6340 var updatedVIPInfo = getCookie("UpdatedVIPInfo"); 6341 6342 if(updatedVIPInfo.length == 0 || updatedVIPInfo != todayDate) 6343 { 6344 var url = "/utilities/update-vip-info-and-assigning-groups-per-day"; 6345 $.ajax({ 6346 url: url, 6347 dataType: "text", 6348 type: 'GET', 6349 success: function(data){ 6350 if(data.includes("true")) 6351 { 6352 document.cookie = "UpdatedVIPInfo=" + todayDate + "; expires=" + todayDate; 6353 } 6354 }, 6355 error: function(jqXHR, textStatus, errorThrown) { 6356 console.log(textStatus + ': ' + errorThrown); 6357 }, 6358 cache: true 6359 }); 6360 } 6361 } 6362 }); 6363 //----------------- END Update VIP Info and Assigning Groups per Day ----------------- 6364 6365 //------------------------------------------------loader---------------------- 6366 $('#applyFilters').click(function(){ 6367 $('#loader').show();$('.blockOverlay').remove(); 6368 }); 6369 $('#submitSearch').click(function(){ 6370 $('#loader').show(); $('.blockOverlay').remove(); 6371 }); 6372 $('#searchForm').submit(function(){ 6373 $('#loader').show(); $('.blockOverlay').remove(); 6374 }); 6375 $('#searchForm1').submit(function(){ 6376 $('#loader').show(); $('.blockOverlay').remove(); 6377 }); 6378 //------------------------------------------------Minicart fix---------------------- 6379 $('body').click(function(){ 6380 if($('.cart-info-box').is(':visible')){ 6381 $('.cart-info-box').slideUp(); 6382 } 6383 }); 6384 </script> 6385 <script> 6386 $(document).ready(function() { 6387 setTimeout(function(){ 6388 $(".MyCustomSearchBox").attr("id","search"); 6389 }, 2000); 6390 }); 6391 </script> 6392