Bark Lamb & Rice 375G Malaysia | Pet Lovers Centre
| 0
|

Error executing template "Designs/PLC/eCom/Product/PLCProductDetail.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting the varchar value 'NVALI' to data type int.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
   at System.Data.SqlClient.SqlDataReader.Read()
   at CompiledRazorTemplates.Dynamic.RazorEngine_7a1d53654c9740d48ad22209160426e4.Execute() in E:\website\PLCMalaysia\Solution\Files\Templates\Designs\PLC\eCom\Product\PLCProductDetail.cshtml:line 1349
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
ClientConnectionId:c54d903d-9df5-4cea-9015-6f34b5f5b8b9
Error Number:245,State:1,Class:16

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