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