Kit Cat Malaysia | Pet Lovers Centre
| 0
|

 

Kit Cat

 

In 2013, Kit Cat was founded by two brothers who shared the same passion towards animal care and welfare. They dedicated their time to create a wide collection of products for cats from dry and wet food and cat treats to even cat litter. To ensure the exceptional quality in their cat food and treats, only human grade ingredients are used. This means that all products have gone through many more stringent tests and detailed inspections, thus qualifying them to be of high quality.

As for their cat litter, they come in many different materials to suit your cat’s needs and preferences. Beneficial properties include excellent odour control, superior absorption, being eco-friendly and non-toxic. Their featured product would be the Kit Cat Soya Clump which is flushable, easy to scoop and extremely absorptive. This is made with natural soybean and is safe for both you and your cat.

With these highly-reviewed cat food and litter, Kit Cat is definitely the brand for your feline companion!

 

Error executing template "Designs/PLC/eCom/Productlist/PLCProductList_Without_BrandFilter.cshtml"
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at CompiledRazorTemplates.Dynamic.RazorEngine_45fc5fbb2afd43cfbe65679007447791.<>c__DisplayClass2_2.b__0(TextWriter __razor_helper_writer) in E:\website\PLCMalaysia\Solution\Files\Templates\Designs\PLC\eCom\Productlist\PLCProductList_Without_BrandFilter.cshtml:line 436
   at CompiledRazorTemplates.Dynamic.RazorEngine_45fc5fbb2afd43cfbe65679007447791.Execute() in E:\website\PLCMalaysia\Solution\Files\Templates\Designs\PLC\eCom\Productlist\PLCProductList_Without_BrandFilter.cshtml:line 2094
   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 Newtonsoft.Json.Linq; 2 @using System.Web 3 4 @using System.Text.RegularExpressions 5 @using System.Web 6 7 8 @functions{ 9 public class WrapMethods 10 { 11 12 13 //Gets the contrasting color 14 public static string getContrastYIQ(string hexcolor) 15 { 16 if (hexcolor != "") 17 { 18 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 19 20 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 21 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 22 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 23 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 24 25 if (yiq >= 128) 26 { 27 return "black"; 28 } 29 else 30 { 31 return "white"; 32 } 33 } 34 else 35 { 36 return "black"; 37 } 38 } 39 40 41 //Truncate text 42 public static string Truncate (string value, int count, bool strip=true) 43 { 44 if (strip == true){ 45 value = StripHtmlTagByCharArray(value); 46 } 47 48 if (value.Length > count) 49 { 50 value = value.Substring(0, count - 1) + "..."; 51 } 52 53 return value; 54 } 55 56 57 //Strip text from HTML 58 public static string StripHtmlTagByCharArray(string htmlString) 59 { 60 char[] array = new char[htmlString.Length]; 61 int arrayIndex = 0; 62 bool inside = false; 63 64 for (int i = 0; i < htmlString.Length; i++) 65 { 66 char let = htmlString[i]; 67 if (let == '<') 68 { 69 inside = true; 70 continue; 71 } 72 if (let == '>') 73 { 74 inside = false; 75 continue; 76 } 77 if (!inside) 78 { 79 array[arrayIndex] = let; 80 arrayIndex++; 81 } 82 } 83 return new string(array, 0, arrayIndex); 84 } 85 86 //Make the correct count of columns 87 public static string ColumnMaker(int Col, string ScreenSize) 88 { 89 string Columns = ""; 90 91 switch (Col) 92 { 93 case 1: 94 Columns = "col-"+ScreenSize+"-12"; 95 break; 96 97 case 2: 98 Columns = "col-"+ScreenSize+"-6"; 99 break; 100 101 case 3: 102 Columns = "col-"+ScreenSize+"-4"; 103 break; 104 105 case 4: 106 Columns = "col-"+ScreenSize+"-3"; 107 break; 108 109 default: 110 Columns = "col-"+ScreenSize+"-3"; 111 break; 112 } 113 114 return Columns; 115 } 116 117 118 private string Custom(string firstoption, string secondoption) 119 { 120 if (firstoption == "custom") 121 { 122 return secondoption; 123 } 124 else 125 { 126 return firstoption; 127 } 128 } 129 } 130 } 131 @using DWAPAC.PLC.Services 132 @using Dynamicweb.Security.UserManagement.Common.CustomFields 133 134 135 <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> 136 <script type="text/javascript" src="/Files/Templates/Designs/PLC/eCom/ProductList/Compare.js"></script> 137 <style> 138 .ui-dialog-titlebar, .ui-dialog-buttonset button{ 139 background:#662010; 140 color: #FFF; 141 } 142 143 .clearfix{ 144 margin-bottom: -10px !important; 145 } 146 147 #myBtn { 148 display: none; 149 position: fixed; 150 bottom: 55px; 151 right: 9%; 152 z-index: 99; 153 font-size: 18px; 154 border: none; 155 outline: none; 156 color: white; 157 cursor: pointer; 158 padding: 15px; 159 border-radius: 4px; 160 background-image: url(/Files/Templates/Designs/PLC/assets/images/up_arrow_icon.png); 161 background-size: 35px; 162 width: 35px; 163 height: 35px; 164 } 165 166 .product-box .prod-img img { 167 display: block; 168 margin: 0px auto; 169 } 170 .prod-pbox{ 171 height:115px; 172 } 173 /*::before { 174 padding-top:0.5em; 175 }commented out By AKS due to menu collapsing problem */ 176 input[type=number]::-webkit-inner-spin-button, 177 input[type=number]::-webkit-outer-spin-button { 178 -webkit-appearance: none; 179 -moz-appearance: none; 180 appearance: none; 181 margin: 0; 182 } 183 @if(GetInteger("Ecom:ProductList.PageProdCnt") > 0) 184 { 185 <text> 186 .btn-addto-cart { 187 margin-bottom:5px; 188 background-color: #ad2d14; 189 height:38px; 190 border-radius: 3px; 191 } 192 .btn-addto-cart:hover { 193 //background-color: #500d00; 194 } 195 .glyphicon-minus, .glyphicon-plus { 196 cursor: pointer; 197 color: #ffffff; 198 } 199 </text> 200 if(System.Web.HttpContext.Current.Request.Browser.Type.ToUpper().Contains("SAFARI")) 201 { 202 <text> 203 .btn-addto-cart div a, .btn-addto-cart a { 204 line-height: 36px; 205 } 206 #addtocartLink { 207 margin-top: 30px !important; 208 } 209 @@media screen (max-width: 340px){ 210 .btn-addto-cart div a, .btn-addto-cart a { 211 padding-top: 0px; 212 } 213 } 214 .fixsize { 215 margin-top: 120px; 216 } 217 </text> 218 } 219 else 220 { 221 222 } 223 } 224 else 225 { 226 if(System.Web.HttpContext.Current.Request.Browser.Type.ToUpper().Contains("SAFARI")) 227 { 228 <text> 229 .btn-addto-cart div a, .btn-addto-cart a { 230 line-height: 36px; 231 } 232 #addtocartLink { 233 margin-top: 30px !important; 234 } 235 @@media screen (max-width: 340px){ 236 .btn-addto-cart div a, .btn-addto-cart a { 237 padding-top: 0px; 238 } 239 } 240 </text> 241 } 242 else 243 { 244 245 } 246 } 247 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 248 .mblAddTo { 249 padding-left:30px !important; 250 } 251 } 252 @@media screen and (max-width: 700px) and (min-width: 375px) and (max-height: 700px) { 253 .mblpromologo { 254 padding-bottom:2px; 255 } 256 } 257 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 258 .mblpromologo1 { 259 padding-bottom:-5px; 260 } 261 } 262 @@media screen and (max-width: 800px) and (min-width: 768px) and (max-height: 1024px) { 263 .mblPromologoipad { 264 padding-bottom:5px; 265 } 266 } 267 @@media screen and (max-width: 1024px) and (min-width: 768px) and (max-height: 800px) { 268 .mblPromologoipad1 { 269 padding-bottom:5px; 270 } 271 } 272 @@media screen and (max-width: 800px) and (min-width: 760px) and (max-height: 1200px) { 273 .mblPromologolap { 274 padding-bottom:2px; 275 } 276 } 277 278 279 @@media screen and (max-width: 800px) and (min-width: 700px) and (max-height: 1030px) { 280 .mblAddTo { 281 padding-left:70px !important; 282 } 283 } 284 285 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 286 .btn-sale{ 287 position: absolute; 288 z-index: 10; 289 right: 10px; 290 width: 80px; 291 padding-top: 8px !important; 292 } 293 } 294 </style> 295 <script> 296 var items = []; 297 </script> 298 299 @functions 300 { 301 public class SortInPage 302 { 303 public string StockStatus { get; set; } 304 public int StockStatusSortValue { get; set; } 305 public string ProductId { get; set; } 306 public string BrandName { get; set; } 307 public int BestSelling { get; set; } 308 public double TotalAmountSold { get; set; } 309 public double Price { get; set; } 310 public bool NewArrival { get; set; } 311 } 312 } 313 314 @helper GetProductList(dynamic ProductLoop,bool birthday,string becomeAMemberPrice, int ColMD=3, int ColSM=3, int ColXS=1) 315 { 316 var Loop = GetLoop("Products").ToList(); 317 List<SortInPage> SortInPageList = new List<SortInPage>(); 318 string SortByValue = "TotalAmtSold".ToUpper(); 319 if (!string.IsNullOrEmpty(HttpContext.Current.Request["SortOrder"])) 320 { 321 SortByValue = Convert.ToString(HttpContext.Current.Request["SortBy"]).ToUpper(); 322 if (SortByValue.Contains("NewArrivals".ToUpper())) 323 { 324 SortByValue = "NewArrivals".ToUpper(); 325 } 326 } 327 string SortOrderValue = "Asc".ToUpper(); 328 if (!string.IsNullOrEmpty(HttpContext.Current.Request["SortOrder"])) 329 { 330 SortOrderValue = Convert.ToString(HttpContext.Current.Request["SortOrder"]).ToUpper(); 331 if (SortOrderValue.Contains("Desc".ToUpper())) 332 { 333 SortOrderValue = "Desc".ToUpper(); 334 } 335 } 336 337 var birthday0 = false; 338 bool showBirthdayPrice = false; 339 bool userHasVIPCard = false; 340 bool userHasValidVipCard = false; 341 DateTime expDate = new DateTime(); 342 DateTime today = DateTime.Now; 343 344 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 345 { 346 int i = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID")); 347 Dynamicweb.Security.UserManagement.User u = Dynamicweb.Security.UserManagement.User.GetUserByID(i); 348 349 foreach (CustomFieldValue val in u.CustomFieldValues) 350 { 351 CustomField field = val.CustomField; 352 string fieldName = field.Name; 353 354 if(fieldName == "DOB") 355 { 356 DateTime bDay = new DateTime(); 357 if(val.Value != null) 358 { 359 bDay = (DateTime)val.Value; 360 if(bDay.Month == today.Month) 361 { 362 birthday0 = true; 363 } 364 } 365 } 366 if(fieldName=="ExpryDate") 367 { 368 expDate=(DateTime)val.Value; 369 } 370 371 switch (fieldName.ToUpper()) 372 { 373 case "VIP CARD NO": 374 userHasVIPCard = !string.IsNullOrEmpty((val.Value).ToString()); 375 break; 376 case "EXPRYDATE": 377 userHasValidVipCard = expDate.Date <= today.Date; 378 break; 379 default: 380 break; 381 } 382 } 383 } 384 showBirthdayPrice = birthday0 && userHasVIPCard && userHasValidVipCard; 385 386 string pathproduct="/Files/Images/plc"; 387 string imgpath="/Files/Images/Ecom/Products/"; 388 string imgpathpng=""; 389 string pidString = ""; 390 var loopCounter = 0; 391 List<string>statusList = new List<string>(); 392 393 foreach(LoopItem product1 in Loop) 394 { 395 string pid1 = product1.GetString("Ecom:Product.ID"); 396 pidString += "[" + pid1 + "],"; 397 } 398 pidString = pidString.Remove(pidString.Length - 1); 399 pidString = "{" + pidString; 400 pidString = pidString + "}"; 401 402 var response = WebServices.getProductMultiStatusAdvServiceResponse(pidString); 403 404 var responseSplit = response.Split(';'); 405 if (responseSplit[0].Contains("500")) 406 { 407 <style> 408 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 409 .mainImg{ 410 padding-left: 85px; 411 } 412 } 413 414 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 415 .mainImg{ 416 padding-left: 222px; 417 } 418 } 419 </style> 420 if(Pageview.Device.ToString().ToUpper() == "MOBILE") 421 { 422 <div style="padding-left: 60px;" name="under_maintenance"> 423 <img src="/Files/Templates/Designs/PLC/assets/images/under_maintenance_icon.png" class="mainImg" alt="Under Maintenance"><br><br> 424 <span style="font-size: 20px;font-weight: 700;">Sorry, we are facing a temporary server error. Please try again later.</span> 425 </div> 426 }else if(Pageview.Device.ToString().ToUpper() == "TABLET") 427 { 428 <div name="under_maintenance"><img src="/Files/Templates/Designs/PLC/assets/images/under_maintenance_icon.png" alt="Under Maintenance"><span style="padding-left: 15px; font-size: 20px; font-weight: 700;">Sorry, we are facing a temporary server error. Please try again later.</span></div> 429 }else{ 430 <div style="padding-left: 60px;" name="under_maintenance"><img src="/Files/Templates/Designs/PLC/assets/images/under_maintenance_icon.png" alt="Under Maintenance"><span style="padding-left: 15px; font-size: 20px; font-weight: 700;">Sorry, we are facing a temporary server error. Please try again later.</span></div> 431 } 432 return; 433 } 434 435 436 string productResponse = responseSplit[2].Split('{')[1].Replace("}", ""); 437 438 var singleProduct = productResponse.Split(','); 439 for (var i = 0; i < singleProduct.Length; i++) 440 { 441 string string1 = singleProduct[i].Remove(singleProduct[i].Length - 1).Remove(0, 1); 442 statusList.Add(string1.Split(':')[1]); 443 444 SortInPage sortInPage = new SortInPage(); 445 sortInPage.StockStatus = Convert.ToString(string1.Split(':').LastOrDefault()); 446 switch (sortInPage.StockStatus.ToUpper()) 447 { 448 case "AVAILABLE": 449 sortInPage.StockStatusSortValue = 1; 450 break; 451 case "IN STOCK": 452 sortInPage.StockStatusSortValue = 1; 453 if (SortByValue.ToUpper() == "INTERNETPRICE") 454 { 455 sortInPage.StockStatusSortValue = 2; 456 } 457 break; 458 case "SPECIAL ORDER": 459 sortInPage.StockStatusSortValue = 3; 460 break; 461 default: 462 sortInPage.StockStatusSortValue = 0; 463 break; 464 } 465 466 sortInPage.ProductId = Convert.ToString(string1.Split(':').FirstOrDefault()); 467 468 var sortInPageProduct = Loop.FirstOrDefault(x => x.GetString("Ecom:Product.ID") == sortInPage.ProductId); 469 470 sortInPage.BrandName = sortInPageProduct.GetString("Ecom:Product:Field.ProductBrand"); 471 sortInPage.BestSelling = sortInPageProduct.GetInteger("Ecom:Product:Field.BestSelling.Value.Clean"); 472 sortInPage.Price = Math.Floor((sortInPageProduct.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200; 473 //sortInPage.TotalAmountSold = Dynamicweb.Core.Converter.ToDouble(Dynamicweb.Ecommerce.Products.Product.GetProductById(sortInPage.ProductId).ProductFieldValues.GetProductFieldValue("BestSellingAmount").Value); 474 sortInPage.NewArrival = sortInPageProduct.GetBoolean("Ecom:Product:Field.NewArrivals.Value.Clean"); 475 SortInPageList.Add(sortInPage); 476 } 477 478 if (SortOrderValue == "DESC") 479 { 480 switch (SortByValue.ToUpper()) 481 { 482 case "TOTALAMTSOLD": 483 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ToList(); 484 break; 485 case "BRAND": 486 SortInPageList = SortInPageList.OrderByDescending(x => x.BrandName).ThenBy(x => x.StockStatusSortValue).ToList(); 487 break; 488 case "INTERNETPRICE": 489 SortInPageList = SortInPageList.OrderByDescending(x => x.Price).ThenBy(x => x.StockStatusSortValue).ToList(); 490 break; 491 case "AUTOID": 492 //SortInPageList = SortInPageList.OrderByDescending(x => x.NewArrival).ThenBy(x => x.StockStatusSortValue).ToList(); 493 ///Shawn Requested on 06-January-2023 494 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ToList(); 495 break; 496 } 497 } 498 else 499 { 500 switch (SortByValue.ToUpper()) 501 { 502 case "TOTALAMTSOLD": 503 SortInPageList = SortInPageList.OrderByDescending(x => x.BestSelling).ThenBy(x => x.StockStatusSortValue).ToList(); 504 break; 505 case "BRAND": 506 SortInPageList = SortInPageList.OrderBy(x => x.BrandName).ThenBy(x => x.StockStatusSortValue).ToList(); 507 break; 508 case "INTERNETPRICE": 509 SortInPageList = SortInPageList.OrderBy(x => x.Price).ThenBy(x => x.StockStatusSortValue).ToList(); 510 break; 511 case "AUTOID": 512 //SortInPageList = SortInPageList.OrderByDescending(x => x.NewArrival).ThenBy(x => x.StockStatusSortValue).ToList(); 513 ///Shawn Requested on 06-January-2023 514 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ToList(); 515 break; 516 } 517 } 518 519 if (responseSplit[0].Contains("200")) 520 { 521 foreach (LoopItem product1 in Loop) 522 { 523 var sellingPrice1 = Math.Floor((product1.GetDouble("Ecom:Product:Field.ProductSPrice")) * 1000 / 5) / 200; 524 var internetPrice1 = Math.Floor((product1.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200; 525 <script> 526 items.push({ 527 'item_id': "@product1.GetString("Ecom:Product.ID")", 528 'item_name': "@product1.GetString("Ecom:Product.Name")", 529 'currency': "@product1.GetString("Ecom:Product.Price.Currency.Code")", 530 'discount': @string.Format("{0:0.00}", sellingPrice1-internetPrice1), 531 'index': 0, 532 'item_brand': "@product1.GetString("Ecom:Product:Field.ProductBrand")", 533 'item_category': "@product1.GetString("Ecom:Product:Field.FirstCategory")", 534 'item_category2': "@product1.GetString("Ecom:Product:Field.SecondCategory")", 535 'item_category3': "@product1.GetString("Ecom:Product:Field.ThirdCategory")", 536 'item_variant1': "@product1.GetString("Ecom:Product:Field.Flavour.Value")", 537 'item_variant2': "@product1.GetString("Ecom:Product:Field.Color.Value")", 538 'item_variant3': "@product1.GetString("Ecom:Product:Field.Size.Value")", 539 'price': @sellingPrice1, 540 'quantity': 1 541 }) 542 </script> 543 } 544 foreach (SortInPage sortInPage in SortInPageList) 545 { 546 var product = Loop.FirstOrDefault(x => x.GetString("Ecom:Product.ID") == sortInPage.ProductId); 547 548 string prodGroupsforFBpixel = ""; 549 prodGroupsforFBpixel = string.IsNullOrEmpty(product.GetString("Department")) ? product.GetString("Ecom:Product:Field.FirstCategory") : product.GetString("Department"); 550 prodGroupsforFBpixel += "," + (string.IsNullOrEmpty(product.GetString("Category")) ? product.GetString("Ecom:Product:Field.SecondCategory") : product.GetString("Category")); 551 prodGroupsforFBpixel += "," + (string.IsNullOrEmpty(product.GetString("CategoryDetails")) ? product.GetString("Ecom:Product:Field.ThirdCategory") : product.GetString("CategoryDetails")); 552 string pid = product.GetString("Ecom:Product.ID"); 553 554 //Promotion 555 556 string promoName = ""; 557 string promoD = ""; 558 List<string> productPromoNames=new List<string>(); 559 var promosqlString = "SELECT ED.DISCOUNTNAME,ED.DISCOUNTDESCRIPTION FROM EcomDiscountExtensions EDEs INNER JOIN EcomDiscount ED ON EDEs.DISCOUNTID = ED.DISCOUNTID WHERE EDEs.DISCOUNTDISPLAYATPDP = 'True' and ED.DiscountActive = 'True' and (GetDate() BETWEEN ED.DiscountValidFrom AND ED.DiscountValidTo) and ED.DISCOUNTPRODUCTSANDGROUPS LIKE '%p:" + pid + ",%'"; 560 using(System.Data.IDataReader promoNameReder = Dynamicweb.Data.Database.CreateDataReader(promosqlString)) 561 { 562 while (promoNameReder.Read()) 563 { 564 promoName += promoNameReder["DISCOUNTNAME"].ToString(); 565 promoD += promoNameReder["DISCOUNTDESCRIPTION"].ToString() + "<br>"; 566 } 567 } 568 string Image = product.GetString("Ecom:Product.ImageSmall.Default.Clean"); 569 string Link = product.GetString("Ecom:Product.Link.Clean"); 570 string GroupLink = product.GetString("Ecom:Product.LinkGroup.Clean"); 571 string Name = product.GetString("Ecom:Product.Name"); 572 Name = Name.Replace("\"","&#10078;"); 573 GroupLink = "Default.aspx?ID=298&ProductID=" + pid; 574 string Number = product.GetString("Ecom:Product.Number"); 575 string ProdBrand = product.GetString("Ecom:Product:Field.ProductBrand"); 576 imgpath = "/Files/Images/Ecom/Products/" + pid + ".jpg"; 577 imgpathpng="/Files/Images/Ecom/Products/" + pid + ".png"; 578 var absolutePathjpg = System.Web.HttpContext.Current.Server.MapPath("~/"+ imgpath); 579 var absolutePathpng = System.Web.HttpContext.Current.Server.MapPath("~/"+ imgpathpng); 580 if(System.IO.File.Exists(absolutePathjpg)) 581 { 582 Image=imgpath; 583 } 584 else if(System.IO.File.Exists(absolutePathpng)) 585 { 586 Image=imgpathpng; 587 } 588 589 string Description = product.GetString("Ecom:Product.ShortDescription"); 590 string Discount = product.GetString("Ecom:Product.Discount.Price"); 591 string Price = product.GetString("Ecom:Product.Price"); 592 string CurrencyCode = product.GetString("Ecom:Product.Price.Currency.Code"); 593 //string Promotion=product.GetString("Ecom:Product.Price"); 594 string Active=product.GetString("Ecom:Product.IsActive"); 595 var Rating=product.GetDouble("Ecom:Product.Rating"); 596 597 var sellingPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSPrice"))*1000/5)/200; 598 var internetPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSInternetPriceBefTAX.Value"))*1000/5)/200; 599 var price=9.95; 600 601 if(price==product.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) 602 { 603 internetPrice= product.GetDouble("Ecom:Product:Field.ProductSInternetPrice"); 604 } 605 Boolean inventoryDiscount = product.GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag"); 606 var discountPercentage = product.GetDouble("Ecom:Product:Field.ProductInventoryDiscount"); 607 var birthdayPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSBirthdayPrice"))*1000/5)/200; 608 var memberPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSMemberPrice"))*1000/5)/200; 609 var disable=product.GetBoolean("Ecom:Product:Field.Disable"); 610 var promotion=0.00; 611 var discountType=""; 612 var promoNames = ""; 613 var testingNames = ""; 614 615 string firstcategory = product.GetString("Ecom:Product:Field.FirstCategory"); 616 string secondcategory = product.GetString("Ecom:Product:Field.SecondCategory"); 617 string thirdcategory = product.GetString("Ecom:Product:Field.ThirdCategory"); 618 string productSize = product.GetString("Ecom:Product:Field.Size.Value"); 619 string productFlavour = product.GetString("Ecom:Product:Field.Flavour.Value"); 620 string productColor = product.GetString("Ecom:Product:Field.Color.Value"); 621 622 foreach(var promoItem in product.GetLoop("AllDiscounts")) 623 { 624 promoNames += promoItem.GetString("Ecom:AllDiscounts.Discount.Name") +"<br>"; 625 } 626 foreach (LoopItem item in product.GetLoop("ProductDiscounts")) 627 { 628 629 if(item.GetString("Ecom:Product.Discount.Type")=="PERCENT") 630 { 631 discountType="PERCENT"; 632 promotion=item.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted"); 633 } 634 else 635 { 636 discountType="AMOUNT"; 637 promotion=item.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted"); 638 } 639 } 640 if(pid != "PROD1" && pid !="PROD2") 641 { 642 <!--product start--> 643 if(!disable) 644 { 645 <div class="product-box col-1-3 tab-col-1-2 mobile-col-1-1" id="get_@pid"> 646 <div class="prod-img"> 647 @if(promotion != 0) 648 { 649 if(discountType == "PERCENT") 650 { 651 <div class="ribbon-P"><span>@promotion% Off</span></div> 652 } 653 else 654 { 655 <div class="ribbon-P"><span>@product.GetString("Ecom:Product.Currency.Symbol")@promotion Off</span></div> 656 } 657 } 658 else 659 { 660 //add ERP discount ribbon 661 if(inventoryDiscount) 662 { 663 if(discountPercentage != 0) 664 { 665 <div class="ribbon-D"><span>@discountPercentage% Off</span></div> 666 } 667 } 668 } 669 <a href="@GroupLink" title="@Name" onclick='selectItem("@pid", "@Name", "@CurrencyCode", @string.Format("{0:0.00}", sellingPrice-internetPrice), "@product.GetString("Ecom:Product:Field.ProductBrand")", "@firstcategory", "@secondcategory", "@thirdcategory", "@productFlavour", "@productColor", "@productSize", @sellingPrice)'> 670 <img src="/Admin/Public/Getimage.ashx?width=147&amp;compression=60&amp;Crop=5&amp;image=@Image" class="img-responsive" id="img_@pid" alt="@Name @Number" title="@Name @Number"> 671 </a> 672 </div> 673 <p class="prod-name"><span class="brand-name">@ProdBrand</span> 674 <br/> @product.GetString("Ecom:Product.Name") 675 </p> 676 677 678 @if(promoName != "") 679 { 680 <span class="top tipso_style" data-tipso='@promoName.Replace("\"", "&quot;").Replace("'","&#39;").Replace("<","&lt;").Replace(">","&gt;")'> 681 @if(GetGlobalValue("Global:Extranet.UserName")!= ""){ 682 <div style="background: linear-gradient(to right, #ec5a11 , #f4a413 ); text-align: center; font-size: medium; color: white; font-weight: 600; margin-bottom: inherit;">PROMOTION</div> 683 684 685 } 686 else{ 687 688 <div class="mblpromologo mblpromologo1 mblPromologoipad mblPromologoipad1 mblPromologolap" style="background: linear-gradient(to right, #ec5a11 , #f4a413 ); text-align: center; font-size: medium; color: white; font-weight: 600; margin-bottom: inherit;"><img src="/Files/Templates/Designs/PLC/assets/images/login_promo.png" style="padding-bottom:2px;"> LOGIN PROMO</div> 689 690 } 691 </span> 692 }else{ 693 <div style="background: white; text-align: center; font-size: medium; color: white; font-weight: 600; margin-bottom: inherit; padding-bottom: 3px;"></div> 694 } 695 <div class="prod-star" style="display:none;"> 696 @if(@Rating == 0) 697 { 698 <label class = "starUnselected"></label> 699 <label class = "starUnselected"></label> 700 <label class = "starUnselected"></label> 701 <label class = "starUnselected"></label> 702 <label class = "starUnselected"></label> 703 } 704 @if(Rating % 1 != 0) 705 { 706 for(var i = 1; i < @Rating; i++) 707 { 708 <label class = "starSelected"></label> 709 } 710 <label class = "starSelected half"></label> 711 } 712 else 713 { 714 for(var i = 1; i < @Rating+1; i++) 715 { 716 <label class = "starSelected"></label> 717 } 718 } 719 720 721 </div> 722 <div class="prod-pbox"> 723 @if(inventoryDiscount) 724 { 725 if(sellingPrice != internetPrice) 726 { 727 <div class="prod-price"> 728 <p class="op">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice)</p> 729 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", internetPrice)</p> 730 <p class="save-price">Save @product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice-internetPrice)</p> 731 </div> 732 } 733 else if(sellingPrice == internetPrice) 734 { 735 <div class="prod-price"> 736 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice)</p> 737 </div> 738 } 739 <div style="height:65px;">@* Add gap to fix aligment *@ 740 <div class="member-price"></div> 741 </div> 742 } 743 @*inventoryDiscount false*@ 744 else 745 { 746 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 747 { 748 @*<div class="prod-price"> 749 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice)</p> 750 </div>*@ 751 752 if(sellingPrice != internetPrice) 753 { 754 <div class="prod-price"> 755 <p class="op">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice)</p> 756 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", internetPrice)</p> 757 <p class="save-price">Save @product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice-internetPrice)</p> 758 </div> 759 } 760 else if(sellingPrice == internetPrice) 761 { 762 <div class="prod-price"> 763 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice)</p> 764 </div> 765 } 766 767 <div style="height:65px;"> 768 <div class="member-price"> 769 @if(memberPrice > 0) 770 { 771 <div id="proId" style="display:none"></div> 772 <div class="title" id="memberId">VIP Member&nbsp; 773 <span class="top tipso_style" data-tipso="Become a VIP member for only @product.GetString("Ecom:Product.Currency.Symbol")11.00 & log in to your web account to enjoy this price"> 774 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""></span> 775 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", memberPrice)</p> 776 </div> 777 <div class="title" id="birthdayId" >VIP Birthday&nbsp; 778 <span class="top tipso_style" data-tipso="Become a VIP member for only @product.GetString("Ecom:Product.Currency.Symbol")11.00 & log in to your web account to enjoy this price on your birthday month"> 779 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"></span> 780 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", birthdayPrice)</p> 781 </div> 782 783 } 784 @if(birthdayPrice > 0 && showBirthdayPrice) 785 { 786 <div class="title">VIP Birthday&nbsp; 787 <span class="top tipso_style" data-tipso="Become a VIP member for only @product.GetString("Ecom:Product.Currency.Symbol")11.00 & enjoy this price on your birthday month "> 788 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"></span> 789 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", birthdayPrice)</p> 790 </div> 791 } 792 </div> 793 </div> 794 } 795 else if(Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 796 { 797 @*<div class="prod-price"> 798 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", internetPrice)</p> 799 </div>*@ 800 801 if(sellingPrice != internetPrice) 802 { 803 <div class="prod-price"> 804 <p class="op">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice)</p> 805 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", internetPrice)</p> 806 <p class="save-price">Save @product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice-internetPrice)</p> 807 </div> 808 } 809 else if(sellingPrice == internetPrice) 810 { 811 <div class="prod-price"> 812 <p class="np">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", sellingPrice)</p> 813 </div> 814 } 815 816 if(userHasVIPCard) 817 { 818 if(userHasValidVipCard) 819 { 820 <div id="proId" style="display:none"></div> 821 <div style="height:65px;"> 822 <div class="member-price"> 823 <div class="title" id="memberId" >VIP Member&nbsp; 824 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price"> 825 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""></span> 826 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", memberPrice)</p> 827 </div> 828 <div class="title" id="birthdayId">VIP Birthday&nbsp; 829 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month"> 830 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"></span> 831 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", birthdayPrice)</p> 832 </div> 833 </div> 834 </div> 835 } 836 837 if(!birthday) 838 { 839 if(!userHasValidVipCard) 840 { 841 <div style="height:65px;"> 842 <div class="member-price"> 843 @if(memberPrice > 0) 844 { 845 <div class="title" id="memberId">VIP Member&nbsp; 846 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price " > 847 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"></span> 848 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", memberPrice)</p> 849 </div> 850 } 851 </div> 852 </div> 853 } 854 } 855 else if (birthday) 856 { 857 if(!userHasValidVipCard) 858 { 859 <div style="height:65px;"> 860 <div class="member-price"> 861 <div class="title" id="birthdayId">VIP Birthday&nbsp; 862 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month"> 863 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon_info"></span> 864 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", birthdayPrice)</p> 865 </div> 866 </div> 867 </div> 868 } 869 } 870 } 871 else 872 { 873 <div id="proId" style="display:none"></div> 874 <div style="height:65px;"> 875 <div class="member-price"> 876 <div class="title" id="memberId" >VIP Member&nbsp; 877 <span class="top tipso_style" data-tipso="Become a VIP member for only @product.GetString("Ecom:Product.Currency.Symbol")11.00 & log in to your web account to enjoy this price "> 878 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""></span> 879 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", memberPrice)</p> 880 </div> 881 <div class="title" id="birthdayId">VIP Birthday&nbsp; 882 <span class="top tipso_style" data-tipso="Become a VIP member for only @product.GetString("Ecom:Product.Currency.Symbol")11.00 & log in to your web account to enjoy this price on your birthday month"> 883 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"></span> 884 <p class="price">@product.GetString("Ecom:Product.Currency.Symbol")@string.Format("{0:0.00}", birthdayPrice)</p> 885 </div> 886 </div> 887 </div> 888 } 889 } 890 } 891 </div> 892 <!-------------------------------------------------------End Pricing----------------------------------------------------------------------------------------------------> 893 <hr> 894 @{ string tipsoMessage = "no Message Available!"; } 895 @if(product.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 896 { 897 tipsoMessage = "In Store Only"; 898 <ul class="info" style="line-height: 31px;"> 899 <li>*AVAILABLE IN STORE ONLY</li> 900 </ul> 901 <ul class="info"> 902 <li style="height:17px;"> </li> 903 </ul> 904 } 905 else 906 { 907 tipsoMessage = statusList[loopCounter]; 908 switch (statusList[loopCounter].ToUpper()) 909 { 910 case "AVAILABLE" : 911 tipsoMessage = "Stocks are available, with the earliest delivery within 3 working days from the date of order."; 912 break; 913 case "SPECIAL ORDER" : 914 tipsoMessage = "We will check physical stocks availability before confirming your order."; 915 break; 916 case "IN STOCK" : 917 tipsoMessage = "Stocks are available at our retail stores for delivery within 7 working days upon receipt of payment."; 918 break; 919 default : 920 tipsoMessage = "no Message Available!"; 921 break; 922 } 923 tipsoMessage = tipsoMessage.Replace("\'", "&#39;"); 924 <ul class="info"> 925 <li>*@statusList[loopCounter] <span class="top tipso_style" data-tipso='@tipsoMessage' style="vertical-align: text-bottom;"> 926 <img src="@pathproduct/images/icon_question_mark.png" alt="icon info" title="" style="width:10px;"> 927 </span></li> 928 </ul> 929 } 930 @if(!product.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 931 { 932 <div class="btn-addto-cart smalldev"> 933 <div class="col-md-6 col-sm-6 col-xs-6" style="padding: 5px 0px; border-radius: 3px 0px 0px 3px; text-align: center;display: table-cell;vertical-align: middle;"> 934 <span onclick='QtyControlBtn("quantityInput_@pid", "-");' type="button" data-value="-1" data-target="#spinner2" data-toggle="spinner"> 935 <span class="glyphicon glyphicon-minus"></span> 936 </span> 937 <input type="number" onkeydown='QtyKeyControl("quantityInput_@pid", "keydown");' onkeyup='QtyKeyControl("quantityInput_@pid", "keyup");' onfocusout='return QtyKeyControl("quantityInput_@pid", "focusout");' class="selectbox-qty" style="width:50px;text-align:center;" id="quantityInput_@pid" value="1" min="1" max="9999"> 938 <span onclick='QtyControlBtn("quantityInput_@pid", "+");' type="button" data-value="2" data-target="#spinner2" data-toggle="spinner"> 939 <span class="glyphicon glyphicon-plus"></span> 940 </span> 941 </div> 942 <div class="col-md-6 col-sm-6 col-xs-6 mblAddTo" style="padding: 1px 5px;display: table-cell;"> 943 <a onclick='ShowAddedItem_Then_AjaxAddToCart(" ", "@pid", "@ProdBrand.Replace(" & ", " myAND ")", "@product.GetString("Ecom:Product.Name").Replace(" & ", " myAND ").Replace("\"", "")", "@product.GetString("Ecom:Product.Price.PriceWithVAT")", "@product.GetString("Ecom:Product.Price.Currency.Symbol")", $("#quantityInput_" + "@pid").val(), true, "&cartcmd=add&productid=@pid&quantity=","@Number","@CurrencyCode","@prodGroupsforFBpixel","@productSize","@productFlavour","@productColor");' href='javascript:void(0)' style="border-radius: 0px 3px 3px 0px;"> 944 <i class="fa fa-shopping-cart"></i> 945 Add to cart 946 </a> 947 </div> 948 </div> 949 } 950 else 951 { 952 <div class="btn-addto-cart" style="margin-bottom:5px; cursor:not-allowed; display:none;"> 953 <a ><i class="fa fa-shopping-cart"></i> In Store Only </a> 954 </div> 955 } 956 <!--<div class="btn-addto-cart smalldev" style="margin-bottom:5px;"> 957 <a href="@GroupLink"><i class="fa fa-search-plus"></i> View products details </a> 958 </div>--> 959 <div class="prod-compare" style="height : 35px;"> 960 @{ 961 string productname = product.GetString("Ecom:Product.Name"); 962 productname = productname.Replace("\"","&#10078;"); 963 } 964 <form> 965 <label>Compare 966 <input type="checkbox" id='@product.GetString("Ecom:Product.CompareID")' name="compareproduct" onclick="compareProducts('@product.GetString("Ecom:Product.CompareID")', '@productname', '@product.GetString("Ecom:Product.LinkGroup.Clean")',$(this).prop('checked'));$('html, body').animate({scrollTop: $('.compare-box').offset().top}, 500);"> 967 <span></span> 968 </label> 969 </form> 970 </div> 971 </div> 972 } 973 <!--product end--> 974 } 975 loopCounter++; 976 } 977 } 978 <div onclick="topFunction()" id="myBtn" title="Go to top"></div> 979 } 980 <script> 981 $(document).ready(function () { 982 if (items.length > 0) { 983 gtag("event", "view_item_list", { 984 items 985 }); 986 } 987 }); 988 function topFunction() { 989 //document.body.scrollTop = 0; 990 //document.documentElement.scrollTop = 0; 991 $('html, body').animate({ scrollTop: 0 }, 'fast') 992 } 993 994 window.onscroll = function() {scrollFunction()}; 995 996 function scrollFunction() { 997 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 998 document.getElementById("myBtn").style.display = "block"; 999 } else { 1000 document.getElementById("myBtn").style.display = "none"; 1001 } 1002 } 1003 1004 function selectItem(pId, pName, currencyCode, savePrice, pBrand, firstCategory, secondCategory, thirdCategory, productFlavour, productColor, productSize, sellingPrice) { 1005 gtag("event", "select_item", { 1006 items: [ 1007 { 1008 item_id: pId, 1009 item_name: pName, 1010 currency: currencyCode, 1011 discount: savePrice, 1012 index: 0, 1013 item_brand: pBrand, 1014 item_category: firstCategory, 1015 item_category2: secondCategory, 1016 item_category3: thirdCategory, 1017 item_variant: productFlavour, 1018 item_variant2: productColor, 1019 item_variant3: productSize, 1020 price: sellingPrice, 1021 quantity: 1 1022 } 1023 ] 1024 }); 1025 } 1026 </script> 1027 <script type="text/javascript" src="/Files/Templates/Designs/PLC/eCom/ProductList/Compare.js"></script> 1028 1029 <style> 1030 .product-box .prod-compare label{ 1031 display: inline; 1032 } 1033 .btn-addto-cart { 1034 height: 37px !important; 1035 } 1036 @@media (max-width: 768px) { 1037 .category-title { 1038 margin-top: 0px; 1039 } 1040 } 1041 .backBtn { 1042 margin-top: -10px;margin-bottom: 10px; 1043 } 1044 @@media (max-width: 738px) { 1045 .backBtn { 1046 margin-top: 10px; 1047 } 1048 } 1049 ul.page-prev-next li a { 1050 margin-top: 3px; 1051 } 1052 #collapseBrands{ 1053 display:none; 1054 } 1055 1056 #accordion > .accordion-section > a[href="#collapseBrands"]{ 1057 display:none; 1058 } 1059 .current1{ 1060 margin-left: 217px; 1061 } 1062 1063 .current2{ 1064 margin-left: 158px; 1065 } 1066 1067 .current3{ 1068 margin-left: 131px; 1069 } 1070 1071 .current4{ 1072 margin-left: 103px; 1073 } 1074 1075 .current5{ 1076 margin-left: 75px; 1077 } 1078 1079 .current6{ 1080 margin-left: 51px; 1081 } 1082 1083 .destopcurrent2{ 1084 margin-left: 250px; 1085 } 1086 1087 .destopcurrent3{ 1088 margin-left: 200px; 1089 } 1090 1091 .destopcurrent4{ 1092 margin-left: 200px; 1093 } 1094 1095 .destopcurrent5{ 1096 margin-left: 150px; 1097 } 1098 1099 .destopcurrent6{ 1100 margin-left: 100px; 1101 } 1102 1103 .commoncurrent{ 1104 margin-left: 221px; 1105 } 1106 1107 .total1{ 1108 margin-left: 163px; 1109 } 1110 1111 .total2{ 1112 margin-left: 134px; 1113 } 1114 1115 .total3{ 1116 margin-left: 106px; 1117 } 1118 1119 .total4{ 1120 margin-left: 79px; 1121 } 1122 1123 .total5{ 1124 margin-left: 79px; 1125 } 1126 1127 .commontotal{ 1128 margin-left: 51px; 1129 } 1130 1131 .currenttotal1{ 1132 margin-left: 350px; 1133 } 1134 1135 .currenttotal2{ 1136 margin-left: 280px; 1137 } 1138 1139 .currenttotal3{ 1140 margin-left: 260px; 1141 } 1142 1143 .currenttotal4{ 1144 margin-left: 240px; 1145 } 1146 1147 .currenttotal5{ 1148 margin-left: 210px; 1149 } 1150 1151 .currenttotal6{ 1152 margin-left: 200px; 1153 } 1154 1155 @@media only screen and (max-width: 850px){ 1156 .mblpagination{ 1157 margin-left: unset !important; 1158 } 1159 } 1160 1161 @@media screen and (max-width: 1050px) and (min-width: 1000px) and (max-height: 800px) { 1162 .currenttotal1{ 1163 margin-left: 310px !important; 1164 } 1165 1166 .currenttotal2{ 1167 margin-left: 250px !important; 1168 } 1169 1170 .currenttotal3{ 1171 margin-left: 220px !important; 1172 } 1173 1174 .currenttotal4{ 1175 margin-left: 195px !important; 1176 } 1177 1178 .currenttotal5{ 1179 margin-left: 170px !important; 1180 } 1181 1182 .currenttotal6{ 1183 margin-left: 135px !important; 1184 } 1185 1186 .total6current2{ 1187 margin-left: 185px; 1188 } 1189 1190 .total6current3{ 1191 margin-left: 166px; 1192 } 1193 1194 .total6current4{ 1195 margin-left: 130px; 1196 } 1197 1198 .total6current5{ 1199 margin-left: 100px; 1200 } 1201 1202 .total6current6{ 1203 margin-left: 100px; 1204 } 1205 1206 .current1{ 1207 margin-left: 125px; 1208 } 1209 1210 .current2{ 1211 margin-left: 70px; 1212 } 1213 1214 .current3{ 1215 margin-left: 40px; 1216 } 1217 1218 .current4{ 1219 margin-left: 12px; 1220 } 1221 1222 .current5{ 1223 margin-left: -15px; 1224 } 1225 1226 .current6{ 1227 margin-left: -40px; 1228 } 1229 1230 .commoncurrent{ 1231 margin-left: 128px; 1232 } 1233 1234 .total1{ 1235 margin-left: 70px; 1236 } 1237 1238 .total2{ 1239 margin-left: 45px; 1240 } 1241 1242 .total3{ 1243 margin-left: 16px; 1244 } 1245 1246 .total4{ 1247 margin-left: -10px; 1248 } 1249 1250 .total5{ 1251 margin-left: -15px; 1252 } 1253 1254 .commontotal{ 1255 margin-left: -42px; 1256 } 1257 } 1258 </style> 1259 1260 @{ 1261 string sqlString = "SELECT BecomeAMemberPrice FROM ItemType_PLC_WebSite_Settings"; 1262 string becomeAMemberPrice = ""; 1263 using (System.Data.IDataReader myImageReader = Dynamicweb.Data.Database.CreateDataReader(sqlString.ToString())) 1264 { 1265 while (myImageReader.Read()) 1266 { 1267 becomeAMemberPrice = myImageReader["BecomeAMemberPrice"].ToString(); 1268 } 1269 } 1270 1271 var birthday = false; 1272 bool showBirthdayPrice1 = false; 1273 bool userHasVIPCard1 = false; 1274 bool userHasValidVipCard1 = false; 1275 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 1276 { 1277 int i = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID")); 1278 1279 Dynamicweb.Security.UserManagement.User u = Dynamicweb.Security.UserManagement.User.GetUserByID(i); 1280 1281 foreach (CustomFieldValue val in u.CustomFieldValues) 1282 { 1283 CustomField field = val.CustomField; 1284 1285 string fieldName = field.Name; 1286 1287 if(fieldName == "DOB") 1288 { 1289 DateTime today = DateTime.Now; 1290 DateTime bDay = new DateTime(); 1291 if(val.Value != null) 1292 { 1293 bDay = (DateTime)val.Value; 1294 if(bDay.Month == today.Month) 1295 { 1296 birthday = true; 1297 } 1298 } 1299 } 1300 switch (fieldName.ToUpper()) 1301 { 1302 case "VIP CARD NO": 1303 userHasVIPCard1 = !string.IsNullOrEmpty((val.Value).ToString()); 1304 break; 1305 case "EXPRYDATE": 1306 userHasValidVipCard1 = DateTime.Now.Month <= ((DateTime)val.Value).Month; 1307 break; 1308 default: 1309 break; 1310 } 1311 } 1312 } 1313 showBirthdayPrice1 = birthday && userHasVIPCard1 && userHasValidVipCard1; 1314 1315 string grouplink = ""; 1316 1317 if (!string.IsNullOrWhiteSpace(GetString("Ecom:ProductList:Page.GroupID"))) 1318 { 1319 grouplink = "/Default.aspx?ID=" + GetValue("Ecom:ProductList:Page.ID") + "&amp;GroupID=" + GetValue("Ecom:ProductList:Page.GroupID"); 1320 } 1321 else 1322 { 1323 grouplink = "&amp;eComQuery=" + GetValue("Ecom:ProductList:Search.Query"); 1324 } 1325 var strUrl = System.Web.HttpContext.Current.Request.RawUrl.ToString() ; 1326 string[] words = strUrl.Split('/'); 1327 var firstgroup =System.Web.HttpContext.Current.Request.Params["firstgroup"]; 1328 var secondgroup = System.Web.HttpContext.Current.Request.Params["secondgroup"]; 1329 var thirdgroup = System.Web.HttpContext.Current.Request.Params["thirdgroup"]; 1330 @*var firstgroup =words[2]; 1331 var secondgroup = words[3]; 1332 var thirdgroup = words[4];*@ 1333 var grouptext = ""; 1334 1335 if (!string.IsNullOrWhiteSpace(firstgroup) && !string.IsNullOrWhiteSpace(secondgroup) && !string.IsNullOrWhiteSpace(thirdgroup)) 1336 { 1337 grouptext = thirdgroup; 1338 } 1339 else if(!string.IsNullOrWhiteSpace(firstgroup) && !string.IsNullOrWhiteSpace(secondgroup)){ 1340 grouptext = secondgroup; 1341 } 1342 else{ 1343 grouptext = firstgroup; 1344 } 1345 1346 var totalPages = GetInteger("Ecom:ProductList.TotalPages"); 1347 var currentPage = GetInteger("Ecom:ProductList.CurrentPage"); 1348 var noOfPages = 3; 1349 var currentPageLink = ""; 1350 var blankLink = ""; 1351 var otherLink = ""; 1352 if(totalPages != 0){ 1353 1354 1355 foreach (LoopItem page in GetLoop("Ecom:ProductList.Pages")) 1356 { 1357 if (page.GetBoolean("Ecom:ProductList.Pages.Page.IsCurrent")){ 1358 1359 currentPageLink = page.GetString("Ecom:ProductList.Pages.Page.Url"); 1360 } 1361 } 1362 var firstSplit = currentPageLink.Split(new string[] { "PageNum=" }, StringSplitOptions.None); 1363 blankLink =firstSplit[0]; 1364 1365 if(firstSplit[1].Contains("&")){ 1366 string[] split = firstSplit[1].Split(new char[] { '&' }, 2); 1367 otherLink = "&"+split[1]; 1368 } 1369 } 1370 1371 object objShowH1Title = false; 1372 bool showH1TitleFlag = false; 1373 Dynamicweb.Frontend.PageView.Current().Page.PropertyItem.TryGetValue("Show_H1_Title", ref objShowH1Title); 1374 showH1TitleFlag = objShowH1Title != null ? bool.Parse(objShowH1Title.ToString()) : false; 1375 } 1376 1377 <script> 1378 $( document ).ready(function() { 1379 Compare.writecompare(); 1380 if(getQueryStringValue("SortBy")){ 1381 var selectedVal = getQueryStringValue("SortBy") + "&SortOrder=" + getQueryStringValue("SortOrder") 1382 $('#sortSelect').val(selectedVal); 1383 }else{ 1384 //$('#sortSelect').val('PleaseSelect'); 1385 } 1386 }); 1387 function getCookie(name){ 1388 var pattern = RegExp(name + "=.[^;]*") 1389 matched = document.cookie.match(pattern) 1390 1391 if (matched) { 1392 var cookie = matched[0].split('=') 1393 return cookie[1] 1394 } 1395 return false 1396 } 1397 1398 </script> 1399 @{ 1400 string pathproduct = "/Files/Images/plc/"; 1401 } 1402 1403 <div class="col-3-12"> 1404 <div class="backBtn"> 1405 <span onclick="window.location.assign(document.referrer);" style="padding-left:30px; font-weight:bold;cursor:pointer;"><img src="/Files/Templates/Designs/PLC/assets/images/backarrow.png" style="width:20px;padding-bottom:3px;"> Back</span> 1406 </div> 1407 <div class="category-title col-1-1"> 1408 <div class="smallText">Shop by:</div> 1409 </div> 1410 <div class="category-box col-1-1"> 1411 <div class="smallText">Shop by:</div> 1412 <hr class="grey"> 1413 @{ 1414 string stringGroupID = ""; 1415 if(GetString("Ecom:ProductList:Page.ID") != "298") 1416 { 1417 foreach(var productGroup in GetLoop("ProductGroups")) 1418 { 1419 stringGroupID += productGroup.GetString("Ecom:Group.ID") + ","; 1420 } 1421 } 1422 } 1423 <!------------------------- for Price Filter Begin -------------------------> 1424 1425 <!------------------------- for Price Filter End -------------------------> 1426 <div class="filter-vertical toogleContent FixedHeightContainer" > 1427 <form id="filtercontainer" name="EcomSearch" class="form-filters" method="get" > 1428 @*<input type="hidden" name="ID" value='@GetString("Ecom:ProductList:Page.ID")' />*@ 1429 @if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["q"])) 1430 { <input type='hidden' name='q' value='@System.Web.HttpContext.Current.Request["q"]' /> } 1431 @if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["searchsuggest"])) 1432 { <input type='hidden' name='searchsuggest' value='@System.Web.HttpContext.Current.Request["searchsuggest"]' /> } 1433 1434 <input type="submit" style="display:none;"> 1435 1436 @foreach (LoopItem facetGroup in GetLoop("FacetGroups")) 1437 { 1438 foreach (LoopItem facet in facetGroup.GetLoop("Facets")) 1439 { 1440 var facetOptions = facet.GetLoop("FacetOptions"); 1441 string facetQueryParameter = facet.GetString("Facet.QueryParameter"); 1442 1443 if (!facetOptions.Any()) 1444 { 1445 continue; 1446 } 1447 if( 1448 (facet.GetString("Facet.Name")=="SecondGroup" ) 1449 || (facet.GetString("Facet.Name")=="ThirdGroup" ) 1450 || (facet.GetString("Facet.Name")=="FirstGroup") 1451 || (facet.GetString("Facet.Name")=="Color") 1452 //|| (facet.GetString("Facet.Name")=="Size") 1453 || (facet.GetString("Facet.Name")=="Weight") 1454 || (facet.GetString("Facet.Name")=="Health Consideration") 1455 || (facet.GetString("Facet.Name")=="Life Stage") 1456 || (facet.GetString("Facet.Name")=="Availability") 1457 || (facet.GetString("Facet.Name")=="productclassic") 1458 || (facet.GetString("Facet.Name")=="Nutritional Option") 1459 || (facet.GetString("Facet.Name")=="Brands") 1460 || (facet.GetString("Facet.Name")=="Treats Type") 1461 || (facet.GetString("Facet.Name")=="Kibble - Bite Size") 1462 || (facet.GetString("Facet.Name")=="Pet Type") 1463 || (facet.GetString("Facet.Name")=="Applications Type") 1464 || (facet.GetString("Facet.Name")=="Pet Weight Range") 1465 || (facet.GetString("Facet.Name")=="Litter Materials") 1466 || (facet.GetString("Facet.Name")=="Litter Features") 1467 || (facet.GetString("Facet.Field") == "CustomField_ProductSize") 1468 || (facet.GetString("Facet.Name") == "Weights") 1469 || (facet.GetString("Facet.Name") == "Volume") 1470 || (facet.GetString("Facet.Name") == "Pet Weight Ranges") 1471 || (facet.GetString("Facet.Name")=="Promotion Type") 1472 ) 1473 { 1474 if((facet.GetString("Facet.Name")=="SecondGroup")||(facet.GetString("Facet.Name")=="ThirdGroup")||(facet.GetString("Facet.Name")=="FirstGroup")||(facet.GetString("Facet.Name")=="productclassic")){ 1475 1476 <!--Category--> 1477 <div style="display:none" class="panel panel-flat"> 1478 <div class="panel-heading"> 1479 @{ 1480 var str = Regex.Replace(facet.GetString("Facet.Name"), @"\s+", ""); 1481 } 1482 <h4 class="panel-title tot-accordion"> 1483 <a data-toggle="collapse" data-target='#collapse@(str)' class="accordion-section-title" style="color: #000 !important;"> 1484 <span class="pull-right hasMinus"> <i class="i-minus"></i></span> &nbsp;@facet.GetString("Facet.Name") 1485 </a> 1486 </h4> 1487 </div> 1488 <div id='collapse@(str)' class="collapse in"> 1489 <div class="panel-body smoothscroll" > 1490 1491 @if (facetOptions.Count() > 0) 1492 { 1493 <ul class="list-unstyled long-list"> 1494 1495 @foreach (LoopItem option in facetOptions) 1496 { 1497 var value = option.GetValue("FacetOption.Value"); 1498 var isSelected = option.GetBoolean("FacetOption.Selected"); 1499 var label = option.GetString("FacetOption.Label"); 1500 label = label.Replace("-a-",""); 1501 1502 var count = option.GetInteger("FacetOption.Count"); 1503 var facetName = (Regex.Replace(facet.GetString("Facet.Name"), @"\s+", "")).ToLower(); 1504 1505 char[] array = label.ToCharArray(); 1506 // Handle the first letter in the string. 1507 if (array.Length >= 1) 1508 { 1509 if (char.IsLower(array[0])) 1510 { 1511 array[0] = char.ToUpper(array[0]); 1512 } 1513 } 1514 // Scan through the letters, checking for spaces. 1515 // ... Uppercase the lowercase letters following spaces. 1516 for (int i = 1; i < array.Length; i++) 1517 { 1518 if (array[i - 1] == ' ') 1519 { 1520 if (char.IsLower(array[i])) 1521 { 1522 array[i] = char.ToUpper(array[i]); 1523 } 1524 } 1525 } 1526 string label2=new string(array); 1527 <li> 1528 <div class="block-element"> 1529 <label onclick ="clickCheckbox(this);"> 1530 @*<input type="checkbox" onclick="submitform()" data-hidden="true" class="filter-option-value" id="chk@(facetName)@(count)" name="@facetName" value="@value" @if (isSelected) { <text> checked="checked" </text> } />*@ 1531 <input type="checkbox" onclick="submitform()" data-hidden="true" class="filter-option-value" id="chk@(facetName)@(count)" name="@facetQueryParameter" value="@value" @if (isSelected) { <text> checked="checked" </text> } /> 1532 @label2 1533 </label> 1534 <span class="badge">(@count)</span> 1535 </div> 1536 </li> } 1537 </ul> 1538 } 1539 </div> 1540 </div> 1541 </div> 1542 <!--/Category menu end--> 1543 1544 } 1545 else{ 1546 1547 <div id="accordion"> 1548 <!--Category--> 1549 <div class="accordion-section" > 1550 @{ 1551 var str = Regex.Replace(facet.GetString("Facet.Name"), @"\s+", ""); 1552 bool showFacetName = false; 1553 } 1554 @if(facetOptions.Count() == 1) 1555 { 1556 foreach (LoopItem option in facetOptions) 1557 { 1558 if(option.GetInteger("FacetOption.Count") > 0 && option.GetString("FacetOption.Label").ToLower().Contains("nothing select")) 1559 { 1560 showFacetName = false; 1561 } 1562 else if(option.GetInteger("FacetOption.Count") > 0) 1563 { 1564 showFacetName = true; 1565 } 1566 } 1567 } 1568 else if (facetOptions.Count() > 1) 1569 { 1570 foreach (LoopItem option in facetOptions) 1571 { 1572 if(option.GetInteger("FacetOption.Count") > 0) 1573 { 1574 showFacetName = true; 1575 } 1576 } 1577 } 1578 @if(showFacetName) 1579 { 1580 <a class="accordion-section-title" data-toggle="collapse" onclick="return disableLink();" data-target='#collapse@(str)' href="#collapse@(str)" style="padding-top: 20px;"> 1581 @facet.GetString("Facet.Name") 1582 </a> 1583 } 1584 </div> 1585 <div name="visibleFilter" id='collapse@(str)' class="accordion-section-content collapse scrollminicart"> 1586 @if (facetOptions.Count() > 0) 1587 { 1588 foreach (LoopItem option in facetOptions) 1589 { 1590 var value = option.GetValue("FacetOption.Value"); 1591 var isSelected = option.GetBoolean("FacetOption.Selected"); 1592 1593 var count = option.GetInteger("FacetOption.Count"); 1594 var label = option.GetString("FacetOption.Label"); 1595 label = facet.GetString("Facet.Name") == "Brands" ? label.ToUpper() : System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(label.ToLower()); 1596 var displayLabel = label + " (" + count + ")"; 1597 var facetName = (Regex.Replace(facet.GetString("Facet.Name"), @"\s+", "")).ToLower(); 1598 facetName = facetName == "kibble-bitesize" ? "bitesize" : facetName; 1599 if(count != 0 && !displayLabel.ToLower().Contains("nothing select")) 1600 { 1601 @*<input type="checkbox" onclick="submitform()" data-hidden="false" data-category="@str" class="filter-option-value" id="chk@(label)@(count)" name="@facetName" value="@value" @if (isSelected) { <text> checked="checked" </text> } />*@ 1602 <input type="checkbox" onclick="submitform()" data-hidden="false" data-category="@str" class="filter-option-value" id="chk@(label)@(count)" name="@facetQueryParameter" value="@value" @if (isSelected) { <text> checked="checked" </text> } /> 1603 @displayLabel 1604 <br> 1605 } 1606 1607 } 1608 } 1609 </div> 1610 <!--/Category menu end--> 1611 </div>}} 1612 } 1613 1614 } 1615 @{ 1616 string currency = GetLoop("Products").Count() > 0 ? GetLoop("Products")[0].GetString("Ecom:Product.Discount.Price.Currency.Symbol") : string.Empty; 1617 } 1618 <div id="accordion"> 1619 <div id="priceFilterTitle" class="accordion-section" style="display:none;"> 1620 <a class="accordion-section-title" data-toggle="collapse" onclick="return disableLink(); return false;" data-target='#collapsePriceFilter' href="#collapsePriceFilter" style="padding-top: 20px;"> 1621 Price Filter 1622 </a> 1623 </div> 1624 <div name="visibleFilter" id='collapsePriceFilter' class="accordion-section-content collapse scrollminicart" style="display:none;"> 1625 <div> 1626 <label>Price range: @currency</label> 1627 <input class="price-filter-min" id="price-filter-min" name="minpricefilter" value="0" readonly /> 1628 ~ 1629 <input class="price-filter-max" id="price-filter-max" name="maxpricefilter" value="10000" readonly /> 1630 <input type="hidden" id="minprice" name="minprice" value="0" /> 1631 <input type="hidden" id="maxprice" name="maxprice" value="10000" /> 1632 </div> 1633 <div class="slider-range"> 1634 <div id="slider-range"></div> 1635 </div> 1636 </div> 1637 </div> 1638 1639 <div id="accordion"> 1640 <div id="wordSearchTitle" class="accordion-section"> 1641 <a class="accordion-section-title" data-toggle="collapse" onclick="return disableLink();" data-target='#collapseWordSearch' href="#collapseWordSearch" style="padding-top: 20px;"> 1642 Search within this list 1643 </a> 1644 </div> 1645 <div name="visibleFilter" id='collapseWordSearch' class="accordion-section-content collapse scrollminicart"> 1646 <div> 1647 <input type="text" id="wordSearch" name="wordSearch" placeholder="Word Search" value='@System.Web.HttpContext.Current.Request["wordSearch"]' /> 1648 <input id="applyFilters" type="submit" class="btn btn-sm btn-two" value="Search" style="width:60px;" /> 1649 </div> 1650 </div> 1651 </div> 1652 1653 <div style="clear:both;margin-bottom:40px;" > 1654 <input id="clearFilters" type="reset" onclick="resetForm()" class="btn btn-sm btn-two" value="Reset Filters" /> 1655 </div> 1656 </form> 1657 1658 1659 1660 1661 <script> 1662 function resetForm(){ 1663 var checkboxes = document.getElementById("filtercontainer").getElementsByTagName("input"); 1664 for(var i=0;i<checkboxes.length;i++){ 1665 if(checkboxes[i].checked == true && $(checkboxes[i]).data("hidden")==false){ 1666 console.log(checkboxes[i].value); 1667 $(checkboxes[i]).attr("checked",false); 1668 } 1669 } 1670 $("#wordSearch").val(""); 1671 var url = new URL(window.location); 1672 var query_string = url.search; 1673 var search_params = new URLSearchParams(query_string); 1674 search_params.set('minpricefilter', '0'); 1675 search_params.set('maxpricefilter', max_price); 1676 search_params.set('wordSearch', ''); 1677 url.search = search_params.toString(); 1678 var new_url = url.toString(); 1679 window.location.href = new_url; 1680 setTimeout(function(){document.getElementById("filtercontainer").submit();},300); 1681 } 1682 </script> 1683 @foreach (LoopItem k in GetLoop("Ecom:Search.Filters")) 1684 { 1685 1686 <!--@LoopStart("Ecom:Search.Filter.Options")--> 1687 <!--@Ecom:Search.Filter.Name--> 1688 <!--@Ecom:Search.Filter.Option.Label--> 1689 <!--@Ecom:Search.Filter.Option.Value--> 1690 <!--@LoopEnd("Ecom:Search.Filter.Options")--> 1691 } 1692 1693 </div> 1694 <script> 1695 function disableLink(){ 1696 return false; 1697 } 1698 function submitform(){ 1699 var x = document.getElementsByName('EcomSearch'); 1700 x[0].submit(); 1701 } 1702 1703 function clickCheckbox(check){ 1704 1705 } 1706 1707 function expandFacets(){ 1708 1709 var filterDiv = document.getElementsByName("visibleFilter"); 1710 1711 for(var i=0;i<filterDiv.length;i++){ 1712 1713 var checkboxes = filterDiv[i].getElementsByTagName("input"); 1714 1715 for(var j=0;j<checkboxes.length;j++){ 1716 if(checkboxes[j].checked == true){ 1717 var targetFilter = document.getElementById("collapse"+$(checkboxes[j]).data("category")); 1718 console.log("collapse"+$(checkboxes[j]).data("category")); 1719 targetFilter.setAttribute("class", "collapse in"); 1720 break; 1721 } 1722 } 1723 } 1724 } 1725 1726 $(document).ready(function() { 1727 //expandFacets(); 1728 if('@GetGlobalValue("Global:Device.IsMobile")' != "True") { 1729 $('.accordion-section-title').click(); 1730 } 1731 }); 1732 </script> 1733 <style> 1734 .price-filter-min, .price-filter-max { 1735 width: 22%; 1736 border: none; 1737 background: none; 1738 } 1739 .price-filter-min { 1740 text-align: right; 1741 } 1742 .price-filter-max { 1743 text-align: left; 1744 } 1745 .slider-range { 1746 padding: 0 10px 0 10px; 1747 } 1748 #applyFilters { 1749 margin-top: -3px; 1750 } 1751 1752 .FixedHeightContainer 1753 { 1754 height: auto; 1755 } 1756 .scrollminicart 1757 { 1758 max-height:224px; 1759 height:auto; 1760 overflow:auto; 1761 1762 } 1763 </style> 1764 <!------------------------- Price Filter Begin -------------------------> 1765 @{ 1766 int requested_Min_Price = 0; 1767 int requested_Max_Price = 0; 1768 int minPrice = 0; 1769 int maxPrice = 0; 1770 int pageNumber = 0; 1771 string getPriceUrl = string.Empty; 1772 try 1773 { 1774 requested_Min_Price = Convert.ToInt32(System.Web.HttpContext.Current.Request["minpricefilter"]); 1775 requested_Max_Price = Convert.ToInt32(System.Web.HttpContext.Current.Request["maxpricefilter"]); 1776 minPrice = Convert.ToInt32(System.Web.HttpContext.Current.Request["minprice"]); 1777 maxPrice = Convert.ToInt32(System.Web.HttpContext.Current.Request["maxprice"]); 1778 pageNumber = Convert.ToInt32(System.Web.HttpContext.Current.Request["PageNum"]); 1779 //getPriceUrl = System.Web.HttpContext.Current.Request.Url.AbsoluteUri.Replace(GetString("Ecom:ProductList:Page.ID"), "3123").Replace("PageNum=" + pageNumber,"PageNum="); 1780 getPriceUrl = System.Web.HttpContext.Current.Request.Url.Scheme + "://" + System.Web.HttpContext.Current.Request.Url.Host + "/Default.aspx?ID=3123"; 1781 } 1782 catch(Exception ex) 1783 { 1784 requested_Min_Price = 0; 1785 requested_Max_Price = 0; 1786 minPrice = 0; 1787 maxPrice = 0; 1788 //getPriceUrl = System.Web.HttpContext.Current.Request.Url.AbsoluteUri.Replace(GetString("Ecom:ProductList:Page.ID"), "3123"); 1789 getPriceUrl = System.Web.HttpContext.Current.Request.Url.Scheme + "://" + System.Web.HttpContext.Current.Request.Url.Host + "/Default.aspx?ID=3123"; 1790 } 1791 } 1792 1793 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/jQuery_Ui_Slider/jquery-ui.css" type="text/css"> 1794 <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 1795 <script src="/Files/Templates/Designs/PLC/assets/jQuery_Ui_Slider/jquery.ui.touch-punch.min.js"></script> 1796 1797 <script> 1798 var priceFilterMouseDown = false; 1799 var min_price = 0; 1800 var max_price = 0; 1801 var requested_min_price = parseInt("@requested_Min_Price"); 1802 var requested_max_price = parseInt("@requested_Max_Price"); 1803 var url = "@getPriceUrl" + "&SortBy=InternetPrice&SortOrder=Desc" + "&GroupId=" + "@stringGroupID"; 1804 $.ajax( 1805 { 1806 url: url, 1807 type: 'POST', 1808 success: function (data) 1809 { 1810 if(parseInt("@minPrice") == 0 && parseInt("@maxPrice") == 0) { 1811 min_price = parseInt(data["Min_Price"]); 1812 max_price = parseInt(data["Max_Price"]) + 1; 1813 } else { 1814 min_price = parseInt("@minPrice"); 1815 max_price = parseInt("@maxPrice"); 1816 } 1817 1818 $("#minprice").val(min_price); 1819 $("#maxprice").val(max_price); 1820 1821 if(requested_min_price == 0 && requested_max_price == 0) 1822 { 1823 requested_max_price = min_price; 1824 requested_max_price = max_price; 1825 } 1826 $( function() { 1827 $( "#slider-range" ).slider({ 1828 range: true, 1829 min: min_price, 1830 max: max_price, 1831 values: [ requested_min_price, requested_max_price ], 1832 slide: function( event, ui ) { 1833 $( "#price-filter-min" ).val(ui.values[ 0 ]); 1834 $( "#price-filter-max" ).val(ui.values[ 1 ]); 1835 } 1836 }); 1837 $( "#price-filter-min" ).val( $( "#slider-range" ).slider( "values", 0 )); 1838 $( "#price-filter-max" ).val( $( "#slider-range" ).slider( "values", 1 ) ); 1839 }); 1840 $( "#priceFilterTitle" ).show(); 1841 $( "#collapsePriceFilter" ).show(); 1842 $('.ui-slider-handle ui-corner-all ui-state-default').draggable(); 1843 }, 1844 error: function (jqXHR, textStatus, errorThrown) 1845 { 1846 //console.log("jqXHR: " + jqXHR); 1847 //console.log("textStatus: " + textStatus); 1848 //console.log("errorThrown: " + errorThrown); 1849 } 1850 }); 1851 1852 $( "#slider-range" ).mousedown(function() { 1853 priceFilterMouseDown = true; 1854 }); 1855 $(document).mouseup(function() { 1856 if(priceFilterMouseDown) { 1857 $("#applyFilters").click(); 1858 } 1859 }); 1860 1861 1862 <!------------------------- Price Filter End -------------------------> 1863 1864 <!------------------------- on Form Submit Begin -------------------------> 1865 1866 $(function() 1867 { 1868 $("form").submit(function() 1869 { 1870 $('#wordSearch').val($('#wordSearch').val().toLowerCase()); 1871 <!-- Handling null value parameter --> 1872 $( 'input[value=""]' ).each(function(index) { 1873 if($( this ).val() == null || $( this ).val() == "") { 1874 $( this ).attr("disabled", "disabled"); 1875 } 1876 }); 1877 return true; // ensure form still submits 1878 }); 1879 }); 1880 <!------------------------- on Form Submit End -------------------------> 1881 </script> 1882 <style> 1883 .dw-categories > li > .M2{ 1884 background:none; 1885 } 1886 .list-open-active { 1887 background:none; 1888 } 1889 ul.dw-categories > li > ul { 1890 background:none; 1891 } 1892 .list-active { 1893 background:none; 1894 } 1895 </style> 1896 </div> 1897 </div> 1898 @if(showH1TitleFlag) 1899 { 1900 <h1 style="text-align: center;">@GetString("Ecom:Group:Field.h1titletext")</h1> 1901 } 1902 <div class="prod-content-right col-9-12"> 1903 1904 @if( !string.IsNullOrWhiteSpace(grouptext)) 1905 { 1906 <h2 style="text-transform: capitalize;">@grouptext.Replace("-a-","&")</h2> 1907 } 1908 else{ 1909 <h2 style="text-transform: capitalize;">@grouptext</h2> 1910 } 1911 <div class="col-1-1 nopadding"> 1912 <div class="sort-box col-1-3 nopadding"> 1913 <form class="sort-by"> 1914 <label class="smallText bold">@Translate("Sort by:", "Sort by:") </label> 1915 <select id="sortSelect" onchange="SortProductsBy(this.value)" style="width:100px"> 1916 @*<option value="PleaseSelect">@Translate("Please select", "Please select")</option>*@ 1917 <option value="TotalAmtSold&amp;SortOrder=Desc" > @Translate("Best Selling", "Best Selling")</option> 1918 1919 <option value="Brand&amp;SortOrder=Asc" >@Translate("Brand A-Z", "Brand A-Z") </option> 1920 <option value="Brand&amp;SortOrder=Desc" > @Translate("Brand Z-A", "Brand Z-A") </option> 1921 <option value="InternetPrice&amp;SortOrder=Asc" >@Translate("Price low-high", "Price low-high")</option> 1922 <option value="InternetPrice&amp;SortOrder=Desc" > @Translate("Price high-low", "Price high-low")</option> 1923 <option value="NewArrivals,AutoId&amp;SortOrder=Desc,Desc" > @Translate("New Arrivals", "New Arrivals")</option> 1924 </select> 1925 </form> 1926 </div> 1927 1928 <div class="page-no-top col-2-3"> 1929 @if(currentPage == 1) 1930 { 1931 if(totalPages == 1) 1932 { 1933 <div id="items-pages" class="items-pages currenttotal1 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1934 }else if(totalPages == 2){ 1935 <div id="items-pages" class="items-pages currenttotal2 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1936 }else if(totalPages == 3){ 1937 <div id="items-pages" class="items-pages currenttotal3 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1938 }else if(totalPages == 4){ 1939 <div id="items-pages" class="items-pages currenttotal4 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1940 }else if(totalPages == 5){ 1941 <div id="items-pages" class="items-pages currenttotal5 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1942 }else if(totalPages == 6){ 1943 <div id="items-pages" class="items-pages currenttotal6 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1944 }else{ 1945 <div id="items-pages" class="items-pages current1 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1946 } 1947 }else if(currentPage == 2) 1948 { 1949 if(totalPages <= 6) 1950 { 1951 <div id="items-pages" class="items-pages total6current2 destopcurrent2 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1952 }else{ 1953 <div id="items-pages" class="items-pages current2 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1954 } 1955 }else if(currentPage == 3) 1956 { 1957 if(totalPages <= 6) 1958 { 1959 <div id="items-pages" class="items-pages total6current3 destopcurrent3 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1960 }else{ 1961 <div id="items-pages" class="items-pages current3 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1962 } 1963 }else if(currentPage == 4) 1964 { 1965 if(totalPages <= 6) 1966 { 1967 <div id="items-pages" class="items-pages total6current4 destopcurrent4 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1968 }else{ 1969 <div id="items-pages" class="items-pages current4 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1970 } 1971 }else if(currentPage == 5) 1972 { 1973 if(totalPages <= 6) 1974 { 1975 <div id="items-pages" class="items-pages total6current5 destopcurrent5 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1976 }else{ 1977 <div id="items-pages" class="items-pages current5 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1978 } 1979 }else if(currentPage == 6) 1980 { 1981 if(totalPages <= 6) 1982 { 1983 <div id="items-pages" class="items-pages total6current6 destopcurrent6 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1984 }else{ 1985 <div id="items-pages" class="items-pages current6 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1986 } 1987 }else 1988 { 1989 if(currentPage == totalPages) 1990 { 1991 <div id="items-pages" class="items-pages commoncurrent mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1992 }else{ 1993 if(currentPage == (totalPages - 1)) 1994 { 1995 <div id="items-pages" class="items-pages total1 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1996 }else if(currentPage == (totalPages - 2)) 1997 { 1998 <div id="items-pages" class="items-pages total2 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 1999 }else if(currentPage == (totalPages - 3)) 2000 { 2001 <div id="items-pages" class="items-pages total3 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 2002 }else if(currentPage == (totalPages - 4)) 2003 { 2004 <div id="items-pages" class="items-pages total4 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 2005 }else if(currentPage == (totalPages - 5)) 2006 { 2007 <div id="items-pages" class="items-pages total5 mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 2008 }else{ 2009 <div id="items-pages" class="items-pages commontotal mblpagination">View @GetString("Ecom:ProductList.PageProdCnt")&nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 2010 } 2011 } 2012 } 2013 <ul class="page-prev-next top-paging-prev" style="float: left;"> 2014 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:ProductList.PrevPage.Clean"))) 2015 { 2016 <li><a href="@GetString("Ecom:ProductList.PrevPage.Clean")">&laquo;</a></li> 2017 } 2018 </ul> 2019 <ul id="page-no" class="page-no"> 2020 2021 @{ 2022 if(currentPage!=1){ 2023 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum=1"+otherLink)'><strong>1</strong></a></li> 2024 } 2025 @*...*@ 2026 if(currentPage - noOfPages > 2){ 2027 <li><a>...</a></li> 2028 } 2029 @*previous 5 pages*@ 2030 for(var i = currentPage-noOfPages; i < currentPage; i++){ 2031 if(i>1){ 2032 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum="+i+otherLink)' ><strong>@i</strong></a></li> 2033 } 2034 } 2035 @*currentpage*@ 2036 <li class="active" style="padding: 0 2px 0 2px; text-decoration: underline;"><a href="@currentPageLink"><strong>@currentPage</strong></a></li> 2037 @*forward 5 pages*@ 2038 for(var i = currentPage+1; i < currentPage+noOfPages + 1; i++){ 2039 if(i<totalPages){ 2040 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum="+i+otherLink)'><strong>@i</strong></a></li> 2041 } 2042 } 2043 @*...*@ 2044 if(currentPage + noOfPages < totalPages-2){ 2045 <li style="padding: 0 2px 0 2px;"><a>...</a></li> 2046 } 2047 2048 if(currentPage != totalPages && totalPages != 0){ 2049 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum="+totalPages+otherLink)'><strong>@totalPages</strong></a></li> 2050 } 2051 } 2052 2053 </ul> 2054 <ul class="page-prev-next" style="margin-left: 10px;"> 2055 2056 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:ProductList.NextPage.Clean"))) 2057 { 2058 <li><a href="@GetString("Ecom:ProductList.NextPage.Clean")">&raquo;</a></li> 2059 } 2060 2061 </ul> 2062 </div> 2063 2064 <hr class="grey"> 2065 </div> 2066 @if(birthday && showBirthdayPrice1) 2067 { 2068 <!--<div class="info-box col-1-1" style="padding-bottom: 20px;">--> 2069 <!--<img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon_info" title="">--> 2070 <!--<span style="font-size:16px;"><strong>That's because it's your birthday this month!</span>--> 2071 <!--</div>--> 2072 } 2073 <div class="clearfix"></div> 2074 <div class="clearfix"></div> 2075 2076 <div class="compare-box" id="comparebox" style="display: none;"> 2077 <div class="title"> 2078 <h3>Compare products</h3> 2079 <p>(Add up to 3 products)</p> 2080 </div> 2081 <div class="btn-box"> 2082 <div class="btn" style="background-color:#FDF2F0;"><a href="javascript:Compare.compare(2834);">@Translate("Compare","Compare")</a></div> 2083 <p align="center" class="smallText bold"><a href="javascript:Compare.removeall();">@Translate("Clear All","Clear All")</a></p> 2084 </div> 2085 <div id ="compare" class="add-img"> 2086 <div class="btn-add-img"><a href="#">+</a></div> 2087 </div> 2088 </div> 2089 2090 2091 <div id="addedItem"></div> 2092 <div class="col-1-1 nopadding"> 2093 2094 @GetProductList(GetLoop("Products"),birthday,becomeAMemberPrice, 3) 2095 2096 2097 </div> 2098 2099 <p>&nbsp;</p> 2100 <hr class="grey"> 2101 2102 <div class="page-no-bottom col-1-1" style="margin-bottom:0px;"> 2103 <div class="items-pages">View @GetString("Ecom:ProductList.PageProdCnt") &nbsp;&nbsp;|&nbsp;&nbsp;Items Pages:</div> 2104 <ul class="page-prev-next"> 2105 2106 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:ProductList.PrevPage.Clean"))) 2107 { 2108 <li style="padding: 0 2px 0 2px;"><a href="@GetString("Ecom:ProductList.PrevPage.Clean")">&laquo;</a></li> 2109 } 2110 2111 </ul> 2112 <ul id="page-no" class="page-no"> 2113 2114 @{ 2115 if(currentPage!=1){ 2116 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum=1"+otherLink)'><strong>1</strong></a></li> 2117 } 2118 @*...*@ 2119 if(currentPage - noOfPages > 2){ 2120 <li><a>...</a></li> 2121 } 2122 @*previous 5 pages*@ 2123 for(var i =currentPage-noOfPages;i<currentPage;i++){ 2124 if(i>1){ 2125 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum="+i+otherLink)' ><strong>@i</strong></a></li> 2126 } 2127 } 2128 @*currentpage*@ 2129 <li class="active" style="padding: 0 2px 0 2px; text-decoration: underline;"><a href="@currentPageLink"><strong>@currentPage</strong></a></li> 2130 @*forward 5 pages*@ 2131 for(var i =currentPage+1;i<currentPage+noOfPages+1;i++){ 2132 if(i<totalPages){ 2133 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum="+i+otherLink)'><strong>@i</strong></a></li> 2134 } 2135 } 2136 @*...*@ 2137 if(currentPage + noOfPages < totalPages-2){ 2138 <li><a>...</a></li> 2139 } 2140 2141 if(currentPage != totalPages && totalPages != 0){ 2142 <li style="padding: 0 2px 0 2px;"><a href='@(blankLink+"PageNum="+totalPages+otherLink)'><strong>@totalPages</strong></a></li> 2143 } 2144 } 2145 2146 </ul> 2147 <ul class="page-prev-next" style="margin-left: 10px;"> 2148 2149 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:ProductList.NextPage.Clean"))) 2150 { 2151 <li><a href="@GetString("Ecom:ProductList.NextPage.Clean")">&raquo;</a></li> 2152 } 2153 2154 </ul> 2155 </div> 2156 <!--<div class="clearfix"></div> 2157 2158 <div class="compare-box" id="comparebox" style="display: none;"> 2159 <div class="title"> 2160 <h3>Compare products</h3> 2161 <p>(Add up to 3 products)</p> 2162 </div> 2163 <div class="btn-box"> 2164 <div class="btn" style="background-color:#FDF2F0;"><a href="javascript:Compare.compare(2834);">@Translate("Compare","Compare")</a></div> 2165 <p align="center" class="smallText bold"><a href="javascript:Compare.removeall();">@Translate("Clear All","Clear All")</a></p> 2166 </div> 2167 <div id ="compare" class="add-img"> 2168 <div class="btn-add-img"><a href="#">+</a></div> 2169 </div> 2170 </div> 2171 2172 </div>--> 2173 2174 <div id="location" style="width:100%; max-width:400px;display: none;"> 2175 <form> 2176 <h3 style="margin:0;">You have selected more than one location.</h3> 2177 <p style="margin:0 0 20px 0;">Which location would like to pick up this product from?</p> 2178 <input type="checkbox" /> Toa Payoh<br /> 2179 <input type="checkbox" /> Valley Point 2180 <div class="btn-addto-cart" style="margin-top:20px; width:200px;"> 2181 <a href="#"><i class="fa fa-shopping-cart"></i> Add to cart</a> 2182 </div> 2183 </form> 2184 </div> 2185 <script> 2186 function getQueryStringValue (key) { 2187 return unescape(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + escape(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); 2188 } 2189 2190 2191 setSortDropDown(); 2192 function setSortDropDown(){ 2193 var pageLink = document.location.href; 2194 if(!pageLink.includes("SortBy")){ 2195 2196 } 2197 else{ 2198 var sortby1 = pageLink.split('SortBy=')[1]; 2199 var sortby = sortby1.split('&SortOrder=')[0]; 2200 var sortorder = sortby1.split('&SortOrder=')[1]; 2201 var sortstring = sortby.toLowerCase()+sortorder.toLowerCase(); 2202 document.getElementById("sortSelect").value = sortstring; 2203 } 2204 } 2205 function SortProductsBy(sortcode) { 2206 var Page = "@grouplink"; 2207 var pageLink = document.location.href; 2208 var paraJoinSign = ""; 2209 if(location.href.indexOf('?') >= 0) { 2210 paraJoinSign = "&"; 2211 } else { 2212 paraJoinSign = "?"; 2213 } 2214 2215 if(!pageLink.includes("SortBy")){ 2216 document.location.href = location.href + paraJoinSign + "SortBy=" + sortcode; 2217 } 2218 else{ 2219 var pageUrl = window.location.href; 2220 if(pageUrl.includes("Purge=True")){ 2221 var withoutParam = pageUrl.split('&')[0]; 2222 document.location.href = withoutParam + paraJoinSign + "SortBy=" + sortcode; 2223 }else{ 2224 var withoutParameter = pageUrl.split('?')[0]; 2225 document.location.href = withoutParameter + "?SortBy=" + sortcode; 2226 } 2227 } 2228 } 2229 2230 function compareProducts(compareId,productName,productLink,checked){ 2231 2232 if(!checked){ 2233 Compare.remove(compareId); 2234 2235 } 2236 else{ 2237 Compare.add(compareId,productName,productLink); 2238 } 2239 2240 } 2241 </script> 2242 @* ----- qty controller Begin----- *@ 2243 <script type="text/javascript" src="/Files/Templates/Designs/PLC/js/PLCAddToCartQtyController.js"></script> 2244 @* ----- qty controller End------- *@