|
Log In |
Register
|
Above $80

Error executing template "Designs/PLC/eCom/Product/PLCProductDetail.cshtml"
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at CompiledRazorTemplates.Dynamic.RazorEngine_f7b9df94bd784ff7bf237b89664761f2.Execute() in E:\www\LIVE_(9.14.9)\Solutions\Files (9.14.9)\Templates\Designs\PLC\eCom\Product\PLCProductDetail.cshtml:line 1521
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.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using DWAPAC.PLC.Services 2 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/css/ProductDetailStyle.css" type="text/css"> 3 4 @{ 5 string currentAbsoluteUriString = System.Web.HttpContext.Current.Request.Url.AbsoluteUri; 6 var userAgent = HttpContext.Current.Request.UserAgent.ToLower(); 7 8 Uri currentAbsoluteUri = new Uri(currentAbsoluteUriString); 9 string plcUrl = currentAbsoluteUri.Scheme + "://" + currentAbsoluteUri.Host; 10 string showHide = string.Empty; 11 12 Dynamicweb.Ecommerce.Products.Product dwProduct = new Dynamicweb.Ecommerce.Products.Product(); 13 dwProduct = Dynamicweb.Ecommerce.Products.Product.GetProductById(GetString("Ecom:Product.ID")); 14 if (dwProduct.ExcludeFromIndex) 15 { 16 System.Web.HttpContext.Current.Response.Redirect("/404-error-page"); 17 } 18 } 19 20 @{ 21 string promoName = ""; 22 string promoD = ""; 23 int pId = GetInteger("Ecom:Product.ID"); 24 List<string> productPromoNames = new List<string>(); 25 @*var promosqlString = "SELECT discountname, discountdescription FROM ecomdiscount WHERE DISCOUNTACTIVE='true' and discountproductsandgroups LIKE '%p:" + pId + "%'";*@ 26 @*var promosqlString = "SELECT DISCOUNTNAME,DISCOUNTDESCRIPTION FROM EcomDiscountExtView where DISCOUNTPRODUCTSANDGROUPS LIKE '%p:" + pId + ",%'";*@ 27 string promosqlString = "SELECT DiscountName, DiscountDescription FROM PLC_EcomDiscountJoinedView WHERE DiscountProductIdByDiscount = '" + pId + "' OR DiscountProductsAndGroups LIKE '%p:" + pId + ",%'"; 28 using (System.Data.IDataReader promoNameReder = Dynamicweb.Data.Database.CreateDataReader(promosqlString)) 29 { 30 while (promoNameReder.Read()) 31 { 32 promoName += promoNameReder["discountname"].ToString() + "<br>" + "<div style='font-size: small; margin-top: 7px;'>" + promoNameReder["discountdescription"].ToString() + "</div>" + "<br>"; 33 @*//promoD += promoNameReder["discountdescription"].ToString() + "<br>";*@ 34 } 35 } 36 List<string> resourceImagesList = new PLCSource.Utilities.ImageUtility().GetResourceTagImages(GetString("Ecom:Product.ID")); 37 string resourceImagesListShow = ""; 38 if (resourceImagesList == null || resourceImagesList.Count() < 1 ) 39 { 40 resourceImagesListShow = "display: none;"; 41 } 42 } 43 44 <script> 45 var canAddToCart = true; 46 </script> 47 48 @using System.Web 49 50 @using System.Text.RegularExpressions 51 @using System.Web 52 53 54 @functions{ 55 public class WrapMethods 56 { 57 58 59 //Gets the contrasting color 60 public static string getContrastYIQ(string hexcolor) 61 { 62 if (hexcolor != "") 63 { 64 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 65 66 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 67 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 68 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 69 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 70 71 if (yiq >= 128) 72 { 73 return "black"; 74 } 75 else 76 { 77 return "white"; 78 } 79 } 80 else 81 { 82 return "black"; 83 } 84 } 85 86 87 //Truncate text 88 public static string Truncate (string value, int count, bool strip=true) 89 { 90 if (strip == true){ 91 value = StripHtmlTagByCharArray(value); 92 } 93 94 if (value.Length > count) 95 { 96 value = value.Substring(0, count - 1) + "..."; 97 } 98 99 return value; 100 } 101102103 //Strip text from HTML 104 public static string StripHtmlTagByCharArray(string htmlString) 105 { 106 char[] array = new char[htmlString.Length]; 107 int arrayIndex = 0; 108 bool inside = false; 109110 for (int i = 0; i < htmlString.Length; i++) 111 { 112 char let = htmlString[i]; 113 if (let == '<') 114 { 115 inside = true; 116 continue; 117 } 118 if (let == '>') 119 { 120 inside = false; 121 continue; 122 } 123 if (!inside) 124 { 125 array[arrayIndex] = let; 126 arrayIndex++; 127 } 128 } 129 return new string(array, 0, arrayIndex); 130 } 131132 //Make the correct count of columns 133 public static string ColumnMaker(int Col, string ScreenSize) 134 { 135 string Columns = ""; 136137 switch (Col) 138 { 139 case 1: 140 Columns = "col-"+ScreenSize+"-12"; 141 break; 142143 case 2: 144 Columns = "col-"+ScreenSize+"-6"; 145 break; 146147 case 3: 148 Columns = "col-"+ScreenSize+"-4"; 149 break; 150151 case 4: 152 Columns = "col-"+ScreenSize+"-3"; 153 break; 154155 default: 156 Columns = "col-"+ScreenSize+"-3"; 157 break; 158 } 159160 return Columns; 161 } 162163164 private string Custom(string firstoption, string secondoption) 165 { 166 if (firstoption == "custom") 167 { 168 return secondoption; 169 } 170 else 171 { 172 return firstoption; 173 } 174 } 175 } 176 } 177 @using DWAPAC.PLC.Services 178 @using Dynamicweb.Security.UserManagement.Common.CustomFields 179180 <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> 181 <script type="text/javascript" src="/Files/Templates/Designs/PLC/eCom/ProductList/Compare.js"></script> 182 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/css/ProductRenderStyle.css" type="text/css"> 183184 <style> 185 .ui-dialog-titlebar, .ui-dialog-buttonset button{ 186 background:#662010; 187 color: #FFF; 188 } 189 .product-box .prod-img img { 190 display: block; 191 margin: 0px auto; 192 } 193194 input[type=number]::-webkit-inner-spin-button, 195 input[type=number]::-webkit-outer-spin-button { 196 -webkit-appearance: none; 197 -moz-appearance: none; 198 appearance: none; 199 margin: 0; 200 } 201202 @if(GetInteger("Ecom:ProductList.PageProdCnt") > 0) 203 { 204 <text> 205 .btn-addto-cart { 206 margin-bottom:5px; 207 background-color: #ad2d14; 208 height:38px; 209 border-radius: 3px; 210 } 211 .btn-addto-cart:hover { 212 //background-color: #500d00; 213 } 214 .glyphicon-minus, .glyphicon-plus { 215 cursor: pointer; 216 color: #ffffff; 217 } 218 </text> 219 if(System.Web.HttpContext.Current.Request.Browser.Type.ToUpper().Contains("SAFARI")) 220 { 221 <text> 222 .btn-addto-cart div a, .btn-addto-cart a { 223 line-height: 36px; 224 } 225 #addtocartLink { 226 margin-top: 30px !important; 227 } 228 @@media screen (max-width: 340px){ 229 .btn-addto-cart div a, .btn-addto-cart a { 230 padding-top: 0px; 231 } 232 } 233 .fixsize { 234 margin-top: 120px; 235 } 236 </text> 237 } 238 } 239 else 240 { 241 if(System.Web.HttpContext.Current.Request.Browser.Type.ToUpper().Contains("SAFARI")) 242 { 243 <text> 244 .btn-addto-cart div a, .btn-addto-cart a { 245 line-height: 36px; 246 } 247 #addtocartLink { 248 margin-top: 30px !important; 249 } 250 @@media screen (max-width: 340px){ 251 .btn-addto-cart div a, .btn-addto-cart a { 252 padding-top: 0px; 253 } 254 } 255 </text> 256 } 257 } 258 </style> 259260 <script> 261 var items = []; 262 var productId = []; 263 var productName = []; 264 var productCurrency = []; 265 var productDiscount = []; 266 var productBrand = []; 267 var firstCategory = []; 268 var secondCategory = []; 269 var thirdCategory = []; 270 var productFlavour = []; 271 var productColor = []; 272 var productSize = []; 273 var sellingPrice = []; 274 </script> 275276 @functions 277 { 278 public class SortInPage 279 { 280 public string StockStatus { get; set; } 281 public int StockStatusSortValue { get; set; } 282 public string ProductId { get; set; } 283 public string BrandName { get; set; } 284 public int BestSelling { get; set; } 285 public double TotalAmountSold { get; set; } 286 public double Price { get; set; } 287 public bool NewArrival { get; set; } 288 public int AutoId { get; set; } 289 } 290 } 291292 @helper GetProductList(dynamic ProductLoop, bool birthday, string becomeAMemberPrice, int ColMD = 3, int ColSM = 3, int ColXS = 1) 293 { 294 var Loop = GetLoop("Products").ToList(); 295 List<SortInPage> SortInPageList = new List<SortInPage>(); 296 string SortByValue = "TotalAmtSold".ToUpper(); 297 if (!string.IsNullOrEmpty(HttpContext.Current.Request["SortOrder"])) 298 { 299 SortByValue = Convert.ToString(HttpContext.Current.Request["SortBy"]).ToUpper(); 300 if (SortByValue.Contains("NewArrivals".ToUpper())) 301 { 302 SortByValue = "NewArrivals".ToUpper(); 303 } 304 } 305 string SortOrderValue = "Asc".ToUpper(); 306 if (!string.IsNullOrEmpty(HttpContext.Current.Request["SortOrder"])) 307 { 308 SortOrderValue = Convert.ToString(HttpContext.Current.Request["SortOrder"]).ToUpper(); 309 if (SortOrderValue.Contains("Desc".ToUpper())) 310 { 311 SortOrderValue = "Desc".ToUpper(); 312 } 313 } 314315 var birthday0 = false; 316 bool showBirthdayPrice = false; 317 bool userHasVIPCard = false; 318 bool userHasValidVipCard = false; 319 DateTime expDate = new DateTime(); 320 DateTime today = DateTime.Now; 321322 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 323 { 324 int i = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID")); 325 Dynamicweb.Security.UserManagement.User u = Dynamicweb.Security.UserManagement.User.GetUserByID(i); 326327 foreach (CustomFieldValue val in u.CustomFieldValues) 328 { 329 CustomField field = val.CustomField; 330 string fieldName = field.Name; 331332 if (fieldName == "DOB") 333 { 334 DateTime bDay = new DateTime(); 335 if (val.Value != null) 336 { 337 bDay = Dynamicweb.Core.Converter.ToDateTime(val.Value); 338 if (bDay.Month == today.Month) 339 { 340 birthday0 = true; 341 } 342 } 343 } 344 if (fieldName == "ExpryDate") 345 { 346 expDate = Dynamicweb.Core.Converter.ToDateTime(val.Value); 347 } 348349 switch (fieldName.ToUpper()) 350 { 351 case "VIP CARD NO": 352 userHasVIPCard = !string.IsNullOrEmpty((val.Value).ToString()); 353 break; 354 case "EXPRYDATE": 355 userHasValidVipCard = expDate.Date <= today.Date; 356 break; 357 default: 358 break; 359 } 360 } 361 } 362 showBirthdayPrice = birthday0 && userHasVIPCard && userHasValidVipCard; 363364 string pathproduct = "/Files/Images/plc"; 365 string imgpath = "/Files/Images/Ecom/Products/"; 366 string imgpathpng = ""; 367 string pidString = ""; 368 var loopCounter = 0; 369 List<string> statusList = new List<string>(); 370371 foreach (LoopItem product1 in Loop) 372 { 373 string pid1 = product1.GetString("Ecom:Product.ID"); 374 pidString += "[" + pid1 + "],"; 375 } 376 pidString = pidString.Remove(pidString.Length - 1); 377 pidString = "{" + pidString; 378 pidString = pidString + "}"; 379380 var response = WebServices.getProductMultiStatusAdvServiceResponse(pidString); 381382 var responseSplit = response.Split(';'); 383 if (responseSplit[0].Contains("500")) 384 { 385 <style> 386 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) { 387 .mainImg { 388 padding-left: 85px; 389 } 390 } 391392 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) { 393 .mainImg { 394 padding-left: 222px; 395 } 396 } 397 </style> 398 if (Pageview.Device.ToString().ToUpper() == "MOBILE") 399 { 400 <div style="padding-left: 60px;" name="under_maintenance"> 401 <img src="/Files/Templates/Designs/PLC/assets/images/under_maintenance_icon.png" class="mainImg" alt="Under Maintenance"><br><br> 402 <span style="font-size: 20px;font-weight: 700;">Sorry, we are facing a temporary server error. Please try again later.</span> 403 </div> 404 } 405 else if (Pageview.Device.ToString().ToUpper() == "TABLET") 406 { 407 <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> 408 } 409 else 410 { 411 <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> 412 } 413 return; 414 } 415416 string productResponse = responseSplit[2].Split('{')[1].Replace("}", ""); 417418 var singleProduct = productResponse.Split(','); 419 for (var i = 0; i < singleProduct.Length; i++) 420 { 421 string string1 = singleProduct[i].Remove(singleProduct[i].Length - 1).Remove(0, 1); 422 statusList.Add(string1.Split(':')[1]); 423424 SortInPage sortInPage = new SortInPage(); 425 sortInPage.StockStatus = Convert.ToString(string1.Split(':').LastOrDefault()); 426 switch (sortInPage.StockStatus.ToUpper()) 427 { 428 case "AVAILABLE": 429 sortInPage.StockStatusSortValue = 1; 430 break; 431 case "IN STOCK": 432 sortInPage.StockStatusSortValue = 2; 433 @*if (SortByValue.ToUpper() == "INTERNETPRICE") 434 { 435 sortInPage.StockStatusSortValue = 2; 436 }*@ 437 break; 438 case "SPECIAL ORDER": 439 sortInPage.StockStatusSortValue = 3; 440 break; 441 default: 442 sortInPage.StockStatusSortValue = 0; 443 break; 444 } 445446 sortInPage.ProductId = Convert.ToString(string1.Split(':').FirstOrDefault()); 447448 var sortInPageProduct = Loop.FirstOrDefault(x => x.GetString("Ecom:Product.ID") == sortInPage.ProductId); 449450 sortInPage.BrandName = sortInPageProduct.GetString("Ecom:Product:Field.ProductBrand"); 451 sortInPage.BestSelling = sortInPageProduct.GetInteger("Ecom:Product:Field.BestSelling.Value.Clean"); 452 sortInPage.Price = Math.Floor((sortInPageProduct.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200; 453 sortInPage.TotalAmountSold = Dynamicweb.Core.Converter.ToDouble(Dynamicweb.Ecommerce.Products.Product.GetProductById(sortInPage.ProductId).ProductFieldValues.GetProductFieldValue("BestSellingAmount").Value); 454 sortInPage.NewArrival = sortInPageProduct.GetBoolean("Ecom:Product:Field.NewArrivals.Value.Clean"); 455456 Dynamicweb.Ecommerce.Products.Product product = Dynamicweb.Ecommerce.Services.Products.GetProductById(sortInPage.ProductId, null, null); 457458 sortInPage.AutoId = Dynamicweb.Core.Converter.ToInt32(product?.AutoId); 459460 SortInPageList.Add(sortInPage); 461 } 462463 if (SortOrderValue == "DESC") 464 { 465 switch (SortByValue.ToUpper()) 466 { 467 case "TOTALAMTSOLD": 468 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenByDescending(x => x.TotalAmountSold).ToList(); 469 break; 470 case "BRAND": 471 SortInPageList = SortInPageList.OrderByDescending(x => x.BrandName).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.TotalAmountSold).ThenByDescending(x => x.AutoId).ToList(); 472 break; 473 case "INTERNETPRICE": 474 SortInPageList = SortInPageList.OrderByDescending(x => x.Price).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList(); 475 break; 476 case "NEWARRIVALS": 477 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList(); 478 break; 479 case "AUTOID": 480 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ToList(); 481 break; 482 } 483 } 484 else 485 { 486 switch (SortByValue.ToUpper()) 487 { 488 case "TOTALAMTSOLD": 489 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenBy(x => x.TotalAmountSold).ToList(); 490 break; 491 case "BRAND": 492 SortInPageList = SortInPageList.OrderBy(x => x.BrandName).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.TotalAmountSold).ThenByDescending(x => x.AutoId).ToList(); 493 break; 494 case "INTERNETPRICE": 495 SortInPageList = SortInPageList.OrderBy(x => x.Price).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList(); 496 break; 497 case "NEWARRIVALS": 498 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList(); 499 break; 500 case "AUTOID": 501 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ToList(); 502 break; 503 } 504 } 505506 if (responseSplit[0].Contains("200")) 507 { 508 foreach (LoopItem product1 in Loop) 509 { 510 var sellingPrice1 = Math.Floor((product1.GetDouble("Ecom:Product:Field.ProductSPrice")) * 1000 / 5) / 200; 511 var internetPrice1 = Math.Floor((product1.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200; 512 <script> 513 items.push({ 514 'item_id': "@product1.GetString("Ecom:Product.ID")", 515 'item_name': "@product1.GetString("Ecom:Product.Name")", 516 'currency': "@product1.GetString("Ecom:Product.Price.Currency.Code")", 517 'discount': @string.Format("{0:0.00}", sellingPrice1-internetPrice1), 518 'index': 0, 519 'item_brand': "@product1.GetString("Ecom:Product:Field.ProductBrand")", 520 'item_category': "@product1.GetString("Ecom:Product:Field.FirstCategory")", 521 'item_category2': "@product1.GetString("Ecom:Product:Field.SecondCategory")", 522 'item_category3': "@product1.GetString("Ecom:Product:Field.ThirdCategory")", 523 'item_variant1': "@product1.GetString("Ecom:Product:Field.Flavour.Value")", 524 'item_variant2': "@product1.GetString("Ecom:Product:Field.Color.Value")", 525 'item_variant3': "@product1.GetString("Ecom:Product:Field.Size.Value")", 526 'price': @sellingPrice1, 527 'quantity': 1 528 }) 529 productId.push("@product1.GetString("Ecom:Product.ID")"); 530 productName.push("@product1.GetString("Ecom:Product.Name")"); 531 productCurrency.push("@product1.GetString("Ecom:Product.Price.Currency.Code")"); 532 productDiscount.push("@string.Format("{0:0.00}", sellingPrice1-internetPrice1)"); 533 productBrand.push("@product1.GetString("Ecom:Product:Field.ProductBrand")"); 534 firstCategory.push("@product1.GetString("Ecom:Product:Field.FirstCategory")"); 535 secondCategory.push("@product1.GetString("Ecom:Product:Field.SecondCategory")"); 536 thirdCategory.push("@product1.GetString("Ecom:Product:Field.ThirdCategory")"); 537 productFlavour.push("@product1.GetString("Ecom:Product:Field.Flavour.Value")"); 538 productColor.push("@product1.GetString("Ecom:Product:Field.Color.Value")"); 539 productSize.push("@product1.GetString("Ecom:Product:Field.Size.Value")"); 540 sellingPrice.push("@sellingPrice1"); 541 </script> 542 } 543 foreach (SortInPage sortInPage in SortInPageList) 544 { 545 var product = Loop.FirstOrDefault(x => x.GetString("Ecom:Product.ID") == sortInPage.ProductId); 546547 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 //Promotion 553 imgpath = "/Files/Images/Ecom/Products/"; 554 string promoName = ""; 555 string promoD = ""; 556 List<string> productPromoNames = new List<string>(); 557 @*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.DISCOUNTPRODUCTSANDGROUPS LIKE '%p:" + pid + "%'";*@ 558 var promosqlString = "SELECT DISCOUNTNAME,DISCOUNTDESCRIPTION FROM EcomDiscountExtView where 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 GroupLink = "Default.aspx?ID=298&ProductID=" + pid; ; 572 string Number = product.GetString("Ecom:Product.Number"); 573574 string ProdBrand = product.GetString("Ecom:Product:Field.ProductBrand").Replace("'", @"\-"); 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 } 587588 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"); 595596 var sellingPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSPrice")) * 1000 / 5) / 200; 597 var internetPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200; 598 var price = 9.95; 599 var savePrice = sellingPrice - internetPrice; 600601 if (price == product.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) 602 { 603 internetPrice = product.GetDouble("Ecom:Product:Field.ProductSInternetPrice"); 604 } 605 Boolean inventoryDiscount = product.GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag"); 606 var discountPercentage = product.GetDouble("Ecom:Product:Field.ProductInventoryDiscount"); 607 var birthdayPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSBirthdayPrice")) * 1000 / 5) / 200; 608 var memberPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSMemberPrice")) * 1000 / 5) / 200; 609 var disable = product.GetBoolean("Ecom:Product:Field.Disable"); 610 var promotion = 0.00; 611 var discountType = ""; 612 var promoNames = ""; 613 var testingNames = ""; 614 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"); 620621 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 { 627628 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 } 639640 if (pid != "PROD1" && pid != "PROD2") 641 { 642 <!--product start--> 643 if (!disable) 644 { 645 <div class="product-box col-1-3 tab-col-1-2 mobile-col-1-1" id="get_@pid"> 646 <div class="prod-img"> 647 @if (promotion != 0) 648 { 649 if (discountType == "PERCENT") 650 { 651 @*<div class="ribbon-P"><span>@promotion% Off</span></div>*@ 652 } 653 else 654 { 655 @*<div class="ribbon-P"><span>$@promotion Off</span></div>*@ 656 } 657 } 658 else 659 { 660 //add ERP discount ribbon 661 if (inventoryDiscount) 662 { 663 if (discountPercentage != 0) 664 { 665 @*<div class="ribbon-D"><span>@discountPercentage% Off</span></div>*@ 666 } 667 } 668 } 669 @*//add ERP discount ribbon*@ 670 @if (inventoryDiscount && discountPercentage != 0) 671 { 672 <div class="ribbon-D"><span>@discountPercentage% Off</span></div> 673 } 674 <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)'> 675 <img src="/Admin/Public/Getimage.ashx?width=1&&format=webp&image=/Files/Images/default.png" data-src="/Admin/Public/Getimage.ashx?width=147&&format=webp&image=@Image" class="img-responsive yall_lazy" id="img_@pid" alt="@Name @Number" title="@Name @Number"> 676 </a> 677 </div> 678 @if (promoName != "") 679 { 680 <span class="top tipso_style" data-tipso='@promoName.Replace("\"", "&quot;").Replace("'","&#39;").Replace("<","&lt;").Replace(">","&gt;")'> 681 @if (GetGlobalValue("Global:Extranet.UserName") != "") 682 { 683 <div style="background: linear-gradient(to right, #ec5a11 , #f4a413 ); text-align: center; font-size: medium; color: white; font-weight: 600; height:22px;">PROMOTION</div> 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; height:22px;"><img data-src="/Admin/Public/Getimage.ashx?width=16&&format=webp&image=/Files/Templates/Designs/PLC/assets/images/login_promo.png" class="yall_lazy" style="padding-bottom:2px;"> LOGIN PROMO</div> 688 } 689 </span> 690 } 691 else 692 { 693 <div class="mblpromologo mblpromologo1 mblPromologoipad mblPromologoipad1 mblPromologolap" style="background: white; text-align: center; font-size: medium; color: white; font-weight: 600; height:22px;"></div> 694 } 695 <p class="prod-name"> 696 <span class="brand-name">@ProdBrand.Replace(@"\-", "'")</span> 697 <br /> @product.GetString("Ecom:Product.Name") 698 </p> 699700701702 <div class="prod-star" style="display:none;"> 703 @if (@Rating == 0) 704 { 705 <label class="starUnselected"></label> 706 <label class="starUnselected"></label> 707 <label class="starUnselected"></label> 708 <label class="starUnselected"></label> 709 <label class="starUnselected"></label> 710 } 711 @if (Rating % 1 != 0) 712 { 713 for (var i = 1; i < @Rating; i++) 714 { 715 <label class="starSelected"></label> 716 } 717 <label class="starSelected half"></label> 718 } 719 else 720 { 721 for (var i = 1; i < @Rating + 1; i++) 722 { 723 <label class="starSelected"></label> 724 } 725 } 726727728 </div> 729 <div class="prod-pbox"> 730 @if (inventoryDiscount) 731 { 732 if (sellingPrice != internetPrice) 733 { 734 <div class="prod-price"> 735 <p class="op">[email protected]("{0:0.00}", sellingPrice)</p> 736 <p class="np">[email protected]("{0:0.00}", internetPrice)</p> 737 <p class="save-price">Save [email protected]("{0:0.00}", sellingPrice - internetPrice)</p> 738 </div> 739 } 740 else if (sellingPrice == internetPrice) 741 { 742 <div class="prod-price"> 743 <p class="np">[email protected]("{0:0.00}", sellingPrice)</p> 744 </div> 745 } 746 <div style="height:65px;"> 747 @* Add gap to fix aligment *@ 748 <div class="member-price"></div> 749 </div> 750 } 751 @*inventoryDiscount false*@ 752 else 753 { 754 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 755 { 756 <div class="prod-price"> 757 <p class="np">[email protected]("{0:0.00}", sellingPrice)</p> 758 </div> 759 <div style="height:65px;"> 760 <div class="member-price"> 761 @if (memberPrice > 0) 762 { 763 <div id="proId" style="display:none"></div> 764 <div class="title" id="memberId"> 765 VIP Member&nbsp; 766 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price"> 767 <img src="@pathproduct/images/icon_info.png" width="15" align="texttop" alt="icon info" title=""> 768 </span> 769 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 770 </div> 771 <div class="title" id="birthdayId"> 772 VIP Birthday&nbsp; 773 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price on your birthday month"> 774 <img src="@pathproduct/images/icon_info.png" width="15" align="texttop" alt="icon info"> 775 </span> 776 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 777 </div> 778779 } 780 @if (birthdayPrice > 0 && showBirthdayPrice) 781 { 782 <div class="title"> 783 VIP Birthday&nbsp; 784 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month "> 785 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 786 </span> 787 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 788 </div> 789 } 790 </div> 791 </div> 792 } 793 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 794 { 795 <div class="prod-price"> 796 <p class="np">[email protected]("{0:0.00}", internetPrice)</p> 797 </div> 798 if (userHasVIPCard) 799 { 800 if (userHasValidVipCard) 801 { 802 <div id="proId" style="display:none"></div> 803 <div style="height:65px;"> 804 <div class="member-price"> 805 <div class="title" id="memberId"> 806 VIP Member&nbsp; 807 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price"> 808 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""> 809 </span> 810 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 811 </div> 812 <div class="title" id="birthdayId"> 813 VIP Birthday&nbsp; 814 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month"> 815 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 816 </span> 817 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 818 </div> 819 </div> 820 </div> 821 } 822823 if (!birthday) 824 { 825 if (!userHasValidVipCard) 826 { 827 <div style="height:65px;"> 828 <div class="member-price"> 829 @if (memberPrice > 0) 830 { 831 <div class="title" id="memberId"> 832 VIP Member&nbsp; 833 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price "> 834 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 835 </span> 836 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 837 </div> 838 } 839 </div> 840 </div> 841 } 842 } 843 else if (birthday) 844 { 845 if (!userHasValidVipCard) 846 { 847 <div style="height:65px;"> 848 <div class="member-price"> 849 <div class="title" id="birthdayId"> 850 VIP Birthday&nbsp; 851 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month"> 852 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon_info"> 853 </span> 854 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 855 </div> 856 </div> 857 </div> 858 } 859 } 860 } 861 else 862 { 863 <div id="proId" style="display:none"></div> 864 <div style="height:65px;"> 865 <div class="member-price"> 866 <div class="title" id="memberId"> 867 VIP Member&nbsp; 868 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price "> 869 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""> 870 </span> 871 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 872 </div> 873 <div class="title" id="birthdayId"> 874 VIP Birthday&nbsp; 875 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month"> 876 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 877 </span> 878 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 879 </div> 880 </div> 881 </div> 882 } 883 } 884 } 885 </div> 886 <!-------------------------------------------------------End Pricing----------------------------------------------------------------------------------------------------> 887 <hr> 888 @{ string tipsoMessage = "no Message Available!"; string statusmsg = "";} 889 @if (product.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 890 { 891 tipsoMessage = "In Store Only"; 892 <ul class="info" style="height: 80px;"> 893 @if (Pageview.Device.ToString().ToUpper() == "MOBILE" || Pageview.Device.ToString().ToUpper() == "TABLET") 894 { 895 <li> 896 *AVAILABLE IN STORE<span class="top tipso_style" data-tipso='In Store Only' style="vertical-align: text-bottom;"> 897 </span> 898 </li> 899 } 900 else 901 { 902 <li> 903 *AVAILABLE IN STORE ONLY<span class="top tipso_style" data-tipso='In Store Only' style="vertical-align: text-bottom;"> 904 </span> 905 </li> 906 } 907 </ul> 908 <div style="margin-bottom: 5px;height: 38px;"></div> 909 } 910 else 911 { 912 tipsoMessage = sortInPage.StockStatus; 913 switch (sortInPage.StockStatus.ToUpper()) 914 { 915 case "AVAILABLE": 916 tipsoMessage = "<strong>For Express Delivery*</strong><br>Receive on the Same or Next working day.<br><br><strong>For Standard Delivery*</strong><br>Earliest delivery within 2 working days from date of order.<br>*T&Cs applies"; 917 statusmsg = "AVAILABLE"; 918 break; 919 case "SPECIAL ORDER": 920 tipsoMessage = "Stocks are subjected to supplier's availability with the earliest delivery in 7 working days from date of order."; 921 break; 922 case "IN STOCK": 923 tipsoMessage = "Stocks are available at our retail stores, with the earliest delivery in 5 working days from date of order."; 924 break; 925 default: 926 tipsoMessage = "no Message Available!"; 927 break; 928 } 929 tipsoMessage = tipsoMessage.Replace("\'", "&#39;"); 930 if (sortInPage.StockStatus.ToUpper() == "SPECIAL ORDER") 931 { 932 <ul class="info" style="height: 110px;"> 933 <li>*@sortInPage.StockStatus </li> 934 <li style="padding-top: 8px;"> 935 This item is sourced upon request. Payment is pre-authorized and only charged upon fulfillment. Delivery starts from 7 business days, subject to availability. 936 </li> 937 </ul> 938 } 939 else 940 { 941 <ul class="info" style="height: 110px;"> 942 <li> 943 <li> 944 *@sortInPage.StockStatus <span class="top tipso_style" data-tipso='@tipsoMessage' style="vertical-align: text-bottom;"> 945 <img src="@pathproduct/images/icon_question_mark.png" alt="icon info" title="" style="width:10px;"> 946 </span> 947 </li> 948 </ul> 949 } 950 } 951 @if (!product.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 952 { 953 <div class="btn-addto-cart smalldev"> 954 <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;"> 955 <span onclick='QtyControlBtn("quantityInput_@pid", "-");' type="button" data-value="-1" data-target="#spinner2" data-toggle="spinner"> 956 <span class="glyphicon glyphicon-minus"></span> 957 </span> 958 <input type="number" onkeydown='QtyKeyControl("quantityInput_@pid", "keydown");' onkeyup='QtyKeyControl("quantityInput_@pid", "keyup");' onfocusout='return QtyKeyControl("quantityInput_@pid", "focusout");' class="selectbox-qty customqtybox cus-prolist__qtybox" id="quantityInput_@pid" value="1" min="1" max="9999"> 959 <span onclick='QtyControlBtn("quantityInput_@pid", "+");' type="button" data-value="2" data-target="#spinner2" data-toggle="spinner"> 960 <span class="glyphicon glyphicon-plus"></span> 961 </span> 962 </div> 963 <div class="col-md-6 col-sm-6 col-xs-6 mblAddTo" style="padding: 1px 5px;display: table-cell;"> 964 <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;"> 965 <i class="fa fa-shopping-cart"></i> 966 <span class="MainAddToCart">Add to cart</span><span class="SubAddToCart">Add</span> 967 </a> 968 </div> 969 </div> 970 } 971 else 972 { 973 <div class="btn-addto-cart" style="margin-bottom:5px; cursor:not-allowed; display:none;"> 974 <a><i class="fa fa-shopping-cart"></i> In Store Only </a> 975 </div> 976 } 977978 <div class="prod-compare" style="height : 35px;"> 979 <form> 980 <label> 981 Compare 982 <input type="checkbox" id='@product.GetString("Ecom:Product.CompareID")' name="compareproduct" onclick="compareProducts('@product.GetString("Ecom:Product.CompareID")', '@product.GetString("Ecom:Product.Name")', '@product.GetString("Ecom:Product.LinkGroup.Clean")',$(this).prop('checked'));$('html, body').animate({scrollTop: $('.compare-box').offset().top}, 500);"> 983 <span></span> 984 </label> 985 </form> 986 </div> 987 </div> 988 } 989 <!--product end--> 990 } 991 loopCounter++; 992 } 993 } 994 <div onclick="topFunction()" id="myBtn" title="Go to top"></div> 995 } 996 <script> 997 $(document).ready(function () { 998 viewItemList(productId, productName, productCurrency, productDiscount, productBrand, firstCategory, secondCategory, thirdCategory, productFlavour, productColor, productSize, sellingPrice); 999 }); 1000 function topFunction() { 1001 $('html, body').animate({ scrollTop: 0 }, 'fast') 1002 } 10031004 window.onscroll = function() {scrollFunction()}; 10051006 function scrollFunction() { 1007 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 1008 document.getElementById("myBtn").style.display = "block"; 1009 } else { 1010 document.getElementById("myBtn").style.display = "none"; 1011 } 1012 } 1013 function addtocartAjax(pid, pbrand, productName, PriceWithVAT, CurrencySymbol) { 1014 pbrand = pbrand.replace("\-", "'"); 1015 ShowAddedItem_Then_AjaxAddToCart(" ", pid, pbrand.replace(' & ', ' myAND '), productName.replace(' & ', ' myAND ').replace('\"', ''), PriceWithVAT, CurrencySymbol, $("#quantityInput_" + pid).val(), true, "&cartcmd=add&productid=" + pid + "&quantity="); 1016 } 1017 </script> 1018 @using DWAPAC.PLC.Services 1019 @{ 1020 string path = "/Admin/Public/Getimage.ashx?width=300&&format=webp&image="; 1021 string imgpath = "/Files/Images/Ecom/Products/"; 1022 var birthday = false; 1023 bool showBirthdayPrice = false; 1024 bool userHasVIPCard = false; 1025 bool userHasValidVipCard = false; 1026 DateTime expDate = new DateTime(); 1027 DateTime today = DateTime.Now; 1028 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 1029 { 1030 int i = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID")); 1031 Dynamicweb.Security.UserManagement.User u = Dynamicweb.Security.UserManagement.User.GetUserByID(i); 10321033 foreach (CustomFieldValue val in u.CustomFieldValues) 1034 { 1035 CustomField field = val.CustomField; 1036 string fieldName = field.Name; 10371038 if (fieldName == "DOB") 1039 { 1040 DateTime bDay = new DateTime(); 1041 if (val.Value != null) 1042 { 1043 bDay = Dynamicweb.Core.Converter.ToDateTime(val.Value); 1044 if (bDay.Month == today.Month) 1045 { 1046 birthday = true; 1047 } 1048 } 1049 } 1050 if (fieldName == "ExpryDate") 1051 { 1052 expDate = Dynamicweb.Core.Converter.ToDateTime(val.Value); 1053 } 1054 switch (fieldName.ToUpper()) 1055 { 1056 case "VIP CARD NO": 1057 userHasVIPCard = !string.IsNullOrEmpty((val.Value).ToString()); 1058 break; 1059 case "EXPRYDATE": 1060 userHasValidVipCard = expDate.Date >= today.Date; 1061 break; 1062 default: 1063 break; 1064 } 1065 } 1066 } 1067 showBirthdayPrice = birthday && userHasVIPCard && userHasValidVipCard; 1068 string firstCategory = GetString("Ecom:Product:Field.FirstCategory"); 1069 string secondCategory = GetString("Ecom:Product:Field.SecondCategory"); 1070 string thirdCategory = GetString("Ecom:Product:Field.ThirdCategory"); 1071 string pid = GetString("Ecom:Product.ID"); 10721073 string Image = GetString("Ecom:Product.ImageMedium.Default.Clean"); 1074 string imgpathjpg = imgpath + pid + ".jpg"; 1075 string imgpathpng = imgpath + pid + ".png"; 1076 var absolutePathsjpg = System.Web.HttpContext.Current.Server.MapPath("~/" + imgpathjpg); 1077 var absolutePathpng = System.Web.HttpContext.Current.Server.MapPath("~/" + imgpathpng); 1078 if (System.IO.File.Exists(absolutePathsjpg)) 1079 { 1080 Image = imgpathjpg; 1081 } 1082 else if (System.IO.File.Exists(absolutePathpng)) 1083 { 1084 Image = imgpathpng; 1085 } 10861087 var ProdImgLargePath = "/Files/Images/Ecom/Products/Large/"; 1088 string ProdImgLarge = GetString("Ecom:Product.ImageLarge.Default.Clean"); 1089 ProdImgLargePath = ProdImgLargePath + pid + ".jpg"; 1090 var absolutePathjpg = System.Web.HttpContext.Current.Server.MapPath("~/" + ProdImgLargePath); 1091 if (System.IO.File.Exists(absolutePathjpg)) 1092 { 1093 ProdImgLarge = ProdImgLargePath; 1094 } 10951096 string ProdName = GetString("Ecom:Product.Name"); 1097 string ProdBarCode = GetString("Ecom:Product:Field.ProductBarCode"); 1098 string pathproduct = "/Files/Images/plc"; 1099 string productNumber = GetString("Ecom:Product.Number"); 1100 string pageID = GetString("Ecom:Product:Page.ID"); 1101 string skuCode = GetString("Ecom:Product:Field.SKUCode"); 1102 string productSize = GetString("Ecom:Product:Field.Size"); 1103 string productFlavour = GetString("Ecom:Product:Field.Flavour"); 1104 string productColor = GetString("Ecom:Product:Field.Color"); 11051106 bool hasSize = !string.IsNullOrEmpty(GetString("Ecom:Product:Field.Size")); 1107 bool hasFlavour = !string.IsNullOrEmpty(GetString("Ecom:Product:Field.Flavour")); 1108 bool hasColor = !string.IsNullOrEmpty(GetString("Ecom:Product:Field.Color")); 1109 int hasVariantCount = 0; 1110 hasVariantCount += hasSize ? 1 : 0; 1111 hasVariantCount += hasFlavour ? 1 : 0; 1112 hasVariantCount += hasColor ? 1 : 0; 11131114 string ProdStock = GetString("Ecom:Product.Stock"); 1115 string ProdRating = GetString("Comments.Rating.Rounded2"); 1116 string ProdLongDesc = GetString("Ecom:LongDescription"); 1117 string ProdBrand = GetString("Ecom:Product:Field.ProductBrand"); 1118 string ProdBrandEncode = System.Web.HttpUtility.UrlEncode(GetString("Ecom:Product:Field.ProductBrand")); 1119 string ProdInfo = GetString("Ecom:Product:Field.ProductInfo"); 1120 string ProdActualPrice = GetString("Ecom:Product.Price"); 1121 string ProdAvilableAmount = GetString("Ecom:Product.AvilableAmount"); 1122 string ProdDiscount = GetString("Ecom:Product.Discount.Price"); 1123 string ProdReview = GetString("Comments.TotalCount"); 1124 var ProdSMemberPrice = GetDouble("Ecom:Product:Field.ProductSMemberPrice"); 1125 var ProdBDPrice = GetDouble("Ecom:Product:Field.ProductSBirthdayPrice"); 1126 string ProdSCost = GetString("Ecom:Product:Field.ProductSCodt"); 1127 string CurrencyCode = GetString("Ecom:Product.Price.Currency.Code"); 1128 string ProdPubBrand = GetString("Ecom:Product:Field.PublicBrand"); 1129 string ProductVideoUrl = GetString("Ecom:Product:Field.Product_Video_Url"); 1130 var productDetails = GetString("Ecom:Product:Field.ProductInfo"); 1131 bool ProdRepackitems = GetBoolean("Ecom:Product:Field.RepackedItems"); 1132 double productWeight = GetDouble("Ecom:Product.Weight"); 1133 string repackProductId = ""; 1134 double repackPrice = 0.00; 1135 var promoItems = ""; 1136 var promoDescription = ""; 1137 var internetPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200; 1138 var price = 9.95; 11391140 if (price == GetDouble("Ecom:Product:Field.ProductSInternetPrice")) 1141 { 1142 internetPrice = GetDouble("Ecom:Product:Field.ProductSInternetPrice"); 1143 } 11441145 var sellingPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSPrice")) * 1000 / 5) / 200; 1146 Boolean inventoryDiscount = GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag"); 1147 var discountPercentage = GetDouble("Ecom:Product:Field.ProductInventoryDiscount"); 1148 var birthdayPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSBirthdayPrice")) * 1000 / 5) / 200; 1149 var memberPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSMemberPrice")) * 1000 / 5) / 200; 1150 var promotion = 0.00; 1151 var discountType = ""; 1152 foreach (LoopItem item in GetLoop("ProductDiscounts")) 1153 { 1154 if (item.GetString("Ecom:Product.Discount.Type") == "PERCENT") 1155 { 1156 discountType = "PERCENT"; 1157 promotion = item.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted"); 1158 } 1159 else 1160 { 1161 discountType = "AMOUNT"; 1162 promotion = item.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted"); 1163 } 1164 } 11651166 var storeLocationId = WebServices.getProductLocationServiceResponse(pid); 11671168 List<string> storeNameList = new List<string>(); 1169 Dictionary<string, string> storeAddress1List = new Dictionary<string, string>(); 1170 Dictionary<string, string> storeAddress2List = new Dictionary<string, string>(); 1171 Dictionary<string, string> storePhoneNumberList = new Dictionary<string, string>(); 1172 var storeLocationList = "0"; 11731174 if (!string.IsNullOrWhiteSpace(storeLocationId)) 1175 { 1176 var status = storeLocationId.Split(';')[0].Split('=')[1]; 1177 if (status == "200") 1178 { 1179 storeLocationList = storeLocationId.Split(new string[] { "GetProductLocationResult=" }, StringSplitOptions.None)[1]; 1180 storeLocationList = storeLocationList.Substring(1); 1181 storeLocationList = storeLocationList.Remove(storeLocationList.Length - 1).Replace("\"", ""); 1182 } 1183 } 11841185 if (storeLocationList != "0") 1186 { 1187 var storeLocationNoList = storeLocationList.Split(',').Distinct().ToList(); 11881189 foreach (var storeNo in storeLocationNoList) 1190 { 1191 var sqlString = "Select * from PLCStoreLocations where Storeid='" + storeNo + "'"; 1192 using (System.Data.IDataReader myReader2 = Dynamicweb.Data.Database.CreateDataReader(sqlString)) 1193 { 1194 while (myReader2.Read()) 1195 { 1196 if (storeAddress1List.ContainsKey(myReader2["WebName"].ToString()) != true) 1197 { 1198 storeNameList.Add(myReader2["WebName"].ToString()); 1199 storeAddress1List.Add(myReader2["WebName"].ToString(), myReader2["StoreAdd1"].ToString()); 1200 storeAddress2List.Add(myReader2["WebName"].ToString(), myReader2["StoreAdd2"].ToString()); 1201 storePhoneNumberList.Add(myReader2["WebName"].ToString(), myReader2["StoreTel"].ToString()); 1202 } 12031204 } 1205 } 1206 } 12071208 storeNameList = storeNameList.OrderBy(q => q).ToList(); 1209 } 1210 @*//Start of variant selection*@ 12111212 string variantSelector = ""; 12131214 if (!string.IsNullOrEmpty(productSize)) 1215 { 1216 variantSelector = "size"; 1217 } 1218 if (!string.IsNullOrEmpty(productColor)) 1219 { 1220 variantSelector = "color"; 1221 } 1222 if (!string.IsNullOrEmpty(productFlavour)) 1223 { 1224 variantSelector = "flavour"; 1225 } 1226 if (!string.IsNullOrEmpty(productSize) && !string.IsNullOrEmpty(productFlavour)) 1227 { 1228 variantSelector = "flavour"; 1229 } 1230 else if (!string.IsNullOrEmpty(productSize) && !string.IsNullOrEmpty(productColor)) 1231 { 1232 variantSelector = "color"; 1233 } 1234 else if (string.IsNullOrEmpty(productColor) && string.IsNullOrEmpty(productFlavour)) 1235 { 1236 variantSelector = "size"; 1237 } 12381239 List<string> sizeList = new List<string>(); 1240 List<string> flavourList = new List<string>(); 1241 List<string> colorList = new List<string>(); 12421243 if (variantSelector == "color") 1244 { 1245 String SQL = "SELECT DISTINCT(Size) FROM EcomProducts WHERE SKUCodes IN (SELECT SkuCodes FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size IS NOT NULL AND ProductActive = 1"; 1246 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL)) 1247 { 1248 while (myReader.Read()) 1249 { 1250 string size = myReader["Size"].ToString(); 1251 sizeList.Add(size); 1252 } 1253 } 1254 String SQL2 = "SELECT DISTINCT(Color) FROM EcomProducts WHERE SKUCodes = (SELECT DISTINCT(SkuCodes) FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size='" + productSize + "' AND ProductActive = 1"; 1255 using (System.Data.IDataReader myReader2 = Dynamicweb.Data.Database.CreateDataReader(SQL2)) 1256 { 1257 while (myReader2.Read()) 1258 { 1259 string color1 = myReader2["Color"].ToString(); 1260 colorList.Add(color1); 1261 } 1262 } 1263 } 1264 else if (variantSelector == "flavour") 1265 { 1266 String SQL = "SELECT DISTINCT(Size) FROM EcomProducts WHERE SKUCodes IN (SELECT SkuCodes FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size IS NOT NULL AND ProductActive = 1"; 1267 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL)) 1268 { 1269 while (myReader.Read()) 1270 { 1271 string size = myReader["Size"].ToString(); 1272 sizeList.Add(size); 1273 } 1274 } 12751276 String SQL2 = "SELECT DISTINCT(Flavor) FROM EcomProducts WHERE SKUCodes = (SELECT DISTINCT(SkuCodes) FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size='" + productSize + "' AND ProductActive = 1"; 1277 using (System.Data.IDataReader myReader2 = Dynamicweb.Data.Database.CreateDataReader(SQL2)) 1278 { 1279 while (myReader2.Read()) 1280 { 1281 string flavour1 = myReader2["flavor"].ToString(); 1282 flavourList.Add(flavour1); 1283 } 1284 } 1285 } 1286 else if (variantSelector == "size") 1287 { 1288 String SQL = "SELECT DISTINCT(Size) FROM EcomProducts WHERE SKUCodes IN (SELECT SkuCodes FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND ProductActive = 1 AND Size IS NOT NULL AND ProductActive = 1"; 1289 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL)) 1290 { 1291 while (myReader.Read()) 1292 { 1293 string size = myReader["Size"].ToString(); 1294 sizeList.Add(size); 1295 } 1296 } 1297 } 1298 @*//End of Variant*@ 12991300 @*//Start of repack*@ 1301 if (ProdRepackitems) 1302 { 1303 if (productWeight == 0) 1304 { 1305 String SQL = "SELECT FieldValueProductId FROM EcomProductCategoryFieldValue WHERE FieldValueFieldId='Is_Default'"; 1306 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL)) 1307 { 1308 while (myReader.Read()) 1309 { 1310 repackProductId = myReader["FieldValueProductId"].ToString(); 1311 } 1312 } 1313 } 1314 else 1315 { 1316 List<string> WeightList = new List<string>(); 1317 List<string> RepackProductIdList = new List<string>(); 1318 String SQL1 = "SELECT * FROM EcomProductCategoryFieldValue WHERE FieldValueFieldCategoryId='Repack' AND FieldValueFieldId='From_Weight' OR FieldValueFieldId='To_Weight' "; 1319 using (System.Data.IDataReader myReader1 = Dynamicweb.Data.Database.CreateDataReader(SQL1)) 1320 { 1321 while (myReader1.Read()) 1322 { 1323 WeightList.Add(myReader1["FieldValueValue"].ToString()); 1324 RepackProductIdList.Add(myReader1["FieldValueProductId"].ToString()); 1325 } 1326 } 1327 for (int i = 0; i < WeightList.Count; i++) 1328 { 1329 if (productWeight > Double.Parse(WeightList[i])) 1330 { 1331 if (productWeight <= Double.Parse(WeightList[i + 1])) 1332 { 1333 repackProductId = RepackProductIdList[i + 1].ToString(); 1334 } 1335 } 1336 } 1337 } 13381339 string SQL4 = "SELECT ProductSInternetPrice FROM EcomProducts WHERE ProductId='" + repackProductId + "'"; 1340 using (System.Data.IDataReader myReader4 = Dynamicweb.Data.Database.CreateDataReader(SQL4)) 1341 { 1342 while (myReader4.Read()) 1343 { 1344 repackPrice = Double.Parse(myReader4["ProductSInternetPrice"].ToString()); 1345 } 1346 } 1347 } 1348 string brandUrl = ""; 1349 string filePath = System.Web.HttpContext.Current.Server.MapPath("/Files/Files/Algolia/AlgoliaBrandUrls.json"); 1350 if (System.IO.File.Exists(filePath)) 1351 { 1352 string brandAndUrlMaps = System.IO.File.ReadAllText(filePath); 1353 dynamic brandAndUrlMapsJson = Newtonsoft.Json.JsonConvert.DeserializeObject(brandAndUrlMaps); 1354 foreach (dynamic brandAndUrlMap in brandAndUrlMapsJson) 1355 { 1356 if(brandAndUrlMap.BrandName.ToString().ToLower() == ProdBrand.ToLower()){ 1357 brandUrl = brandAndUrlMap.Url.ToString(); 1358 } 1359 } 1360 } 1361 } 13621363 <script> 1364 function setCookie(cname, cvalue, exdays) { 1365 var d = new Date(); 1366 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 1367 var expires = "expires=" + d.toUTCString(); 1368 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 1369 } 1370 function getCookie(cname) { 1371 var name = cname + "="; 1372 var ca = document.cookie.split(';'); 1373 for (var i = 0; i < ca.length; i++) { 1374 var c = ca[i]; 1375 while (c.charAt(0) == ' ') { 1376 c = c.substring(1); 1377 } 1378 if (c.indexOf(name) == 0) { 1379 return c.substring(name.length, c.length); 1380 } 1381 } 1382 return ""; 1383 } 13841385 fbq('track', 'ViewContent', { content_ids: "@productNumber", content_type: "Product", value: "@string.Format("{0:0.00}", internetPrice)", content_name: "@ProdName", currency: "@CurrencyCode", content_category: "@firstCategory, @secondCategory, @thirdCategory" }); 1386 </script> 13871388 @{ 1389 string title = ProdName.ToLower(); 1390 title = char.ToUpper(title[0]) + title.Substring(1); 1391 string descript = @System.Text.Encoding.UTF8.GetString(@System.Text.Encoding.Default.GetBytes(@System.Text.RegularExpressions.Regex.Replace(@GetString("Ecom:Product:Field.ProductInfo"), "<.*?>", String.Empty).Replace("&nbsp;", String.Empty))); 1392 } 13931394 <div hidden>hasSize: @hasSize | hasFlavour: @hasFlavour | hasColor: @hasColor | hasVariantCount: @hasVariantCount</div> 13951396 <meta property="og:title" content="@title"> 1397 <meta property="og:description" content="@descript"> 1398 <meta property="og:url" content="https://www.petloverscentre.com/@GetString("Ecom:Product.LinkGroup.Clean")"> 1399 <meta property="og:image" content="@path@Image"> 1400 <meta property="product:brand" content="@ProdBrand"> 1401 <meta property="product:availability" content="in stock"> 1402 <meta property="product:condition" content="new"> 1403 <meta property="product:price:amount" content="@string.Format("{0:0.00}", sellingPrice)"> 1404 <meta property="product:price:currency" content="SGD"> 1405 <meta property="product:retailer_item_id" content="@pid"> 1406 <meta property="product:category" content="@GetString("Ecom:Product:Field.GoogleCategoryId.Value.Clean")"> 14071408 <div id="get_@pid"> 1409 <div id="dvLoading" style=" 1410 width: 100%; 1411 height: 100%; 1412 background: rgba(0,0,0,0.2); 1413 background-image:url('/Files/Images/plc/images/bx_loader.gif'); 1414 background-repeat:no-repeat; 1415 background-position:center; 1416 z-index:10000000; 1417 position: fixed; 1418 top: 0px; 1419 left: 0px; 1420 display: none;"> 1421 </div> 1422 <div align="center" class="col-1-3" style="margin-top:15px;"> 1423 <form id="@pid" style="display:none" method="post"> 14241425 <input type="" name='ProductLoopCounter@(GetString("Ecom:Product.LoopCounter"))' value='@GetString("Ecom:Product.LoopCounter")' /> 1426 <input type="" name='ProductID@(GetString("Ecom:Product.LoopCounter"))' value='@GetString("Ecom:Product.ID")' /> 1427 <input type="number" name="Quantity@(GetString("Ecom:Product.LoopCounter"))" id="productFormQuantity" value="1" /> 14281429 <input type="" name='ProductLoopCounter2' value='2' /> 1430 <input type="" name='ProductID2' id="repackProductId" value='@repackProductId' /> 1431 <input type="number" id="repackFormQuantity" name="Quantity2" value="1" /> 1432 <input name="EcomOrderLineFieldInput_ParentProductId2" value="@GetString("Ecom:Product.ID")" /> 1433 <button id="multiFormSubmit" type="submit" name="CartCmd" value="AddMulti" title="add to cart Repack">Add all</button> 1434 </form> 1435 <div class="product-box"> 1436 <div class="prod-img"> 1437 @if (promotion != 0) 1438 { 1439 if (discountType == "PERCENT") 1440 { 1441 @*<div class="ribbon-P"><span>Pro @promotion% Off</span></div>*@ 1442 } 1443 else 1444 { 1445 @*<div class="ribbon-P"><span>Pro $@promotion Off</span></div>*@ 1446 } 1447 } 1448 else 1449 { 1450 @*//add ERP discount ribbon*@ 1451 if (inventoryDiscount) 1452 { 1453 if (discountPercentage != 0) 1454 { 1455 @*<div class="ribbon-D"><span>@discountPercentage% Off</span></div>*@ 1456 } 1457 } 1458 } 1459 @*//add ERP discount ribbon*@ 1460 @if (inventoryDiscount && discountPercentage != 0) 1461 { 1462 <div class="ribbon-D"><span>@discountPercentage% Off</span></div> 1463 } 1464 </div> 1465 <img id="zoom_product" src='https://@System.Web.HttpContext.Current.Request.Url.Host@path@Image' data-zoom-image="https://@System.Web.HttpContext.Current.Request.Url.Host/Admin/Public/Getimage.ashx?width=600&format=webp&image=@ProdImgLarge" alt="@pid" /> 1466 </div> 1467 <p align="center" class="smallText">@Translate("Rollover image to view larger image", "Rollover image to view larger image")</p> 1468 @*<div class="clearfix spaceheight"><p>&nbsp;</p></div>*@ 14691470 @if (storeNameList.Count != 0) 1471 { 1472 <ul id="ImmediateAvailabilityAtDesktop" class="sidenavi"> 1473 <li class="current curSub"> 1474 <a style="background: #e6e6e6;text-align: left;">@Translate("Immediate Availability At", "Immediate Availability At")</a> 1475 @if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value")) { 1476 <div style="color:#ff8c00; text-align: left;font-weight: 600; margin: 10px;">Please call to reserve.</div> 1477 } 1478 <ul id="leftnavigation" class="sidenavi-store shoplist"> 1479 @foreach (var string1 in storeNameList) 1480 { 1481 <li class="text-left"> 1482 <a href="#@string1.Replace(" ", "_").Replace(".", "")" data-toggle="collapse">@string1</a> 1483 <div id="@string1.Replace(" ", "_").Replace(".", "")" class="collapse" style="padding-left: 35px;"> 1484 <p><i class="fa fa-map-marker"></i> @storeAddress1List[string1] @Translate(",", ",") @storeAddress2List[string1] </p> 1485 <p><i class="fa fa-phone"></i> @storePhoneNumberList[string1]</p> 1486 </div> 1487 </li> 1488 } 1489 </ul> 1490 </li> 1491 </ul> 1492 } 1493 else if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 1494 { 1495 <ul id="ImmediateAvailabilityAt_Onlinebtn" class="sidenavi"> 1496 <li class="current curSub"> 1497 <a style="background: #e6e6e6;text-align: center; padding:0;">@Translate("Currently Unavailable in Stores", "Currently Unavailable in Stores")</a> 1498 </li> 1499 </ul> 1500 } 1501 </div> 1502 @foreach (var promoItem in GetLoop("AllDiscounts")) 1503 { 1504 promoItems += promoItem.GetString("Ecom:AllDiscounts.Discount.Name") + "<br>"; 1505 } 1506 <div class="col-2-3"> 1507 <div class="prod-details-top col-1-1"> 1508 <p class="small-name" style="font-size: large;"><a href="@brandUrl" class="prodBrand">@ProdBrand</a></p> 1509 <h1>@ProdName </h1> 1510 @if (promoName != "") 1511 { 1512 <div style="color:#ff8c00;font-weight: 600;font-size: medium;">@promoName</div> 1513 @*<!--<div style="color:#ff8c00;font-weight: 600;font-size: small;">@promoD</div>-->*@ 1514 } 1515 <div class=""> 1516 @*<div style="padding-right:0px !important;color : #c8c8c8;" class="item col-md-3">@Translate("SKU :","SKU :") @productNumber</div>*@ 1517 <div style="color : #c8c8c8;">@Translate("SKU :", "SKU :") @productNumber</div> 1518 @{ 1519 var getProductMultiStatusAdvServiceResponse = WebServices.getProductMultiStatusAdvServiceResponse("{[" + pid + "]}"); 1520 var getProductMultiStatusAdvServiceResponseSplit = getProductMultiStatusAdvServiceResponse.Split(';'); 1521 string productStockStatus = getProductMultiStatusAdvServiceResponseSplit[2].Split('{')[1].Replace("}", "").Split(':')[1].Replace("]", ""); 15221523 string tipsoMessage = "no Message Available!"; 1524 switch (productStockStatus.ToUpper()) 1525 { 1526 case "AVAILABLE": 1527 tipsoMessage = "<strong>For Express Delivery*</strong><br>Receive on the Same or Next working day.<br><br><strong>For Standard Delivery</strong><br>Earliest delivery within 2 working days from date of order.<br>*T&Cs applies"; 1528 break; 1529 case "SPECIAL ORDER": 1530 tipsoMessage = "Stocks are subjected to supplier's availability with the earliest delivery in 7 working days from date of order."; 1531 break; 1532 case "IN STOCK": 1533 tipsoMessage = "Stocks are available at our retail stores, with the earliest delivery in 5 working days from date of order."; 1534 break; 1535 default: 1536 tipsoMessage = "no Message Available!"; 1537 break; 1538 } 1539 tipsoMessage = tipsoMessage.Replace("\'", "&#39;"); 1540 } 1541 <div> 1542 <br /> 1543 @if (@productStockStatus.Contains("SPECIAL ORDER")) 1544 { 1545 <ul class="info"> 1546 <li>*@productStockStatus</li> 1547 <li style="padding-top: 5px;">This item is sourced upon request. Payment is pre-authorized and only charged upon fulfillment. Delivery starts from 7 business days, subject to availability.</li> 1548 </ul> 1549 } 1550 else 1551 { 1552 <ul class="info"> 1553 <li> 1554 *@productStockStatus 1555 <span class="top tipso_style" data-tipso='@tipsoMessage' style="vertical-align: text-bottom;"> 1556 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=16&format=webp&image=/Files/Images/plc/images/icon_question_mark.png" alt="icon info" title="" style="width:12px;"> 1557 </span> 1558 </li> 1559 </ul> 1560 } 1561 </div> 1562 <div class="prod-star col-md-4"> 1563 <p style="margin:-7px 0px;padding:0px;float:left;display:none;" class="rating"> 1564 <input type="radio" id="star5" name="rating" value="5" /><label class="full" for="=" title="Awesome - 5 stars"></label> 1565 <input type="radio" id="star4half" name="rating" value="4.5" /><label class="half" for="=" title="Pretty good - 4.5 stars"></label> 1566 <input type="radio" id="star4" name="rating" value="4" /><label class="full" for="=" title="Pretty good - 4 stars"></label> 1567 <input type="radio" id="star3half" name="rating" value="3.5" /><label class="half" for="=" title="Meh - 3.5 stars"></label> 1568 <input type="radio" id="star3" name="rating" value="3" /><label class="full" for="=" title="Meh - 3 stars"></label> 1569 <input type="radio" id="star2half" name="rating" value="2.5" /><label class="half" for="=" title="Kinda bad - 2.5 stars"></label> 1570 <input type="radio" id="star2" name="rating" value="2" /><label class="full" for="=" title="Kinda bad - 2 stars"></label> 1571 <input type="radio" id="star1half" name="rating" value="1.5" /><label class="half" for="=" title="Meh - 1.5 stars"></label> 1572 <input type="radio" id="star1" name="rating" value="1" /><label class="full" for="=" title="Sucks big time - 1 star"></label> 1573 <input type="radio" id="starhalf" name="rating" value="0.5" /><label class="half" for="=" title="Sucks big time - 0.5 stars"></label> 1574 </p> 1575 </div> 1576 <script> 1577 $(document).ready(function () { 1578 $("#toggleReview").click(function () { 1579 $("#reviewButton").click(); 1580 $('body, html').animate({ 1581 scrollTop: $("#cmtContainer").offset().top 1582 }, 1000); 1583 }); 1584 $("#toggleWrite").click(function () { 1585 $("#reviewButton").click(); 1586 $('body, html').animate({ 1587 scrollTop: $(".formContact").offset().top 1588 }, 1000); 1589 }); 15901591 var ratingStars = document.getElementsByName('rating'); 15921593 for (var i = 0; i < ratingStars.length; i++) { 15941595 if (ratingStars[i].value == "@ProdRating") { 15961597 ratingStars[i].click(); 1598 } 1599 } 16001601 }); 1602 </script> 16031604 @*<!--<div class="clearfix upper-review"></div> 1605 <div class="review col-md-5"> 1606 <a id="toggleReview" href="javascript:void(0)">@Translate("Read reviews","Read reviews")</a> 1607 (@ProdReview)| 1608 <a id="toggleWrite" href="javascript:void(0)">Write review</a> 1609 </div> -->*@ 1610 </div> 1611 </div> 16121613 <hr class="grey"> 16141615 <div class="prod-details-left col-5-12"> 1616 <p class="ZYM" style="display:none;">@internetPrice</p> 16171618 @if (inventoryDiscount) 1619 { 1620 if (sellingPrice != internetPrice) 1621 { 1622 <div class="prod-price"> 1623 <p class="op">[email protected]("{0:0.00}", sellingPrice)</p> 1624 <p class="np">[email protected]("{0:0.00}", internetPrice)</p> 1625 <p class="save-price">Save [email protected]("{0:0.00}", sellingPrice - internetPrice)</p> 1626 </div> 1627 } 1628 else if (sellingPrice == internetPrice) 1629 { 1630 <div class="prod-price"> 1631 <p class="np">[email protected]("{0:0.00}", sellingPrice)</p> 1632 </div> 1633 } 1634 } 1635 else 1636 { 1637 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 1638 { 1639 <div class="prod-price"> 1640 <p class="np">[email protected]("{0:0.00}", sellingPrice)</p> 1641 </div> 1642 <div class="member-price"> 1643 @if (memberPrice > 0) 1644 { 1645 <div id="proId" style="display:none"></div> 1646 <div class="title" id="memberId"> 1647 VIP Member&nbsp; 1648 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",becomeAMemberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1649 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price"> 1650 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""> 1651 </span> 1652 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 1653 </div> 1654 <div class="title" id="birthdayId"> 1655 VIP Birthday&nbsp; 1656 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",becomeAMemberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1657 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price on your birthday month"> 1658 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 1659 </span> 1660 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 1661 </div> 1662 } 1663 @if (birthdayPrice > 0 && showBirthdayPrice) 1664 { 1665 <div class="title"> 1666 VIP Birthday&nbsp; 1667 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",memberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1668 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month"> 1669 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 1670 </span> 1671 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 1672 </div> 1673 } 1674 </div> 1675 } 1676 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 1677 { 1678 <div class="prod-price"> 1679 <p class="np">[email protected]("{0:0.00}", internetPrice)</p> 1680 </div> 1681 if (userHasVIPCard) 1682 { 1683 if (userHasValidVipCard) 1684 { 1685 <div id="proId" style="display:none"></div> 1686 <div class="member-price"> 1687 <div class="title" id="memberId"> 1688 VIP Member&nbsp; 1689 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",memberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1690 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price"> 1691 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""> 1692 </span> 1693 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 1694 </div> 1695 <div class="title" id="birthdayId"> 1696 VIP Birthday&nbsp; 1697 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",memberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1698 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month"> 1699 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 1700 </span> 1701 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 1702 </div> 1703 </div> 1704 } 17051706 if (!birthday) 1707 { 1708 if (!userHasValidVipCard) 1709 { 1710 <div class="member-price"> 1711 @if (memberPrice > 0) 1712 { 1713 <div class="title" id="memberId"> 1714 VIP Member&nbsp; 1715 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",memberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1716 <span class="top tipso_style" data-tipso=" As a VIP member, you get to enjoy this price"> 1717 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 1718 </span> 1719 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 1720 </div> 1721 } 1722 </div> 1723 } 1724 } 1725 else if (birthday) 1726 { 1727 if (!userHasValidVipCard) 1728 { 1729 <div class="member-price"> 1730 <div class="title" id="birthdayId"> 1731 VIP Birthday&nbsp; 1732 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",memberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1733 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month"> 1734 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon_info"> 1735 </span> 1736 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 1737 </div> 1738 </div> 1739 } 1740 } 1741 } 1742 else 1743 { 1744 <div id="proId" style="display:none"></div> 1745 <div class="member-price"> 1746 <div class="title" id="memberId"> 1747 VIP Member&nbsp; 1748 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",memberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1749 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price"> 1750 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title=""> 1751 </span> 1752 <p class="price">[email protected]("{0:0.00}", memberPrice)</p> 1753 </div> 1754 <div class="title" id="birthdayId"> 1755 VIP Birthday&nbsp; 1756 @*<span class="top tipso_style" data-tipso="Become a member for only [email protected]("{0:0.00}",memberPrice) and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month.">*@ 1757 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month"> 1758 <img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info"> 1759 </span> 1760 <p class="price">[email protected]("{0:0.00}", birthdayPrice)</p> 1761 </div> 1762 </div> 1763 @*<div class="prod-price"> 1764 <p class="op">[email protected]("{0:0.00}", internetPrice)</p> 1765 </div> 1766 *@ 1767 } 1768 } 1769 } 1770 </div> 1771 @if (birthday) 1772 { 1773 <div class="info-box" style="background:none;"> 1774 @*<h3>That's because it's your birthday this month!</h3>*@ 1775 </div> 1776 } 1777 @* 1778 <p><span class="bold">Spend @CurrencyCode 100, Save @CurrencyCode 20</span></p> 1779 <p><span class="bold">@Translate("Free delivery on all Online Orders","Free delivery on all Online Orders")</span></p> 1780 *@ 1781 </div> 17821783 @if (GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 1784 { 1785 showHide = "hidden"; 1786 <div class="prod-details-right pull-right col-8-12"> 1787 <div style="padding: 10px;"> 1788 <p style="background-color: darkgray; padding: 2px 30px; width: fit-content; color: #ffffff;">Available in Store Only</p> 1789 <strong style="font-size: 16px; color: #952203;"> 1790 <label id="ctl00_ContentPlaceHolder1_ASPxLabel92">Remarks :</label> 1791 </strong> 1792 <div style="font-size: 12px; margin-left: -25px;"> 1793 <ul> 1794 <li> 1795 Clearance Sale items are limited and valid for in-store purchase only, while stocks 1796 last. 1797 </li> 1798 </ul> 1799 </div> 1800 <strong style="font-size: 16px; color: #952203;"> 1801 <label id="ctl00_ContentPlaceHolder1_ASPxLabel94">Terms &amp; Conditions :</label> 1802 </strong> 1803 <div style="font-size: 12px; padding-top: 5px;"> 1804 <span style="color: #000000;"> 1805 <a href="https://customercare.petloverscentre.com/hc/en-us/articles/21905343581465-Reduced-to-Clear-R2C-Sales-and-Terms"> 1806 <span style="text-decoration: underline;"> 1807 Click here 1808 </span> 1809 </a> to view the Clearance Sale's Terms &amp; Conditions 1810 </span> 1811 </div> 1812 </div> 1813 </div> 18141815 } 1816 <div class="prod-details-right col-8-12 qtyboxright" @showHide> 1817 <div class="detailsform" style="display: table !important;width:100% !important; "> 1818 @if (!string.IsNullOrEmpty(productSize)) 1819 { 1820 <div class="col-md-12 col-sm-12 col-xs-12" style=""> 1821 <label class="col-md-3 col-sm-12 col-xs-12 lbl-pd-size" style="margin-top: -13px;">Size:</label> 1822 <select id="sizeInput" class="col-md-12 col-sm-12 col-xs-12 selectbox-size" name="size"> 1823 @{ 1824 if (!string.IsNullOrWhiteSpace(skuCode)) 1825 { 1826 if (sizeList.Count != 0) 1827 { 1828 foreach (var item in sizeList) 1829 { 1830 if (productSize == item) 1831 { 1832 <option selected value="@item"> @item</option> 1833 } 1834 else 1835 { 1836 <option value="@item"> @item</option> 1837 } 1838 } 1839 } 1840 } 1841 else 1842 { 1843 <option value="@productSize">@productSize</option> 1844 } 1845 } 1846 </select> 1847 </div> 1848 <br><br> 1849 if (!string.IsNullOrWhiteSpace(productFlavour)) 1850 { 1851 <div class="col-md-12 col-sm-12 col-xs-12"> 1852 <label class="col-md-3 col-sm-12 col-xs-12 lbl-pd-flavour">Flavour:</label> 1853 <select id="flavourInput" class="col-md-12 col-sm-12 col-xs-12 selectbox-flavour" name="flavour"> 1854 @{ 1855 if (!string.IsNullOrWhiteSpace(skuCode)) 1856 { 1857 if (flavourList.Count != 0) 1858 { 1859 foreach (var item in flavourList) 1860 { 1861 if (productFlavour == item) 1862 { 1863 <option selected value="@item"><span style="word-wrap: break-word;">@item.Replace(" and ", " & ")</span></option> 1864 } 1865 else 1866 { 1867 <option value="@item"><span style="word-wrap: break-word;">@item.Replace(" and ", " & ")</span></option> 1868 } 1869 } 1870 } 1871 } 1872 else 1873 { 1874 <option value="@productFlavour">@productFlavour</option> 1875 } 1876 } 1877 </select> 1878 </div> 1879 <br><br> 1880 } 1881 if (!string.IsNullOrWhiteSpace(productColor)) 1882 { 1883 <div class="col-md-12 col-sm-12 col-xs-12"> 1884 <label class="col-md-3 col-sm-12 col-xs-12 lbl-pd-color">Color:</label> 1885 <select id="colorInput" class="col-md-12 col-sm-12 col-xs-12 selectbox-color" name="color"> 1886 @{ 1887 if (!string.IsNullOrWhiteSpace(skuCode)) 1888 { 1889 if (colorList.Count != 0) 1890 { 1891 foreach (var item in colorList) 1892 { 1893 if (productColor == item) 1894 { 1895 <option selected value="@item"> @item</option> 1896 } 1897 else 1898 { 1899 <option value="@item"> @item</option> 1900 } 1901 } 1902 } 1903 } 1904 else 1905 { 1906 <option value="@productColor">@productColor</option> 1907 } 1908 } 1909 </select> 1910 </div> 1911 <br><br> 1912 } 1913 } 1914 else if (!string.IsNullOrEmpty(productColor)) 1915 { 1916 <div class="col-md-12 col-sm-12 col-xs-12"> 1917 <label class="col-md-3 col-sm-12 col-xs-12 lbl-pd-size">Color:</label> 1918 <select id="onlycolorInput" class="col-md-12 col-sm-12 col-xs-12 selectbox-size" name="color"> 1919 @{ 1920 if (!string.IsNullOrWhiteSpace(skuCode)) 1921 { 1922 if (colorList.Count != 0) 1923 { 1924 foreach (var item in colorList) 1925 { 1926 if (productColor == item) 1927 { 1928 <option selected value="@item"> @item</option> 1929 } 1930 else 1931 { 1932 <option value="@item"> @item</option> 1933 } 1934 } 1935 } 1936 } 1937 else 1938 { 1939 <option value="@productColor">@productColor</option> 1940 } 1941 } 1942 </select> 1943 </div> 1944 } 1945 else if (!string.IsNullOrEmpty(productFlavour)) 1946 { 1947 <div class="col-md-12 col-sm-12 col-xs-12"> 1948 <label class="col-md-3 col-sm-12 col-xs-12 lbl-pd-size">Flavour:</label> 1949 <select id="onlyflavourInput" class="col-md-12 col-sm-12 col-xs-12 selectbox-size" name="flavour"> 1950 @{ 1951 if (!string.IsNullOrWhiteSpace(skuCode)) 1952 { 1953 if (flavourList.Count != 0) 1954 { 1955 foreach (var item in flavourList) 1956 { 1957 if (productFlavour == item) 1958 { 1959 <option selected value="@item"> @item</option> 1960 } 1961 else 1962 { 1963 <option value="@item"> @item</option> 1964 } 1965 } 1966 } 1967 } 1968 else 1969 { 1970 <option value="@productFlavour">@productFlavour</option> 1971 } 1972 } 1973 </select> 1974 </div> 1975 } 19761977 @if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 1978 { 1979 <div class="col-md-12 col-sm-12 col-xs-12" style="margin-top: -10px;"> 1980 <label class="col-md-3 col-sm-12 col-xs-12 lbl-pd-qty" style="margin-top: 10px;">Qty:</label> 1981 <div id="customSelectElement" class="col-md-12 col-sm-12 col-xs-12 qty-div"> 1982 <div id="selectBox" style="width: 100% !important;"> 1983 <input type="number" class="col-md-12 col-sm-12 col-xs-12 selectbox-qty form-control" onkeydown='QtyKeyControl("quantityInput_@pid", "keydown");' onkeyup='QtyKeyControl("quantityInput_@pid", "keyup");' onfocusout='return QtyKeyControl("quantityInput_@pid", "focusout");' id="quantityInput_@pid" value="1" min="1" max="9999" /> 1984 </div> 1985 <div id="navigator"> 1986 </div> 1987 </div> 1988 </div> 19891990 <br><br><br> 1991 } 19921993 <div class="col-md-12 col-sm-12 col-xs-12"> 1994 @if (ProdRepackitems) 1995 { 1996 @*<div class="col-md-12 col-sm-12 col-xs-12"> 1997 <input id="requireRepack" name="" type="checkbox" value=""> @Translate("Require repacking","Require repacking") 1998 </div>*@ 19992000 <br><br><hr><br> 20012002 @*<div id="repackChoose" style="display:none;margin-top:-15px"> 2003 <p>Choose Repack Quantity</p> 2004 <input type="number" id="repackQuantity" value="1" max="1" min="1" style="width:85px" ><span style="padding-left:20px" id="repackProductPrice">@if(repackProductId=="PROD1"){<text>$2.00</text>}else{<text>$4.00</text>}</span> 2005 <input type="number" id="repackQuantity" value="1" max="1" min="1" style="width:85px" ><span style="padding-left:20px" id="repackProductPrice">@if(productWeight<1000){<text>$2.00</text>}else{<text>$4.00</text>}</span> 2006 <br><br> 2007 <p class="hide" id="repackError" style="color:red;"> repack qty cannot exceed product qty</p> 2008 </div>*@ 2009 } 20102011 @if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 2012 { 2013 if (@userAgent.Contains("android")) 2014 { 2015 <div class="btn-addto-cart fixsize" style="padding: 0; margin: auto;"> 2016 @*<a id="addtocartLink" onclick='AjaxAddToCart("?cartcmd=add&productid=@pid&quantity=", "@pid"); showaddedItem(" ", "@pid", $("#quantityInput_" + "@pid").val(), true);' href='javascript:void(0)' ><i class="fa fa-shopping-cart"></i> Add to cart</a>*@ 2017 <a id="addtocartLink" onclick='CheckVariantSelected();' href='javascript:void(0)'><i class="fa fa-shopping-cart"></i> Add to cart</a> 2018 </div> 2019 } 2020 else 2021 { 2022 <div class="btn-addto-cart fixsize" style="padding: 0; margin: auto;"> 2023 @*<a id="addtocartLink" onclick='AjaxAddToCart("?cartcmd=add&productid=@pid&quantity=", "@pid"); showaddedItem(" ", "@pid", $("#quantityInput_" + "@pid").val(), true);' href='javascript:void(0)' ><i class="fa fa-shopping-cart"></i> Add to cart</a>*@ 2024 <a id="addtocartLink" class="txtcenter" onclick='CheckVariantSelected();' href='javascript:void(0)'><i class="fa fa-shopping-cart"></i> Add to cart</a> 2025 </div> 2026 } 2027 } 2028 <!---------------------------------------------------------------------------------------Wishlists--------------------------------------------------------------------------------------------> 2029 <div id="wishlistSelect" class="modal fade" role="dialog"> 2030 <div class="modal-dialog"> 2031 <div class="modal-content"> 2032 <div class="modal-body"> 2033 <div class="modal-header"> 2034 <h2 class="modal-title">Choose wish list</h2> 2035 </div> 2036 <div class="row"> 2037 <div class="col-md-6 col-md-offset-3"> 2038 <select id="addtolists" style="width: 100%"> 2039 <option value='default'>Default Wishlist</option> 2040 @foreach (LoopItem test1 in GetLoop("CustomerCenter.Lists.Type.Wishlist")) 2041 { 2042 @test1.GetString("Ecom:CustomerCenter.List.Select.ID") 20432044 foreach (LoopItem test2 in test1.GetLoop("CustomerCenter.ListTypes.Lists")) 2045 { 2046 <option value='@test2.GetString("Ecom:CustomerCenter.ListTypes.List.ID")'>@test2.GetString("Ecom:CustomerCenter.ListTypes.List.Name") </option> 2047 } 2048 } 2049 </select> 2050 </div> 2051 </div> 20522053 <div class="modal-footer"> 2054 <button id="dismissModel" type="button" class="btn btn1 pull-right" data-dismiss="modal" style="width: 100px;">Close</button> 2055 <button id="addToListButton" type="button" class="btn btn1 pull-right" style="width: 100px; margin-right: 10px;">Add to list</button> 2056 </div> 2057 </div> 2058 </div> 2059 </div> 2060 </div> 2061 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2062 { 2063 if (@userAgent.Contains("android")) 2064 { 2065 @*// blocked with display:none, because of App 9.3.15 Add to wish list issue*@ 2066 <div class="btn-addto-cart fixsize" style="padding: 0; margin: auto; margin-top: 20px; display:none;"> 2067 <a href='#' data-toggle="modal" data-target="#wishlistSelect"> 2068 <i class="fa fa-list-ul"></i>Add to wish list 2069 </a> 2070 <a id="wishlistLink" style="display:none" href='/Default.aspx?ID=137&productid=@GetString("Ecom:Product.ID")&CCAddToMyLists=@GetString("Ecom:Product.ID")&CCAddToListVariantID=@GetString("Ecom:Product.VariantID")&CCAddToListLanguageID=LANG2'>Link</a> 2071 </div> 2072 } 2073 else 2074 { 2075 @*// blocked with display:none, because of App 9.3.15 Add to wish list issue*@ 2076 <div class="btn-addto-cart fixsize" style="padding: 0; margin: auto; margin-top: 20px; display:none;"> 2077 <a href='#' class="txtcenter" data-toggle="modal" data-target="#wishlistSelect"> 2078 <i class="fa fa-list-ul"></i>Add to wish list 2079 </a> 2080 <a id="wishlistLink" style="display:none" href='/Default.aspx?ID=137&productid=@GetString("Ecom:Product.ID")&CCAddToMyLists=@GetString("Ecom:Product.ID")&CCAddToListVariantID=@GetString("Ecom:Product.VariantID")&CCAddToListLanguageID=LANG2'>Link</a> 2081 </div> 2082 } 2083 } 2084 </div> 2085 <script> 2086 var defaultLink = '/Default.aspx?ID=137&productid=@GetString("Ecom:Product.ID")&CCAddToMyLists=@GetString("Ecom:Product.ID")&CCAddToListVariantID=@GetString("Ecom:Product.VariantID")&CCAddToListLanguageID=LANG2'; 2087 var newLink = defaultLink; 20882089 $("#addToListButton").click(function () { 2090 var href = document.getElementById("wishlistLink").href; 2091 AddToFavorites(href); 2092 }); 20932094 $("#addtolists").change(function () { 2095 if (this.value != "default") { 2096 newLink += "&CCAddToListID=" + this.value + "&CCListType=Wishlist"; 2097 $("#wishlistLink").attr("href", newLink); 2098 } 2099 else { 2100 $("#wishlistLink").attr("href", defaultLink); 2101 } 2102 }); 21032104 function AddToFavorites(favUrl) { 2105 $("#dvLoading").show(); 2106 $.ajax( 2107 { 2108 url: favUrl, 2109 type: 'POST', 2110 success: function (data) { 2111 document.getElementById("dismissModel").click(); 2112 $("#dvLoading").hide(); 2113 }, 2114 error: function (jqXHR, textStatus, errorThrown) { 2115 $("#dvLoading").hide(); 2116 } 2117 }); 2118 } 2119 </script> 2120 @*<!------------------------------------------------------------------------------------End Wishlists---------------------------------------------------------------------------------------------->*@ 2121 </div> 2122 </div> 21232124 <div class="col-1-1"> 2125 <div> 2126 <ul id="tabDivMain" class="nav nav-tabs"> 2127 <li class="mobile_tab"><a data-toggle='tab' class="details-tab" href="#details" style="width:100px;">Details</a></li> 2128 <li style="display:none;"><a data-toggle='tab' class="details-tab" id="reviewButton" href="#review">Reviews</a></li> 2129 @*<!--<li><a data-toggle='tab' class="details-tab mbl_a" href="#about" style="width: 157px;">About The Brand</a></li>-->*@ 2130 @if (ProductVideoUrl != "") 2131 { 2132 <li class="mobile_tab"><a data-toggle='tab' class="details-tab " href="#videoUrl" style="width: 157px;">Watch Video</a></li> 2133 } 2134 <li class="mobile_tab"><a data-toggle='tab' class="resources-tab" href="#resources" style="width:120px; @resourceImagesListShow">Resources</a></li> 2135 </ul> 21362137 <div id="tabContainer" class="resp-tabs-container"> 2138 <div id="details" class="tab-pane fade active in" id="details"> 2139 <p style="margin-top:25px;">@productDetails</p> 2140 </div> 21412142 <div id="resources" class="tab-pane fade" id="resources"> 2143 @if (resourceImagesList.Count != 0) 2144 { 2145 foreach (var image in resourceImagesList) 2146 { 2147 <p style="margin-top:15px;"> 2148 <img src="@image" alt="Resource Image"/> 2149 </p> 2150 } 2151 } 2152 </div> 21532154 @if (ProductVideoUrl != "") 2155 { 2156 <div id="videoUrl" class="tab-pane fade" id="videoUrl" style="text-align: center; padding: 20px;"> 2157 @ProductVideoUrl 2158 </div> 2159 } 2160 </div> 2161 <div id="cmtContainer" class="resp-tabs-container"> 2162 <div id="review" class="tab-pane fade" id="reviews"> 2163 <a name="Comments"></a> 2164 @if(Dynamicweb.Core.Converter.ToBoolean(GetValue("Ecom:Product.Rating"))){<text> 2165 <h3>Reviews</h3> 2166 @foreach (LoopItem i in GetLoop("Comments")){ 21672168 if(Dynamicweb.Core.Converter.ToBoolean(i.GetValue("Website"))){<text> 2169 <a href="@i.GetValue("Website")">@i.GetValue("Name")</a> 2170 </text>} 2171 if(!Dynamicweb.Core.Converter.ToBoolean(i.GetValue("Website"))){<text> 2172 @i.GetValue("Name") 2173 </text>} 21742175 <span style="color:#c5c5c5;">@i.GetValue("CreatedDate.LongDate") @i.GetValue("EditedDate.ShortTime")</span><br /> 2176 var rating = i.GetInteger("Rating"); 2177 for(var j=0;j<rating;j++){ 2178 <label class="starSelected"></label> 2179 } 2180 if(rating < 5){ 2181 for(var k = 0;k<5-rating;k++){ 2182 <label class="starUnselected"></label> 2183 } 2184 } 2185 <br /> 2186 @i.GetValue("Text") 2187 <hr /> 2188 } 2189 </text>} 21902191 <script type="text/javascript"> 21922193 function validateEmail(email) { 2194 var re = (/^[^-\0-9][+a-zA-Z0-9._-]+@@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i); 2195 return re.test(email); 2196 } 21972198 function comment_validate() { 2199 var radioChecked = false; 2200 var radioRatings = document.getElementsByName("Comment.Rating"); 2201 var validated = false; 220222032204 var loopCounter = 1; 2205 for(var i = 0; i < radioRatings.length;i++){ 2206 if(radioRatings[i].checked==true){ 2207 radioChecked = true; 22082209 } 2210 } 22112212 if (radioChecked == false) { 2213 //console.log('please rate'); 2214 alert("Please rate the product."); 2215 return false; 22162217 } 22182219 if (document.getElementById("Comment.Name").value.length < 1) { 2220 alert("Specify your name."); 2221 document.getElementById("Comment.Name").focus(); 2222 return false; 2223 } 22242225 if (document.getElementById("Comment.Text").value.length < 1) { 2226 alert("Specify your comment"); 2227 document.getElementById("Comment.Text").focus(); 2228 return false; 2229 } 2230 if (document.getElementById("Comment.Email").value.length < 1) { 2231 alert("Please Enter Email"); 2232 document.getElementById("Comment.Text").focus(); 2233 return false; 2234 } 22352236 if(!validateEmail(document.getElementById('Comment.Email').value)) 2237 { 2238 alert("Email is invalid"); 2239 return false; 2240 } 224122422243 //document.getElementById("commentform").action = '/Default.aspx?ID=7'; 2244 document.getElementById("commentform").action = '@System.Web.HttpContext.Current.Request.Url.PathAndQuery'; 22452246 document.getElementById("Comment.Command").value = "create"; 2247 return true; 22482249 } 22502251 </script> 2252 <style type="text/css"> 22532254 @@media only screen and (max-width: 600px){ 2255 #commentform .labelComment{ 2256 width: 100% !important; 2257 } 2258 #commentform input[type=text], #commentform select, #commentform option{ 2259 width: 100% !important; 2260 } 2261 #commentform textarea{ 2262 width: 100% !important; 2263 } 2264 } 22652266 #commentform { margin: 15px 0 0 0; } 2267 #commentform .labelComment { position:relative; vertical-align: top; display:inline; width: 23%; padding: 11px 10px 8px; display:inline-block; margin:0 30px 0 0; font-size: 18px; font-weight: bold; color: #000; } 2268 #commentform .labelComment .bg { position: absolute; top: 0; right: -15px; height: 38px; width: 15px; display: block; } 2269 #commentform input[type=text], #commentform textarea { font:14px/14px Arial, Helvetica, sans-serif; background: #fff; border: none; border: 1px solid #d8d8d8;} 2270 #commentform input[type=text], #commentform select, #commentform option { color:#666; width: 300px; margin: 0 5px 20px 0px; padding: 10px 7px; } 2271 #commentform textarea { color:#666; width: 300px; margin: 0 5px 20px 0px; padding: 5px 7px; } 2272 #commentform input[type=submit] { margin: 15px 0 0 180px; cursor: pointer; } 22732274 </style> 2275 <p>&nbsp;</p> 2276 <div class="dottedBoxGrey form"> 2277 <form method="post" action="/Default.aspx?ID=7" id="commentform" onsubmit="return comment_validate()"> 2278 <div class="formContact"> 2279 <input type="hidden" name="Comment.Command" id="Comment.Command" value="" /> 22802281 <input type="hidden" name="Comment.ItemType" value="ecomProduct" /> 22822283 <input type="hidden" name="Comment.ItemID" value="@GetValue("Ecom:Product.ID")" /> 2284 <input type="hidden" name="Comment.LangID" value="@GetValue("Ecom:Product.LanguageID")" /> 2285 <div class="product-detailComment"> 22862287 </div> 2288 <label class="labelComment pull-left" for="Comment.Rating">Your rating</label> 2289 <div class="prod-star pull-left"> 2290 <p style="" class="ratingSubmit"> 2291 <input type="radio" id="star5a" name="Comment.Rating" value="5" /><label class = "full" for="star5a" title="Awesome - 5 stars"></label> 22922293 <input type="radio" id="star4a" name="Comment.Rating" value="4" /><label class = "full" for="star4a" title="Pretty good - 4 stars"></label> 22942295 <input type="radio" id="star3a" name="Comment.Rating" value="3" /><label class = "full" for="star3a" title="Meh - 3 stars"></label> 22962297 <input type="radio" id="star2a" name="Comment.Rating" value="2" /><label class = "full" for="star2a" title="Kinda bad - 2 stars"></label> 22982299 <input type="radio" id="star1a" name="Comment.Rating" value="1" /><label class = "full" for="star1a" title="Sucks big time - 1 star"></label> 2300 </p> 2301 </div> 2302 <div class="clearfix"></div> 2303 <label class="labelComment" for="Comment.Name">Name</label> 2304 <input type="text" name="Comment.Name" id="Comment.Name" value="" /><br /> 2305 <label class="labelComment" for="Comment.Email">E-mail</label> 2306 <input type="text" name="Comment.Email" id="Comment.Email" value="" /><br /> 2307 <label class="labelComment" for="Comment.Text">Comment</label> 2308 <textarea name="Comment.Text" id="Comment.Text" rows="10" cols="50"></textarea><br /> 23092310 <input type="submit" value="Send" /> 2311 </div> 2312 </form> 2313 </div> 2314 <p>&nbsp;</p> 2315 </div> 2316 </div> 23172318 <ul id="ImmediateAvailabilityAtMobile" class="sidenavi"> 2319 @if (storeNameList.Count != 0) 2320 { 2321 <li class="current curSub"> 2322 <a style="background: #e6e6e6;">@Translate("Immediate Availability At", "Immediate Availability At")</a> 2323 @if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value")) { 2324 <div style="color:#ff8c00; text-align: left;font-weight: 600; margin: 10px;">Please call to reserve.</div> 2325 } 2326 <ul id="leftnavigation" class="sidenavi-store shoplist" style="padding-bottom: 30px;"> 2327 @foreach (var string1 in storeNameList) 2328 { 2329 <li class="text-left"> 2330 <a href="#@string1.Replace(" ", "_").Replace(".", "")" data-toggle="collapse" data-value="#@string1.Replace(" ", "_").Replace(".", "")" onclick="collapseMobile('@string1.Replace(" ", "_").Replace(".", "")')">@string1</a> 2331 <div id="[email protected](" ", "_").Replace(".", "")" class="collapse" style="padding-left: 35px;"> 2332 <p><i class="fa fa-map-marker"></i> @storeAddress1List[string1] @Translate(",", ",") @storeAddress2List[string1] </p> 2333 <p><i class="fa fa-phone"></i> @storePhoneNumberList[string1]</p> 2334 </div> 2335 </li> 23362337 } 2338 </ul> 2339 </li> 2340 } 2341 </ul> 2342 </div> 2343 </div> 2344 </div> 23452346 <div></div> 23472348 <hr style="width:100%"> 23492350 <div align="center" class="grid"> 2351 @if (GetString("Ecom:Product.RelatedCount") != "0") 2352 { 2353 foreach (LoopItem related in GetLoop("ProductRelatedGroups")) 2354 { 2355 if (related.GetString("Ecom:Product:RelatedGroup.Name") == "Similar Products") 2356 { 2357 if (related.GetLoop("RelatedProducts").Count != 0) 2358 { 2359 <div class="row-bestseller"> 2360 <div class="row-bestseller" style="margin:30px 0 70px 0;"> 2361 <h1>@Translate("Similar Products", "Similar Products")</h1> 23622363 <ul class="bxslider-bestseller"> 2364 @foreach (LoopItem products in related.GetLoop("RelatedProducts")) 2365 { 2366 var relatedRating = products.GetDouble("Ecom:Product.Rating"); 2367 var sellingPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSPrice"); 2368 var internetPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSInternetPrice"); 2369 bool inventoryDiscountRelated = products.GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag"); 2370 var discountPercentageRelated = products.GetDouble("Ecom:Product:Field.ProductInventoryDiscount"); 2371 var birthdayPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSBirthdayPrice"); 2372 var memberPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSMemberPrice"); 2373 var disableRelated = products.GetBoolean("Ecom:Product:Field.Disable"); 2374 @*// var promotionRelated=products.GetDouble("Ecom:Product.Discount.TotalPercentWithoutVATFormatted");*@ 2375 var pidrelated = products.GetString("Ecom:Product.ID"); 2376 string GroupLinkRelated = products.GetString("Ecom:Product.LinkGroup.Clean"); 2377 var promotionRelated = 0.00; 2378 var discountTypeRelated = ""; 2379 foreach (LoopItem item1 in products.GetLoop("ProductDiscounts")) 2380 { 23812382 if (item1.GetString("Ecom:Product.Discount.Type") == "PERCENT") 2383 { 2384 discountTypeRelated = "PERCENT"; 2385 promotionRelated = item1.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted"); 2386 } 2387 else 2388 { 2389 discountTypeRelated = "AMOUNT"; 2390 promotionRelated = item1.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted"); 2391 } 2392 } 2393 <li id="get_@pidrelated"> 2394 @if (promotionRelated != 0) 2395 { 2396 if (discountTypeRelated == "PERCENT") 2397 { 2398 @*<div class="ribbon-P"><span>Pro @promotionRelated% Off</span></div>*@ 2399 } 2400 else 2401 { 2402 @*<div class="ribbon-P"><span>Pro $@promotionRelated Off</span></div>*@ 2403 } 2404 } 2405 else 2406 { 2407 @*//add ERP discount ribbon*@ 2408 if (inventoryDiscount) 2409 { 2410 if (discountPercentage != 0) 2411 { 2412 @*<div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div>*@ 2413 } 2414 } 2415 } 2416 @*//add ERP discount ribbon*@ 2417 @if (inventoryDiscount && discountPercentage != 0) 2418 { 2419 <div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div> 2420 } 2421 <a href="@GroupLinkRelated"><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=300&&format=webp&image=@path@Image" alt="@Image" /></a> 2422 @if (inventoryDiscountRelated) 2423 { 2424 if (sellingPriceRelated != internetPriceRelated) 2425 { 2426 <text><p class="prod-promo2">Save @string.Format("{0:0.00}", sellingPriceRelated - internetPriceRelated)</p></text> 2427 } 2428 } 2429 else 2430 { 2431 <text><p class="prod-promo">&nbsp;</p></text> 2432 } 24332434 <p class="prod-name">@products.GetString("Ecom:Product:Field.PublicBrand")</p> 2435 <p class="prod-name">@products.GetString("Ecom:Product.Name")</p> 2436 <div class="prod-star"> 2437 @if (@relatedRating == 0) 2438 { 2439 <label class="starUnselected"></label> 2440 <label class="starUnselected"></label> 2441 <label class="starUnselected"></label> 2442 <label class="starUnselected"></label> 2443 <label class="starUnselected"></label> 2444 } 2445 @for (var i = 1; i < @relatedRating; i++) 2446 { 2447 <label class="starSelected"></label> 2448 } 2449 @if (relatedRating % 1 != 0) 2450 { 2451 <label class="starSelected half"></label> 2452 } 2453 </div> 2454 <div class="prod-priceBox"> 2455 @if (inventoryDiscountRelated) 2456 { 2457 if (sellingPriceRelated != internetPriceRelated) 2458 { 2459 <div class="prod-price"> 2460 <p class="op">[email protected]("{0:0.00}", sellingPriceRelated)</p> 2461 <p class="np">[email protected]("{0:0.00}", internetPriceRelated)</p> 24622463 </div> 2464 <div class="member-price"></div> 2465 } 2466 else if (sellingPriceRelated == internetPriceRelated) 2467 { 2468 <div class="prod-price"> 2469 <p class="np">[email protected]("{0:0.00}", sellingPriceRelated)</p> 2470 </div> 24712472 } 2473 } 2474 @*inventoryDiscount false*@ 2475 else 2476 { 2477 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2478 { 2479 <div class="prod-price"> 2480 <p class="np">[email protected]("{0:0.00}", sellingPriceRelated)</p> 2481 </div> 2482 <div class="member-price"> 2483 <div class="title"> 2484 Member&nbsp; 2485 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop"></span> 2486 <p class="price">[email protected]("{0:0.00}", memberPriceRelated)</p> 2487 </div> 24882489 <div class="title"> 2490 Birthday&nbsp; 2491 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop"></span> 2492 <p class="price">[email protected]("{0:0.00}", birthdayPriceRelated)</p> 2493 </div> 2494 </div> 2495 } 2496 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2497 { 2498 <div class="prod-price"> 2499 <p class="np">[email protected]("{0:0.00}", internetPriceRelated)</p> 2500 </div> 2501 if (!birthday) 2502 { 2503 <div class="member-price"> 2504 <div class="title"> 2505 Member&nbsp; 2506 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop"></span> 2507 <p class="price">[email protected]("{0:0.00}", memberPriceRelated)</p> 2508 </div> 2509 </div> 2510 } 2511 else 2512 { 2513 <div class="member-price"> 2514 <div class="title"> 2515 Birthday&nbsp; 2516 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop"></span> 2517 <p class="price">[email protected]("{0:0.00}", birthdayPriceRelated)</p> 2518 </div> 2519 </div> 2520 } 2521 } 2522 } 2523 </div> 25242525 @if (products.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 2526 { 2527 <ul class="info"> 2528 <li>*In Store Only</li> 2529 </ul> 2530 } 25312532 @if (!products.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 2533 { 2534 <div class="btn-addto-cart" style="margin-bottom:5px;"> 2535 <a class="fancybox" href="javascript:showaddedItem('?productid=@pidrelated&cartcmd=add&quantity=1',@pidrelated,true)"><i class="fa fa-shopping-cart"></i> Add to cart</a> 2536 </div> 2537 } 2538 </li> 2539 } 2540 </ul> 2541 </div> 2542 </div> 2543 } 2544 } 2545 } 2546 } 2547 @if (GetString("Ecom:Product.RelatedCount") != "0") 2548 { 2549 foreach (LoopItem related in GetLoop("ProductRelatedGroups")) 2550 { 2551 if (related.GetString("Ecom:Product:RelatedGroup.Name") == "Similar Brand") 2552 { 2553 if (related.GetLoop("RelatedProducts").Count != 0) 2554 { 2555 <div class="row-bestseller"> 2556 <div class="row-bestseller" style="margin:30px 0 70px 0;"> 2557 <h2>@Translate("Similar Brands", "Similar Brands")</h2> 25582559 <ul class="bxslider-bestseller"> 2560 @foreach (LoopItem products in related.GetLoop("RelatedProducts")) 2561 { 2562 var relatedRating = products.GetDouble("Ecom:Product.Rating"); 2563 var sellingPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSPrice"); 2564 var internetPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSInternetPrice"); 2565 Boolean inventoryDiscountRelated = products.GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag"); 2566 var discountPercentageRelated = products.GetDouble("Ecom:Product:Field.ProductInventoryDiscount"); 2567 var birthdayPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSBirthdayPrice"); 2568 var memberPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSMemberPrice"); 2569 var disableRelated = products.GetBoolean("Ecom:Product:Field.Disable"); 2570 @*// var promotionRelated=products.GetDouble("Ecom:Product.Discount.TotalPercentWithoutVATFormatted");*@ 2571 var pidrelated = products.GetString("Ecom:Product.ID"); 2572 string GroupLinkRelated = products.GetString("Ecom:Product.LinkGroup.Clean"); 2573 var promotionRelated = 0.00; 2574 var discountTypeRelated = ""; 2575 foreach (LoopItem item1 in products.GetLoop("ProductDiscounts")) 2576 { 25772578 if (item1.GetString("Ecom:Product.Discount.Type") == "PERCENT") 2579 { 2580 discountTypeRelated = "PERCENT"; 2581 promotionRelated = item1.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted"); 2582 } 2583 else 2584 { 2585 discountTypeRelated = "AMOUNT"; 2586 promotionRelated = item1.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted"); 2587 } 2588 } 2589 <li id="get_@pidrelated"> 2590 @if (promotionRelated != 0) 2591 { 2592 if (discountTypeRelated == "PERCENT") 2593 { 2594 @*<div class="ribbon-P"><span>Pro @promotionRelated% Off</span></div>*@ 2595 } 2596 else 2597 { 2598 @*<div class="ribbon-P"><span>Pro $@promotionRelated Off</span></div>*@ 2599 } 26002601 } 2602 else 2603 { 2604 @*//add ERP discount ribbon*@ 2605 if (inventoryDiscount) 2606 { 2607 if (discountPercentage != 0) 2608 { 2609 @*<div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div>*@ 2610 } 2611 } 2612 } 2613 @*//add ERP discount ribbon*@ 2614 @if (inventoryDiscount&& discountPercentage != 0) 2615 { 2616 <div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div> 2617 } 2618 <a href="@GroupLinkRelated"><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=300&format=webp&image=@path@Image" alt="@Image" /></a> 2619 @if (inventoryDiscountRelated) 2620 { 2621 if (sellingPriceRelated != internetPriceRelated) 2622 { 2623 <text><p class="prod-promo2">Save @string.Format("{0:0.00}", sellingPriceRelated - internetPriceRelated)</p></text> 2624 } 2625 } 2626 else 2627 { 2628 <text><p class="prod-promo">&nbsp;</p></text> 2629 } 2630 <p class="prod-name">@products.GetString("Ecom:Product:Field.PublicBrand")</p> 2631 <p class="prod-name">@products.GetString("Ecom:Product.Name")</p> 2632 <div class="prod-star"> 2633 @if (@relatedRating == 0) 2634 { 2635 <label class="starUnselected"></label> 2636 <label class="starUnselected"></label> 2637 <label class="starUnselected"></label> 2638 <label class="starUnselected"></label> 2639 <label class="starUnselected"></label> 2640 } 2641 @for (var i = 1; i < @relatedRating; i++) 2642 { 2643 <label class="starSelected"></label> 2644 } 2645 @if (relatedRating % 1 != 0) 2646 { 2647 <label class="starSelected half"></label> 2648 } 2649 </div> 2650 <div class="prod-priceBox"> 2651 @if (inventoryDiscountRelated) 2652 { 2653 if (sellingPriceRelated != internetPriceRelated) 2654 { 2655 <div class="prod-price"> 2656 <p class="op">[email protected]("{0:0.00}", sellingPriceRelated)</p> 2657 <p class="np">[email protected]("{0:0.00}", internetPriceRelated)</p> 26582659 </div> 2660 <div class="member-price"></div> 2661 } 2662 else if (sellingPriceRelated == internetPriceRelated) 2663 { 2664 <div class="prod-price"> 2665 <p class="np">[email protected]("{0:0.00}", sellingPriceRelated)</p> 2666 </div> 26672668 } 2669 } 2670 @*inventoryDiscount false*@ 2671 else 2672 { 2673 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2674 { 2675 <div class="prod-price"> 2676 <p class="np">[email protected]("{0:0.00}", sellingPriceRelated)</p> 2677 </div> 2678 <div class="member-price"> 2679 <div class="title"> 2680 Member&nbsp; 2681 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon"></span> 2682 <p class="price">[email protected]("{0:0.00}", memberPriceRelated)</p> 2683 </div> 26842685 <div class="title"> 2686 Birthday&nbsp; 2687 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon"></span> 2688 <p class="price">[email protected]("{0:0.00}", birthdayPriceRelated)</p> 2689 </div> 2690 </div> 2691 } 2692 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2693 { 2694 <div class="prod-price"> 2695 <p class="np">[email protected]("{0:0.00}", internetPriceRelated)</p> 2696 </div> 2697 if (!birthday) 2698 { 2699 <div class="member-price"> 2700 <div class="title"> 2701 Member&nbsp; 2702 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon"></span> 2703 <p class="price">[email protected]("{0:0.00}", memberPriceRelated)</p> 2704 </div> 2705 </div> 2706 } 2707 else 2708 { 2709 <div class="member-price"> 2710 <div class="title"> 2711 Birthday&nbsp; 2712 <span class="top tipso_style" data-tipso="Become a member for only $7 and get it for [email protected]("{0:0.00}", memberPrice). Get it for [email protected]("{0:0.00}", birthdayPrice) on your birthday month."><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=20&format=webp&image=@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon"></span> 2713 <p class="price">[email protected]("{0:0.00}", birthdayPriceRelated)</p> 2714 </div> 2715 </div> 2716 } 2717 } 2718 } 2719 </div> 27202721 @if (products.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 2722 { 2723 <ul class="info"> 2724 <li>*In Store Only</li> 2725 </ul> 2726 } 27272728 @if (!products.GetBoolean("Ecom:Product:Field.ProductClassic.Value")) 2729 { 2730 <div class="btn-addto-cart" style="margin-bottom:5px;"> 2731 <a class="fancybox" href="javascript:showaddedItem('?productid=@pidrelated&cartcmd=add&quantity=1',@pidrelated,true)"><i class="fa fa-shopping-cart"></i> Add to cart</a> 2732 </div> 2733 } 2734 </li> 2735 } 2736 </ul> 2737 </div> 2738 </div> 2739 } 2740 } 2741 } 2742 } 2743 </div> 2744 @using DWAPAC.PLC.Services.PLCPSWS; 2745 @using DWAPAC.PLC.Services; 2746 @using DWAPAC.PLC; 2747 @{ 2748 DWAPAC.PLC.Services.PLCPSWS.PS_Service service_1 = new DWAPAC.PLC.Services.PLCPSWS.PS_Service(); 2749 var productLocation_1 = service_1.GetProductLocation("dynamicweb", "{_0rfJ39sw", pid); 2750 } 27512752 <script src='/files/Templates/Designs/PLC/js/jquery.elevatezoom.js'></script> 2753 <script src='/files/Templates/Designs/PLC/js/jquery.bxslider.js'></script> 2754 @* ----- qty controller Begin----- *@ 2755 <script type="text/javascript" src="/Files/Templates/Designs/PLC/js/PLCAddToCartQtyController.js"></script> 2756 @* ----- qty controller End------- *@ 2757 <script> 2758 @*//Start of variant selection*@ 2759 var firstChange = ""; 2760 var secondVariant = "@variantSelector"; 27612762 $("#flavourInput").change(function () { 2763 if (firstChange == "") { 2764 firstChange = "FLAVOUR"; 2765 } 27662767 if (firstChange == "SIZE") { 2768 var size = $("#sizeInput").val(); 2769 var data = $(this).serialize(); 27702771 data += "&skuCode=@(skuCode)"; 2772 data += "&size=" + size + "&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 27732774 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 2775 $.ajax({ 2776 type: 'POST', 2777 url: '@plcUrl' + '/Default.aspx?ID=191', 2778 data: data, 2779 success: function (data) { 2780 var firstSplit = data.split('<script type="text/javascript">'); 2781 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 2782 } 2783 }); 2784 return false; 2785 } else { 2786 var data = $(this).serialize(); 2787 data += "&pid=@(pid)&firstSelect=" + firstChange; 2788 var options = document.getElementById('sizeInput'); 2789 while (options.hasChildNodes()) { 2790 options.removeChild(options.lastChild); 2791 } 2792 $("#sizeInput").append("<option>Please select size</option>"); 2793 $.ajax({ 2794 type: 'POST', 2795 url: '@plcUrl' + '/Default.aspx?ID=191', 2796 data: data, 2797 success: function (data) { 2798 var firstSplit = data.split('<script type="text/javascript">'); 2799 $("#sizeInput").append(firstSplit[0]); 2800 } 2801 }); 2802 return false; 2803 } 2804 }); 28052806 $("#sizeInput").change(function () { 2807 if (firstChange == "") { 2808 firstChange = "SIZE"; 2809 } 2810 if (firstChange == "SIZE" && secondVariant != "size") { 2811 var data = $(this).serialize(); 2812 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 2813 var options = document.getElementById(secondVariant + 'Input'); 2814 while (options.hasChildNodes()) { 2815 options.removeChild(options.lastChild); 2816 } 2817 $("#" + secondVariant + "Input").append("<option>Please select " + secondVariant + "</option>"); 2818 $.ajax({ 2819 type: 'POST', 2820 url: '@plcUrl' + '/Default.aspx?ID=191', 2821 data: data, 2822 success: function (data) { 2823 var firstSplit = data.split('<script type="text/javascript">'); 2824 $("#" + secondVariant + "Input").append(firstSplit[0]); 2825 } 2826 }); 2827 return false; 2828 } else if (firstChange == "SIZE" && secondVariant == "size") { 2829 var variant2 = $("#" + secondVariant + "Input").val(); 2830 var data = $(this).serialize(); 2831 data += "&skuCode=@(skuCode)"; 2832 data += "&secondVariant=" + secondVariant + "&firstSelect=" + firstChange; 2833 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 2834 $.ajax({ 2835 type: 'POST', 2836 url: '@plcUrl' + '/Default.aspx?ID=191', 2837 data: data, 2838 success: function (data) { 2839 var firstSplit = data.split('<script type="text/javascript">'); 2840 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 2841 } 2842 }); 2843 return false; 2844 } else if (firstChange != "SIZE") { 2845 var variant2 = $("#" + secondVariant + "Input").val(); 2846 var data = $(this).serialize(); 2847 data += "&skuCode=@(skuCode)"; 2848 data += "&" + secondVariant + "=" + variant2 + "&firstSelect=" + firstChange; 2849 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 2850 $.ajax({ 2851 type: 'POST', 2852 url: '@plcUrl' + '/Default.aspx?ID=191', 2853 data: data, 2854 success: function (data) { 2855 var firstSplit = data.split('<script type="text/javascript">'); 2856 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 2857 } 2858 }); 2859 return false; 2860 } 2861 }); 28622863 $("#onlyflavourInput").change(function () { 2864 if (firstChange == "") { 2865 firstChange = "FLAVOUR"; 2866 } 28672868 if (firstChange == "FLAVOUR" && secondVariant != "flavour") { 2869 var data = $(this).serialize(); 2870 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 28712872 var options = document.getElementById(secondVariant + 'Input'); 2873 while (options.hasChildNodes()) { 2874 options.removeChild(options.lastChild); 2875 } 2876 $("#" + secondVariant + "Input").append("<option>Please select " + secondVariant + "</option>"); 2877 $.ajax({ 2878 type: 'POST', 2879 url: '@plcUrl' + '/Default.aspx?ID=191', 2880 data: data, 2881 success: function (data) { 2882 var firstSplit = data.split('<script type="text/javascript">'); 2883 $("#" + secondVariant + "Input").append(firstSplit[0]); 2884 } 2885 }); 2886 return false; 2887 } else if (firstChange == "FLAVOUR" && secondVariant == "flavour") { 2888 var variant2 = $("#" + secondVariant + "Input").val(); 2889 var data = $(this).serialize(); 2890 data += "&skuCode=@(skuCode)"; 2891 data += "&secondVariant=" + secondVariant + "&firstSelect=" + firstChange; 2892 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 2893 $.ajax({ 2894 type: 'POST', 2895 url: '@plcUrl' + '/Default.aspx?ID=191', 2896 data: data, 2897 success: function (data) { 2898 var firstSplit = data.split('<script type="text/javascript">'); 2899 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 2900 } 2901 }); 2902 return false; 2903 } else if (firstChange != "FLAVOUR") { 2904 var variant2 = $("#" + secondVariant + "Input").val(); 2905 var data = $(this).serialize(); 2906 data += "&skuCode=@(skuCode)"; 2907 data += "&" + secondVariant + "=" + variant2 + "&firstSelect=" + firstChange; 2908 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 2909 $.ajax({ 2910 type: 'POST', 2911 url: '@plcUrl' + '/Default.aspx?ID=191', 2912 data: data, 2913 success: function (data) { 2914 var firstSplit = data.split('<script type="text/javascript">'); 2915 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 2916 } 2917 }); 2918 return false; 2919 } else { 2920 var data = $(this).serialize(); 2921 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 2922 var options = document.getElementById('sizeInput'); 2923 while (options.hasChildNodes()) { 2924 options.removeChild(options.lastChild); 2925 } 2926 $("#onlyflavourInput").append("<option>Please select flavour</option>"); 2927 $.ajax({ 2928 type: 'POST', 2929 url: '@plcUrl' + '/Default.aspx?ID=191', 2930 data: data, 2931 success: function (data) { 2932 var firstSplit = data.split('<script type="text/javascript">'); 2933 $("#onlyflavourInput").append(firstSplit[0]); 2934 } 2935 }); 2936 return false; 2937 } 2938 }); 29392940 $("#onlycolorInput").change(function () { 2941 if (firstChange == "") { 2942 firstChange = "COLOR"; 2943 } 2944 if (firstChange == "COLOR" && secondVariant != "color") { 29452946 var data = $(this).serialize(); 2947 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 29482949 var options = document.getElementById(secondVariant + 'Input'); 2950 while (options.hasChildNodes()) { 2951 options.removeChild(options.lastChild); 2952 } 2953 $("#" + secondVariant + "Input").append("<option>Please select " + secondVariant + "</option>"); 2954 $.ajax({ 2955 type: 'POST', 2956 url: '@plcUrl' + '/Default.aspx?ID=191', 2957 data: data, 2958 success: function (data) { 29592960 var firstSplit = data.split('<script type="text/javascript">'); 2961 $("#" + secondVariant + "Input").append(firstSplit[0]); 29622963 } 2964 }); 29652966 return false; 2967 } else if (firstChange == "COLOR" && secondVariant == "color") { 2968 var variant2 = $("#" + secondVariant + "Input").val(); 2969 var data = $(this).serialize(); 2970 data += "&skuCode=@(skuCode)"; 2971 data += "&secondVariant=" + secondVariant + "&firstSelect=" + firstChange; 2972 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 2973 $.ajax({ 2974 type: 'POST', 2975 url: '@plcUrl' + '/Default.aspx?ID=191', 2976 data: data, 2977 success: function (data) { 29782979 var firstSplit = data.split('<script type="text/javascript">'); 2980 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 2981 } 2982 }); 29832984 return false; 2985 } else if (firstChange != "COLOR") { 2986 var variant2 = $("#" + secondVariant + "Input").val(); 2987 var data = $(this).serialize(); 2988 data += "&skuCode=@(skuCode)"; 2989 data += "&" + secondVariant + "=" + variant2 + "&firstSelect=" + firstChange; 2990 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 2991 $.ajax({ 2992 type: 'POST', 2993 url: '@plcUrl' + '/Default.aspx?ID=191', 2994 data: data, 2995 success: function (data) { 2996 var firstSplit = data.split('<script type="text/javascript">'); 2997 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 2998 } 2999 }); 30003001 return false; 3002 } else { 3003 var data = $(this).serialize(); 3004 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 3005 var options = document.getElementById('sizeInput'); 3006 while (options.hasChildNodes()) { 3007 options.removeChild(options.lastChild); 3008 } 3009 $("#onlycolorInput").append("<option>Please select color</option>"); 3010 $.ajax({ 3011 type: 'POST', 3012 url: '@plcUrl' + '/Default.aspx?ID=191', 3013 data: data, 3014 success: function (data) { 3015 var firstSplit = data.split('<script type="text/javascript">'); 3016 $("#onlycolorInput").append(firstSplit[0]); 3017 } 3018 }); 30193020 return false; 3021 } 3022 }); 3023 $("#colorInput").change(function () { 3024 if (firstChange == "") { 3025 firstChange = "COLOR"; 3026 } 3027 if (firstChange == "SIZE") { 3028 var size = $("#sizeInput").val(); 3029 var data = $(this).serialize(); 3030 data += "&skuCode=@(skuCode)"; 3031 data += "&size=" + size + "&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 3032 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } }); 3033 $.ajax({ 3034 type: 'POST', 3035 url: '@plcUrl' + '/Default.aspx?ID=191', 3036 data: data, 3037 success: function (data) { 30383039 var firstSplit = data.split('<script type="text/javascript">'); 3040 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0]; 3041 } 3042 }); 30433044 return false; 3045 } else { 3046 var data = $(this).serialize(); 3047 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant; 3048 var options = document.getElementById('sizeInput'); 3049 while (options.hasChildNodes()) { 3050 options.removeChild(options.lastChild); 3051 } 3052 $("#sizeInput").append("<option>Please select size</option>"); 3053 $.ajax({ 3054 type: 'POST', 3055 url: '@plcUrl' + '/Default.aspx?ID=191', 3056 data: data, 3057 success: function (data) { 3058 var firstSplit = data.split('<script type="text/javascript">'); 3059 $("#sizeInput").append(firstSplit[0]); 3060 } 3061 }); 30623063 return false; 3064 } 3065 }); 30663067 @*//End of variant selector*@ 30683069 $("#quantityInput").change(function () { 3070 var repack = '@ProdRepackitems'; 3071 if (repack == 'True') { 3072 document.getElementById("repackQuantity").max = this.value; 30733074 document.getElementById("productFormQuantity").value = this.value; 3075 if (!$('#requireRepack').prop("checked")) { 3076 var linkstring = document.getElementById("addtocartLink").href.split('quantity='); 3077 var proid = document.getElementById("addtocartLink").href.split(','); 3078 var result = linkstring[0] + "quantity=" + this.value + "'," + proid[1] + "," + proid[2]; 3079 document.getElementById("addtocartLink").href = result; 3080 } 3081 } else { 30823083 var linkstring = document.getElementById("addtocartLink").href.split('quantity='); 3084 var proid = document.getElementById("addtocartLink").href.split(','); 3085 var result = linkstring[0] + "quantity=" + this.value + "'," + proid[1] + "," + proid[2]; 3086 document.getElementById("addtocartLink").href = result; 3087 } 30883089 }); 3090 @*//Start of repack*@ 3091 $("#requireRepack").click(function () { 3092 if ($('#requireRepack').prop("checked")) { 3093 document.getElementById("repackChoose").style.display = "block"; 3094 document.getElementById("addtocartLink").href = 'javascript:void(0)'; 3095 document.getElementById("addtocartLink").setAttribute("onclick", "submitRepack()"); 3096 } else { 3097 document.getElementById("repackChoose").style.display = "none"; 3098 document.getElementById("addtocartLink").href = '?productid=@pid&cartcmd=add&quantity=' + document.getElementById("quantityInput").value; 3099 document.getElementById("addtocartLink").setAttribute("onclick", ""); 31003101 } 3102 }); 3103 $("#repackQuantity").change(function () { 3104 document.getElementById("repackFormQuantity").value = this.value; 3105 document.getElementById("repackProductPrice").innerHTML = "$" + parseInt(this.value) * parseFloat("@repackPrice") + ".00"; 3106 if (parseInt($("#quantityInput").val()) < parseInt(this.value)) { 3107 this.value = 1; 3108 $("#repackError").attr("class", ""); 3109 } else { 3110 $("#repackError").attr("class", "hide"); 3111 } 3112 }); 31133114 function submitRepack() { 3115 showaddedItem('?cartcmd=add&productid=@pid&quantity=' + document.getElementById("quantityInput").value, @pid, false); 3116 document.getElementById("multiFormSubmit").click(); 3117 } 31183119 $("#repackQuantity").keyup(function (event) { 3120 if (parseInt($("#quantityInput").val()) < parseInt(this.value)) { 3121 this.value = 1; 3122 $("#repackError").attr("class", ""); 3123 } else { 3124 $("#repackError").attr("class", "hide"); 3125 } 3126 }).keydown(function (event) { 3127 if (event.which == 13) { 3128 event.preventDefault(); 3129 } 3130 }); 3131 @*//End of repack*@ 3132 function productDetailBreadCrumb() { 3133 var brandname = "@ProdBrand"; 3134 $('#breadcrumb').append('<li><a href="@plcUrl">Home</a><li >></li></li>'); 3135 @*//$('#breadcrumb').append('<li><a href="@plcUrl/@GetGlobalValue("Global:Page.Name")">@GetGlobalValue("Global:Page.Name")</a><li >></li></li>');*@ 3136 $('#breadcrumb').append('<li><a href="@plcUrl/default.aspx?id=@pageID&[email protected]()">@firstCategory</a><li >></li></li>'); 3137 @*//$('#breadcrumb').append('<li><a href="default.aspx?id=@pageID&[email protected]()&[email protected]()">@secondCategory.Replace("-a-","&")</a><li >></li></li>');*@ 3138 @*//$('#breadcrumb').append('<li><a href="default.aspx?id=@pageID&[email protected]()&[email protected]()&[email protected]()">@thirdCategory.Replace("-a-","&")</a><li >></li></li>');*@ 3139 @*//$('#breadcrumb').append('<li><a href="@plcUrl/@GetGlobalValue("Global:Page.Name")?q='+brandname+'">'+brandname+'</a><li >></li></li>');*@ 3140 $('#breadcrumb').append("<li><a href='@plcUrl/@GetGlobalValue("Global:Page.Name")[email protected]()'>@ProdBrand</a><li >></li></li>"); 3141 $('#breadcrumb').append('<li class="active">@ProdName</li>'); 3142 } 31433144 productDetailBreadCrumb(); 31453146 $(function () { 3147 $('#tabDivMain a:first').tab('show'); 3148 }); 31493150 @*//addProductDetails();*@ 3151 @*<!------------------- Add to Cart Begin -------------->*@ 3152 @*<!------- Check all variants are selected begin ---------->*@ 3153 function CheckVariantSelected() { 3154 var returnValue = true; 3155 if (parseInt('@hasVariantCount') > 1) { 3156 if (('@hasSize').toLowerCase() == 'true') { 3157 if ($("#sizeInput").val() == "" || $("#sizeInput").val().toLowerCase() == "please select size") { 3158 alert("Please select size."); 3159 returnValue = false; 3160 } 3161 } 3162 if (('@hasFlavour').toLowerCase() == 'true') { 3163 if ($("#flavourInput").val() == "" || $("#flavourInput").val().toLowerCase() == "please select flavour") { 3164 alert("Please select flavour."); 3165 returnValue = false; 3166 } 3167 } 3168 if (('@hasColor').toLowerCase() == 'true') { 3169 if ($("#colorInput").val() == "" || $("#colorInput").val().toLowerCase() == "please select color") { 3170 alert("Please select color."); 3171 returnValue = false; 3172 } 3173 } 3174 } 3175 if (returnValue) { 3176 @*//showaddedItem(" ", "@pid", "@ProdBrand", "@GetString("Ecom:Product.Name")", "@GetString("Ecom:Product.Price.PriceWithVAT")", "@GetString("Ecom:Product.Price.Currency.Symbol")", $("#quantityInput_" + "@pid").val(), true);*@ 3177 @*//AjaxAddToCart("?cartcmd=add&productid=@pid&quantity=", "@pid");*@ 31783179 ShowAddedItem_Then_AjaxAddToCart(" ", "@pid", "@ProdBrand.Replace(" & ", " myAND ")", '@GetString("Ecom:Product.Name").Replace(" & ", " myAND ")', "@GetString("Ecom:Product.Price.PriceWithVAT")", "@GetString("Ecom:Product.Price.Currency.Symbol")", $("#quantityInput_" + "@pid").val(), true, "&cartcmd=add&productid=@pid&quantity=", "@productNumber", "@CurrencyCode", "@firstCategory, @secondCategory, @thirdCategory", "@productSize", "@productFlavour", "@productColor"); 3180 } 3181 } 3182 @*<!------- Check all variants are selected end ---------->*@ 3183 @*<!------------------- Add to Cart End -------------->*@ 31843185 @*// var $j = jQuery.noConflict();*@ 3186 $('#zoom_product').elevateZoom({ 3187 zoomType: "inner", 3188 cursor: "crosshair", 3189 zoomWindowFadeIn: 500, 3190 zoomWindowFadeOut: 750 3191 }); 3192 function collapseMobile(val) { 3193 if ($("#mb_" + val)[0].classList.contains("in")) { 3194 $("#mb_" + val).removeClass("in"); 3195 } else { 3196 $("#mb_" + val).addClass("in"); 3197 } 3198 } 3199 $(document).ready(function () { 3200 gtag("event", "view_item", { 3201 currency: "@CurrencyCode", 3202 value: @internetPrice, 3203 items: [ 3204 { 3205 item_id: "@pid", 3206 item_name: "@ProdName", 3207 currency: "@CurrencyCode", 3208 discount: @string.Format("{0:0.00}", sellingPrice-internetPrice), 3209 index: 0, 3210 item_brand: "@ProdBrand", 3211 item_category: "@firstCategory", 3212 item_category2: "@secondCategory", 3213 item_category3: "@thirdCategory", 3214 item_variant: "@productFlavour", 3215 item_variant2: "@productColor", 3216 item_variant3: "@productSize", 3217 price: @sellingPrice, 3218 quantity: 1 3219 } 3220 ] 3221 }); 3222 }); 3223 </script>