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