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