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