| 0
|

 

Fish4dogs



Fish4Dogs is an award-winning company that produces fish dog food and treats using premium fish that isn’t wanted for human consumption . 
There are abundant benefits for pets to consume fish, including strengthening of brain development, easing of digestion and enhancing skin and coat health.

With the knowledge that most dogs may be allergic to ingesting grain, Fish4Dogs uses substitute ingredients such as potato and pea to help your dog feel fuller for a longer time, which aids in weight control and maintaining a balanced Glycemic Index as well.

To date, Fish4Dogs products have gotten 2,000 positive reviews from verified buyers, with an average rating of 4.85 out of 5 stars. This is an impressive testament to the popularity of their delicious fish dog food!

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, You consent to the use of All the cookies.

เว็บไซต์ของเรามีการใช้คุกกี้ เพื่อให้คุณได้รับประสบการณ์ที่เกี่ยวข้องมากที่สุดโดยจดจำการตั้งค่าของคุณและการเยี่ยมชมซ้ำ การคลิก"ยอมรับ" แสดงว่าคุณยินยอมให้ใช้คุกกี้ทั้งหมด