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