1 @using DWAPAC.PLC.Services
2 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/css/ProductDetailStyle.css" type="text/css">
3 4 @{
5 string currentAbsoluteUriString = System.Web.HttpContext.Current.Request.Url.AbsoluteUri;
6 var userAgent = HttpContext.Current.Request.UserAgent.ToLower();
7 8 Uri currentAbsoluteUri = new Uri(currentAbsoluteUriString);
9 string plcUrl = currentAbsoluteUri.Scheme + "://" + currentAbsoluteUri.Host;
10 string showHide = string.Empty;
11 12 Dynamicweb.Ecommerce.Products.Product dwProduct = new Dynamicweb.Ecommerce.Products.Product();
13 dwProduct = Dynamicweb.Ecommerce.Products.Product.GetProductById(GetString("Ecom:Product.ID"));
14 if (dwProduct.ExcludeFromIndex)
15 {
16 System.Web.HttpContext.Current.Response.Redirect("/404-error-page");
17 }
18 }
19 20 @{
21 string promoName = "";
22 string promoD = "";
23 int pId = GetInteger("Ecom:Product.ID");
24 List<string> productPromoNames = new List<string>();
25 @*var promosqlString = "SELECT discountname, discountdescription FROM ecomdiscount WHERE DISCOUNTACTIVE='true' and discountproductsandgroups LIKE '%p:" + pId + "%'";*@
26 @*var promosqlString = "SELECT DISCOUNTNAME,DISCOUNTDESCRIPTION FROM EcomDiscountExtView where DISCOUNTPRODUCTSANDGROUPS LIKE '%p:" + pId + ",%'";*@
27 string promosqlString = "SELECT DiscountName, DiscountDescription FROM PLC_EcomDiscountJoinedView WHERE DiscountProductIdByDiscount = '" + pId + "' OR DiscountProductsAndGroups LIKE '%p:" + pId + ",%'";
28 using (System.Data.IDataReader promoNameReder = Dynamicweb.Data.Database.CreateDataReader(promosqlString))
29 {
30 while (promoNameReder.Read())
31 {
32 promoName += promoNameReder["discountname"].ToString() + "<br>" + "<div style='font-size: small; margin-top: 7px;'>" + promoNameReder["discountdescription"].ToString() + "</div>" + "<br>";
33 @*//promoD += promoNameReder["discountdescription"].ToString() + "<br>";*@
34 }
35 }
36 List<string> resourceImagesList = new PLCSource.Utilities.ImageUtility().GetResourceTagImages(GetString("Ecom:Product.ID"));
37 string resourceImagesListShow = "";
38 if (resourceImagesList == null || resourceImagesList.Count() < 1 )
39 {
40 resourceImagesListShow = "display: none;";
41 }
42 }
43 44 <script>
45 var canAddToCart = true;
46 </script>
47 48 @using System.Web
49 50 @using System.Text.RegularExpressions
51 @using System.Web
52 53 54 @functions{
55 public class WrapMethods
56 {
57 58 59 //Gets the contrasting color
60 public static string getContrastYIQ(string hexcolor)
61 {
62 if (hexcolor != "")
63 {
64 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", "");
65 66 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16);
67 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16);
68 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16);
69 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
70 71 if (yiq >= 128)
72 {
73 return "black";
74 }
75 else
76 {
77 return "white";
78 }
79 }
80 else
81 {
82 return "black";
83 }
84 }
85 86 87 //Truncate text
88 public static string Truncate (string value, int count, bool strip=true)
89 {
90 if (strip == true){
91 value = StripHtmlTagByCharArray(value);
92 }
93 94 if (value.Length > count)
95 {
96 value = value.Substring(0, count - 1) + "...";
97 }
98 99 return value;
100 }
101102103 //Strip text from HTML
104 public static string StripHtmlTagByCharArray(string htmlString)
105 {
106 char[] array = new char[htmlString.Length];
107 int arrayIndex = 0;
108 bool inside = false;
109110 for (int i = 0; i < htmlString.Length; i++)
111 {
112 char let = htmlString[i];
113 if (let == '<')
114 {
115 inside = true;
116 continue;
117 }
118 if (let == '>')
119 {
120 inside = false;
121 continue;
122 }
123 if (!inside)
124 {
125 array[arrayIndex] = let;
126 arrayIndex++;
127 }
128 }
129 return new string(array, 0, arrayIndex);
130 }
131132 //Make the correct count of columns
133 public static string ColumnMaker(int Col, string ScreenSize)
134 {
135 string Columns = "";
136137 switch (Col)
138 {
139 case 1:
140 Columns = "col-"+ScreenSize+"-12";
141 break;
142143 case 2:
144 Columns = "col-"+ScreenSize+"-6";
145 break;
146147 case 3:
148 Columns = "col-"+ScreenSize+"-4";
149 break;
150151 case 4:
152 Columns = "col-"+ScreenSize+"-3";
153 break;
154155 default:
156 Columns = "col-"+ScreenSize+"-3";
157 break;
158 }
159160 return Columns;
161 }
162163164 private string Custom(string firstoption, string secondoption)
165 {
166 if (firstoption == "custom")
167 {
168 return secondoption;
169 }
170 else
171 {
172 return firstoption;
173 }
174 }
175 }
176 }
177 @using DWAPAC.PLC.Services
178 @using Dynamicweb.Security.UserManagement.Common.CustomFields
179180 <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
181 <script type="text/javascript" src="/Files/Templates/Designs/PLC/eCom/ProductList/Compare.js"></script>
182 <link rel="stylesheet" href="/Files/Templates/Designs/PLC/assets/css/ProductRenderStyle.css" type="text/css">
183184 <style>
185 .ui-dialog-titlebar, .ui-dialog-buttonset button{
186 background:#662010;
187 color: #FFF;
188 }
189 .product-box .prod-img img {
190 display: block;
191 margin: 0px auto;
192 }
193194 input[type=number]::-webkit-inner-spin-button,
195 input[type=number]::-webkit-outer-spin-button {
196 -webkit-appearance: none;
197 -moz-appearance: none;
198 appearance: none;
199 margin: 0;
200 }
201202 @if(GetInteger("Ecom:ProductList.PageProdCnt") > 0)
203 {
204 <text>
205 .btn-addto-cart {
206 margin-bottom:5px;
207 background-color: #ad2d14;
208 height:38px;
209 border-radius: 3px;
210 }
211 .btn-addto-cart:hover {
212 //background-color: #500d00;
213 }
214 .glyphicon-minus, .glyphicon-plus {
215 cursor: pointer;
216 color: #ffffff;
217 }
218 </text>
219 if(System.Web.HttpContext.Current.Request.Browser.Type.ToUpper().Contains("SAFARI"))
220 {
221 <text>
222 .btn-addto-cart div a, .btn-addto-cart a {
223 line-height: 36px;
224 }
225 #addtocartLink {
226 margin-top: 30px !important;
227 }
228 @@media screen (max-width: 340px){
229 .btn-addto-cart div a, .btn-addto-cart a {
230 padding-top: 0px;
231 }
232 }
233 .fixsize {
234 margin-top: 120px;
235 }
236 </text>
237 }
238 }
239 else
240 {
241 if(System.Web.HttpContext.Current.Request.Browser.Type.ToUpper().Contains("SAFARI"))
242 {
243 <text>
244 .btn-addto-cart div a, .btn-addto-cart a {
245 line-height: 36px;
246 }
247 #addtocartLink {
248 margin-top: 30px !important;
249 }
250 @@media screen (max-width: 340px){
251 .btn-addto-cart div a, .btn-addto-cart a {
252 padding-top: 0px;
253 }
254 }
255 </text>
256 }
257 }
258 </style>
259260 <script>
261 var items = [];
262 var productId = [];
263 var productName = [];
264 var productCurrency = [];
265 var productDiscount = [];
266 var productBrand = [];
267 var firstCategory = [];
268 var secondCategory = [];
269 var thirdCategory = [];
270 var productFlavour = [];
271 var productColor = [];
272 var productSize = [];
273 var sellingPrice = [];
274 </script>
275276 @functions
277 {
278 public class SortInPage
279 {
280 public string StockStatus { get; set; }
281 public int StockStatusSortValue { get; set; }
282 public string ProductId { get; set; }
283 public string BrandName { get; set; }
284 public int BestSelling { get; set; }
285 public double TotalAmountSold { get; set; }
286 public double Price { get; set; }
287 public bool NewArrival { get; set; }
288 public int AutoId { get; set; }
289 }
290 }
291292 @helper GetProductList(dynamic ProductLoop, bool birthday, string becomeAMemberPrice, int ColMD = 3, int ColSM = 3, int ColXS = 1)
293 {
294 var Loop = GetLoop("Products").ToList();
295 List<SortInPage> SortInPageList = new List<SortInPage>();
296 string SortByValue = "TotalAmtSold".ToUpper();
297 if (!string.IsNullOrEmpty(HttpContext.Current.Request["SortOrder"]))
298 {
299 SortByValue = Convert.ToString(HttpContext.Current.Request["SortBy"]).ToUpper();
300 if (SortByValue.Contains("NewArrivals".ToUpper()))
301 {
302 SortByValue = "NewArrivals".ToUpper();
303 }
304 }
305 string SortOrderValue = "Asc".ToUpper();
306 if (!string.IsNullOrEmpty(HttpContext.Current.Request["SortOrder"]))
307 {
308 SortOrderValue = Convert.ToString(HttpContext.Current.Request["SortOrder"]).ToUpper();
309 if (SortOrderValue.Contains("Desc".ToUpper()))
310 {
311 SortOrderValue = "Desc".ToUpper();
312 }
313 }
314315 var birthday0 = false;
316 bool showBirthdayPrice = false;
317 bool userHasVIPCard = false;
318 bool userHasValidVipCard = false;
319 DateTime expDate = new DateTime();
320 DateTime today = DateTime.Now;
321322 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
323 {
324 int i = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID"));
325 Dynamicweb.Security.UserManagement.User u = Dynamicweb.Security.UserManagement.User.GetUserByID(i);
326327 foreach (CustomFieldValue val in u.CustomFieldValues)
328 {
329 CustomField field = val.CustomField;
330 string fieldName = field.Name;
331332 if (fieldName == "DOB")
333 {
334 DateTime bDay = new DateTime();
335 if (val.Value != null)
336 {
337 bDay = Dynamicweb.Core.Converter.ToDateTime(val.Value);
338 if (bDay.Month == today.Month)
339 {
340 birthday0 = true;
341 }
342 }
343 }
344 if (fieldName == "ExpryDate")
345 {
346 expDate = Dynamicweb.Core.Converter.ToDateTime(val.Value);
347 }
348349 switch (fieldName.ToUpper())
350 {
351 case "VIP CARD NO":
352 userHasVIPCard = !string.IsNullOrEmpty((val.Value).ToString());
353 break;
354 case "EXPRYDATE":
355 userHasValidVipCard = expDate.Date <= today.Date;
356 break;
357 default:
358 break;
359 }
360 }
361 }
362 showBirthdayPrice = birthday0 && userHasVIPCard && userHasValidVipCard;
363364 string pathproduct = "/Files/Images/plc";
365 string imgpath = "/Files/Images/Ecom/Products/";
366 string imgpathpng = "";
367 string pidString = "";
368 var loopCounter = 0;
369 List<string> statusList = new List<string>();
370371 foreach (LoopItem product1 in Loop)
372 {
373 string pid1 = product1.GetString("Ecom:Product.ID");
374 pidString += "[" + pid1 + "],";
375 }
376 pidString = pidString.Remove(pidString.Length - 1);
377 pidString = "{" + pidString;
378 pidString = pidString + "}";
379380 var response = WebServices.getProductMultiStatusAdvServiceResponse(pidString);
381382 var responseSplit = response.Split(';');
383 if (responseSplit[0].Contains("500"))
384 {
385 <style>
386 @@media screen and (max-width: 700px) and (min-width: 350px) and (max-height: 700px) {
387 .mainImg {
388 padding-left: 85px;
389 }
390 }
391392 @@media screen and (max-width: 700px) and (min-width: 600px) and (max-height: 400px) {
393 .mainImg {
394 padding-left: 222px;
395 }
396 }
397 </style>
398 if (Pageview.Device.ToString().ToUpper() == "MOBILE")
399 {
400 <div style="padding-left: 60px;" name="under_maintenance">
401 <img src="/Files/Templates/Designs/PLC/assets/images/under_maintenance_icon.png" class="mainImg" alt="Under Maintenance"><br><br>
402 <span style="font-size: 20px;font-weight: 700;">Sorry, we are facing a temporary server error. Please try again later.</span>
403 </div>
404 }
405 else if (Pageview.Device.ToString().ToUpper() == "TABLET")
406 {
407 <div name="under_maintenance"><img src="/Files/Templates/Designs/PLC/assets/images/under_maintenance_icon.png" alt="Under Maintenance"><span style="padding-left: 15px; font-size: 20px; font-weight: 700;">Sorry, we are facing a temporary server error. Please try again later.</span></div>
408 }
409 else
410 {
411 <div style="padding-left: 60px;" name="under_maintenance"><img src="/Files/Templates/Designs/PLC/assets/images/under_maintenance_icon.png" alt="Under Maintenance"><span style="padding-left: 15px; font-size: 20px; font-weight: 700;">Sorry, we are facing a temporary server error. Please try again later.</span></div>
412 }
413 return;
414 }
415416 string productResponse = responseSplit[2].Split('{')[1].Replace("}", "");
417418 var singleProduct = productResponse.Split(',');
419 for (var i = 0; i < singleProduct.Length; i++)
420 {
421 string string1 = singleProduct[i].Remove(singleProduct[i].Length - 1).Remove(0, 1);
422 statusList.Add(string1.Split(':')[1]);
423424 SortInPage sortInPage = new SortInPage();
425 sortInPage.StockStatus = Convert.ToString(string1.Split(':').LastOrDefault());
426 switch (sortInPage.StockStatus.ToUpper())
427 {
428 case "AVAILABLE":
429 sortInPage.StockStatusSortValue = 1;
430 break;
431 case "IN STOCK":
432 sortInPage.StockStatusSortValue = 2;
433 @*if (SortByValue.ToUpper() == "INTERNETPRICE")
434 {
435 sortInPage.StockStatusSortValue = 2;
436 }*@
437 break;
438 case "SPECIAL ORDER":
439 sortInPage.StockStatusSortValue = 3;
440 break;
441 default:
442 sortInPage.StockStatusSortValue = 0;
443 break;
444 }
445446 sortInPage.ProductId = Convert.ToString(string1.Split(':').FirstOrDefault());
447448 var sortInPageProduct = Loop.FirstOrDefault(x => x.GetString("Ecom:Product.ID") == sortInPage.ProductId);
449450 sortInPage.BrandName = sortInPageProduct.GetString("Ecom:Product:Field.ProductBrand");
451 sortInPage.BestSelling = sortInPageProduct.GetInteger("Ecom:Product:Field.BestSelling.Value.Clean");
452 sortInPage.Price = Math.Floor((sortInPageProduct.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200;
453 sortInPage.TotalAmountSold = Dynamicweb.Core.Converter.ToDouble(Dynamicweb.Ecommerce.Products.Product.GetProductById(sortInPage.ProductId).ProductFieldValues.GetProductFieldValue("BestSellingAmount").Value);
454 sortInPage.NewArrival = sortInPageProduct.GetBoolean("Ecom:Product:Field.NewArrivals.Value.Clean");
455456 Dynamicweb.Ecommerce.Products.Product product = Dynamicweb.Ecommerce.Services.Products.GetProductById(sortInPage.ProductId, null, null);
457458 sortInPage.AutoId = Dynamicweb.Core.Converter.ToInt32(product?.AutoId);
459460 SortInPageList.Add(sortInPage);
461 }
462463 if (SortOrderValue == "DESC")
464 {
465 switch (SortByValue.ToUpper())
466 {
467 case "TOTALAMTSOLD":
468 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenByDescending(x => x.TotalAmountSold).ToList();
469 break;
470 case "BRAND":
471 SortInPageList = SortInPageList.OrderByDescending(x => x.BrandName).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.TotalAmountSold).ThenByDescending(x => x.AutoId).ToList();
472 break;
473 case "INTERNETPRICE":
474 SortInPageList = SortInPageList.OrderByDescending(x => x.Price).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList();
475 break;
476 case "NEWARRIVALS":
477 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList();
478 break;
479 case "AUTOID":
480 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ToList();
481 break;
482 }
483 }
484 else
485 {
486 switch (SortByValue.ToUpper())
487 {
488 case "TOTALAMTSOLD":
489 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenByDescending(x => x.TotalAmountSold).ToList();
490 break;
491 case "BRAND":
492 SortInPageList = SortInPageList.OrderBy(x => x.BrandName).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.TotalAmountSold).ThenByDescending(x => x.AutoId).ToList();
493 break;
494 case "INTERNETPRICE":
495 SortInPageList = SortInPageList.OrderBy(x => x.Price).ThenBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList();
496 break;
497 case "NEWARRIVALS":
498 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ThenByDescending(x => x.AutoId).ToList();
499 break;
500 case "AUTOID":
501 SortInPageList = SortInPageList.OrderBy(x => x.StockStatusSortValue).ToList();
502 break;
503 }
504 }
505506 if (responseSplit[0].Contains("200"))
507 {
508 foreach (LoopItem product1 in Loop)
509 {
510 var sellingPrice1 = Math.Floor((product1.GetDouble("Ecom:Product:Field.ProductSPrice")) * 1000 / 5) / 200;
511 var internetPrice1 = Math.Floor((product1.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200;
512 <script>
513 items.push({
514 'item_id': "@product1.GetString("Ecom:Product.ID")",
515 'item_name': "@product1.GetString("Ecom:Product.Name")",
516 'currency': "@product1.GetString("Ecom:Product.Price.Currency.Code")",
517 'discount': @string.Format("{0:0.00}", sellingPrice1-internetPrice1),
518 'index': 0,
519 'item_brand': "@product1.GetString("Ecom:Product:Field.ProductBrand")",
520 'item_category': "@product1.GetString("Ecom:Product:Field.FirstCategory")",
521 'item_category2': "@product1.GetString("Ecom:Product:Field.SecondCategory")",
522 'item_category3': "@product1.GetString("Ecom:Product:Field.ThirdCategory")",
523 'item_variant1': "@product1.GetString("Ecom:Product:Field.Flavour.Value")",
524 'item_variant2': "@product1.GetString("Ecom:Product:Field.Color.Value")",
525 'item_variant3': "@product1.GetString("Ecom:Product:Field.Size.Value")",
526 'price': @sellingPrice1,
527 'quantity': 1
528 })
529 productId.push("@product1.GetString("Ecom:Product.ID")");
530 productName.push("@product1.GetString("Ecom:Product.Name")");
531 productCurrency.push("@product1.GetString("Ecom:Product.Price.Currency.Code")");
532 productDiscount.push("@string.Format("{0:0.00}", sellingPrice1-internetPrice1)");
533 productBrand.push("@product1.GetString("Ecom:Product:Field.ProductBrand")");
534 firstCategory.push("@product1.GetString("Ecom:Product:Field.FirstCategory")");
535 secondCategory.push("@product1.GetString("Ecom:Product:Field.SecondCategory")");
536 thirdCategory.push("@product1.GetString("Ecom:Product:Field.ThirdCategory")");
537 productFlavour.push("@product1.GetString("Ecom:Product:Field.Flavour.Value")");
538 productColor.push("@product1.GetString("Ecom:Product:Field.Color.Value")");
539 productSize.push("@product1.GetString("Ecom:Product:Field.Size.Value")");
540 sellingPrice.push("@sellingPrice1");
541 </script>
542 }
543 foreach (SortInPage sortInPage in SortInPageList)
544 {
545 var product = Loop.FirstOrDefault(x => x.GetString("Ecom:Product.ID") == sortInPage.ProductId);
546547 string prodGroupsforFBpixel = "";
548 prodGroupsforFBpixel = string.IsNullOrEmpty(product.GetString("Department")) ? product.GetString("Ecom:Product:Field.FirstCategory") : product.GetString("Department");
549 prodGroupsforFBpixel += "," + (string.IsNullOrEmpty(product.GetString("Category")) ? product.GetString("Ecom:Product:Field.SecondCategory") : product.GetString("Category"));
550 prodGroupsforFBpixel += "," + (string.IsNullOrEmpty(product.GetString("CategoryDetails")) ? product.GetString("Ecom:Product:Field.ThirdCategory") : product.GetString("CategoryDetails"));
551 string pid = product.GetString("Ecom:Product.ID");
552 //Promotion
553 imgpath = "/Files/Images/Ecom/Products/";
554 string promoName = "";
555 string promoD = "";
556 List<string> productPromoNames = new List<string>();
557 @*var promosqlString = "SELECT ED.DISCOUNTNAME,ED.DISCOUNTDESCRIPTION FROM EcomDiscountExtensions EDEs INNER JOIN EcomDiscount ED ON EDEs.DISCOUNTID = ED.DISCOUNTID WHERE EDEs.DISCOUNTDISPLAYATPDP = 'True' and ED.DISCOUNTPRODUCTSANDGROUPS LIKE '%p:" + pid + "%'";*@
558 var promosqlString = "SELECT DISCOUNTNAME,DISCOUNTDESCRIPTION FROM EcomDiscountExtView where DISCOUNTPRODUCTSANDGROUPS LIKE '%p:" + pid + ",%'";
559 using (System.Data.IDataReader promoNameReder = Dynamicweb.Data.Database.CreateDataReader(promosqlString))
560 {
561 while (promoNameReder.Read())
562 {
563 promoName += promoNameReder["DISCOUNTNAME"].ToString();
564 promoD += promoNameReder["DISCOUNTDESCRIPTION"].ToString() + "<br>";
565 }
566 }
567 string Image = product.GetString("Ecom:Product.ImageSmall.Default.Clean");
568 string Link = product.GetString("Ecom:Product.Link.Clean");
569 string GroupLink = product.GetString("Ecom:Product.LinkGroup.Clean");
570 string Name = product.GetString("Ecom:Product.Name");
571 GroupLink = "Default.aspx?ID=298&ProductID=" + pid; ;
572 string Number = product.GetString("Ecom:Product.Number");
573574 string ProdBrand = product.GetString("Ecom:Product:Field.ProductBrand").Replace("'", @"\-");
575 imgpath = "/Files/Images/Ecom/Products/" + pid + ".jpg";
576 imgpathpng = "/Files/Images/Ecom/Products/" + pid + ".png";
577 var absolutePathjpg = System.Web.HttpContext.Current.Server.MapPath("~/" + imgpath);
578 var absolutePathpng = System.Web.HttpContext.Current.Server.MapPath("~/" + imgpathpng);
579 if (System.IO.File.Exists(absolutePathjpg))
580 {
581 Image = imgpath;
582 }
583 else if (System.IO.File.Exists(absolutePathpng))
584 {
585 Image = imgpathpng;
586 }
587588 string Description = product.GetString("Ecom:Product.ShortDescription");
589 string Discount = product.GetString("Ecom:Product.Discount.Price");
590 string Price = product.GetString("Ecom:Product.Price");
591 string CurrencyCode = product.GetString("Ecom:Product.Price.Currency.Code");
592 //string Promotion=product.GetString("Ecom:Product.Price");
593 string Active = product.GetString("Ecom:Product.IsActive");
594 var Rating = product.GetDouble("Ecom:Product.Rating");
595596 var sellingPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSPrice")) * 1000 / 5) / 200;
597 var internetPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200;
598 var price = 9.95;
599 var savePrice = sellingPrice - internetPrice;
600601 if (price == product.GetDouble("Ecom:Product:Field.ProductSInternetPrice"))
602 {
603 internetPrice = product.GetDouble("Ecom:Product:Field.ProductSInternetPrice");
604 }
605 Boolean inventoryDiscount = product.GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag");
606 var discountPercentage = product.GetDouble("Ecom:Product:Field.ProductInventoryDiscount");
607 var birthdayPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSBirthdayPrice")) * 1000 / 5) / 200;
608 var memberPrice = Math.Floor((product.GetDouble("Ecom:Product:Field.ProductSMemberPrice")) * 1000 / 5) / 200;
609 var disable = product.GetBoolean("Ecom:Product:Field.Disable");
610 var promotion = 0.00;
611 var discountType = "";
612 var promoNames = "";
613 var testingNames = "";
614 string firstcategory = product.GetString("Ecom:Product:Field.FirstCategory");
615 string secondcategory = product.GetString("Ecom:Product:Field.SecondCategory");
616 string thirdcategory = product.GetString("Ecom:Product:Field.ThirdCategory");
617 string productSize = product.GetString("Ecom:Product:Field.Size.Value");
618 string productFlavour = product.GetString("Ecom:Product:Field.Flavour.Value");
619 string productColor = product.GetString("Ecom:Product:Field.Color.Value");
620621 foreach (var promoItem in product.GetLoop("AllDiscounts"))
622 {
623 promoNames += promoItem.GetString("Ecom:AllDiscounts.Discount.Name") + "<br>";
624 }
625 foreach (LoopItem item in product.GetLoop("ProductDiscounts"))
626 {
627628 if (item.GetString("Ecom:Product.Discount.Type") == "PERCENT")
629 {
630 discountType = "PERCENT";
631 promotion = item.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted");
632 }
633 else
634 {
635 discountType = "AMOUNT";
636 promotion = item.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted");
637 }
638 }
639640 if (pid != "PROD1" && pid != "PROD2")
641 {
642 <!--product start-->
643 if (!disable)
644 {
645 <div class="product-box col-1-3 tab-col-1-2 mobile-col-1-1" id="get_@pid">
646 <div class="prod-img">
647 @if (promotion != 0)
648 {
649 if (discountType == "PERCENT")
650 {
651 @*<div class="ribbon-P"><span>@promotion% Off</span></div>*@
652 }
653 else
654 {
655 @*<div class="ribbon-P"><span>$@promotion Off</span></div>*@
656 }
657 }
658 else
659 {
660 //add ERP discount ribbon
661 if (inventoryDiscount)
662 {
663 if (discountPercentage != 0)
664 {
665 @*<div class="ribbon-D"><span>@discountPercentage% Off</span></div>*@
666 }
667 }
668 }
669 @*//add ERP discount ribbon*@
670 @if (inventoryDiscount && discountPercentage != 0)
671 {
672 <div class="ribbon-D"><span>@discountPercentage% Off</span></div>
673 }
674 <a href="@GroupLink" title="@Name" onclick='selectItem("@pid", "@Name", "@CurrencyCode", @string.Format("{0:0.00}", sellingPrice-internetPrice), "@product.GetString("Ecom:Product:Field.ProductBrand")", "@firstcategory", "@secondcategory", "@thirdcategory", "@productFlavour", "@productColor", "@productSize", @sellingPrice)'>
675 <img src="/Admin/Public/Getimage.ashx?width=1&&format=webp&image=/Files/Images/default.png" data-src="/Admin/Public/Getimage.ashx?width=147&&format=webp&image=@Image" class="img-responsive yall_lazy" id="img_@pid" alt="@Name @Number" title="@Name @Number">
676 </a>
677 </div>
678 @if (promoName != "")
679 {
680 <span class="top tipso_style" data-tipso='@promoName.Replace("\"", """).Replace("'","'").Replace("<","<").Replace(">",">")'>
681 @if (GetGlobalValue("Global:Extranet.UserName") != "")
682 {
683 <div style="background: linear-gradient(to right, #ec5a11 , #f4a413 ); text-align: center; font-size: medium; color: white; font-weight: 600; height:22px;">PROMOTION</div>
684 }
685 else
686 {
687 <div class="mblpromologo mblpromologo1 mblPromologoipad mblPromologoipad1 mblPromologolap" style="background: linear-gradient(to right, #ec5a11 , #f4a413 ); text-align: center; font-size: medium; color: white; font-weight: 600; margin-bottom: inherit; height:22px;"><img data-src="/Admin/Public/Getimage.ashx?width=16&&format=webp&image=/Files/Templates/Designs/PLC/assets/images/login_promo.png" class="yall_lazy" style="padding-bottom:2px;"> LOGIN PROMO</div>
688 }
689 </span>
690 }
691 else
692 {
693 <div class="mblpromologo mblpromologo1 mblPromologoipad mblPromologoipad1 mblPromologolap" style="background: white; text-align: center; font-size: medium; color: white; font-weight: 600; height:22px;"></div>
694 }
695 <p class="prod-name">
696 <span class="brand-name">@ProdBrand.Replace(@"\-", "'")</span>
697 <br /> @product.GetString("Ecom:Product.Name")
698 </p>
699700701702 <div class="prod-star" style="display:none;">
703 @if (@Rating == 0)
704 {
705 <label class="starUnselected"></label>
706 <label class="starUnselected"></label>
707 <label class="starUnselected"></label>
708 <label class="starUnselected"></label>
709 <label class="starUnselected"></label>
710 }
711 @if (Rating % 1 != 0)
712 {
713 for (var i = 1; i < @Rating; i++)
714 {
715 <label class="starSelected"></label>
716 }
717 <label class="starSelected half"></label>
718 }
719 else
720 {
721 for (var i = 1; i < @Rating + 1; i++)
722 {
723 <label class="starSelected"></label>
724 }
725 }
726727728 </div>
729 <div class="prod-pbox">
730 @if (inventoryDiscount)
731 {
732 if (sellingPrice != internetPrice)
733 {
734 <div class="prod-price">
735 <p class="op">
[email protected]("{0:0.00}", sellingPrice)</p>
736 <p class="np">
[email protected]("{0:0.00}", internetPrice)</p>
737 <p class="save-price">Save
[email protected]("{0:0.00}", sellingPrice - internetPrice)</p>
738 </div>
739 }
740 else if (sellingPrice == internetPrice)
741 {
742 <div class="prod-price">
743 <p class="np">
[email protected]("{0:0.00}", sellingPrice)</p>
744 </div>
745 }
746 <div style="height:65px;">
747 @* Add gap to fix aligment *@
748 <div class="member-price"></div>
749 </div>
750 }
751 @*inventoryDiscount false*@
752 else
753 {
754 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
755 {
756 <div class="prod-price">
757 <p class="np">
[email protected]("{0:0.00}", sellingPrice)</p>
758 </div>
759 <div style="height:65px;">
760 <div class="member-price">
761 @if (memberPrice > 0)
762 {
763 <div id="proId" style="display:none"></div>
764 <div class="title" id="memberId">
765 VIP Member
766 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price">
767 <img src="@pathproduct/images/icon_info.png" width="15" align="texttop" alt="icon info" title="">
768 </span>
769 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
770 </div>
771 <div class="title" id="birthdayId">
772 VIP Birthday
773 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price on your birthday month">
774 <img src="@pathproduct/images/icon_info.png" width="15" align="texttop" alt="icon info">
775 </span>
776 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
777 </div>
778779 }
780 @if (birthdayPrice > 0 && showBirthdayPrice)
781 {
782 <div class="title">
783 VIP Birthday
784 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month ">
785 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info">
786 </span>
787 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
788 </div>
789 }
790 </div>
791 </div>
792 }
793 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
794 {
795 <div class="prod-price">
796 <p class="np">
[email protected]("{0:0.00}", internetPrice)</p>
797 </div>
798 if (userHasVIPCard)
799 {
800 if (userHasValidVipCard)
801 {
802 <div id="proId" style="display:none"></div>
803 <div style="height:65px;">
804 <div class="member-price">
805 <div class="title" id="memberId">
806 VIP Member
807 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price">
808 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title="">
809 </span>
810 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
811 </div>
812 <div class="title" id="birthdayId">
813 VIP Birthday
814 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month">
815 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info">
816 </span>
817 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
818 </div>
819 </div>
820 </div>
821 }
822823 if (!birthday)
824 {
825 if (!userHasValidVipCard)
826 {
827 <div style="height:65px;">
828 <div class="member-price">
829 @if (memberPrice > 0)
830 {
831 <div class="title" id="memberId">
832 VIP Member
833 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price ">
834 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info">
835 </span>
836 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
837 </div>
838 }
839 </div>
840 </div>
841 }
842 }
843 else if (birthday)
844 {
845 if (!userHasValidVipCard)
846 {
847 <div style="height:65px;">
848 <div class="member-price">
849 <div class="title" id="birthdayId">
850 VIP Birthday
851 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month">
852 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon_info">
853 </span>
854 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
855 </div>
856 </div>
857 </div>
858 }
859 }
860 }
861 else
862 {
863 <div id="proId" style="display:none"></div>
864 <div style="height:65px;">
865 <div class="member-price">
866 <div class="title" id="memberId">
867 VIP Member
868 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price ">
869 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info" title="">
870 </span>
871 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
872 </div>
873 <div class="title" id="birthdayId">
874 VIP Birthday
875 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month">
876 <img src="@pathproduct/images/icon_info.png" width="20" align="texttop" alt="icon info">
877 </span>
878 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
879 </div>
880 </div>
881 </div>
882 }
883 }
884 }
885 </div>
886 <!-------------------------------------------------------End Pricing---------------------------------------------------------------------------------------------------->
887 <hr>
888 @{ string tipsoMessage = "no Message Available!"; string statusmsg = "";}
889 @if (product.GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
890 {
891 tipsoMessage = "In Store Only";
892 <ul class="info" style="height: unset !important;">
893 @if (Pageview.Device.ToString().ToUpper() == "MOBILE" || Pageview.Device.ToString().ToUpper() == "TABLET")
894 {
895 <li>
896 *AVAILABLE IN STORE<span class="top tipso_style" data-tipso='In Store Only' style="vertical-align: text-bottom;">
897 </span>
898 </li>
899 }
900 else
901 {
902 <li>
903 *AVAILABLE IN STORE ONLY<span class="top tipso_style" data-tipso='In Store Only' style="vertical-align: text-bottom;">
904 </span>
905 </li>
906 }
907 </ul>
908 }
909 else
910 {
911 tipsoMessage = sortInPage.StockStatus;
912 switch (sortInPage.StockStatus.ToUpper())
913 {
914 case "AVAILABLE":
915 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";
916 statusmsg = "AVAILABLE";
917 break;
918 case "SPECIAL ORDER":
919 tipsoMessage = "Stocks are subjected to supplier's availability with the earliest delivery in 7 working days from date of order.";
920 break;
921 case "IN STOCK":
922 tipsoMessage = "Only available in-stores. Please allow 5 working days for transfer and delivery, or order via GrabMart/FoodPanda for faster delivery.";
923 break;
924 default:
925 tipsoMessage = "no Message Available!";
926 break;
927 }
928 tipsoMessage = tipsoMessage.Replace("\'", "'");
929 <ul class="info" style="height: unset !important;">
930 <li>
931 *@sortInPage.StockStatus
932 <span class="top tipso_style" data-tipso='@tipsoMessage' style="vertical-align: text-bottom;">
933 <img src="@pathproduct/images/icon_question_mark.png" alt="icon info" title="" style="width:10px;">
934 </span>
935 </li>
936 </ul>
937 }
938 @if (!product.GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
939 {
940 <div class="btn-addto-cart smalldev">
941 <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;">
942 <span onclick='QtyControlBtn("quantityInput_@pid", "-");' type="button" data-value="-1" data-target="#spinner2" data-toggle="spinner">
943 <span class="glyphicon glyphicon-minus"></span>
944 </span>
945 <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">
946 <span onclick='QtyControlBtn("quantityInput_@pid", "+");' type="button" data-value="2" data-target="#spinner2" data-toggle="spinner">
947 <span class="glyphicon glyphicon-plus"></span>
948 </span>
949 </div>
950 <div class="col-md-6 col-sm-6 col-xs-6 mblAddTo" style="padding: 1px 5px;display: table-cell;">
951 <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;">
952 <i class="fa fa-shopping-cart"></i>
953 <span class="MainAddToCart">Add to cart</span><span class="SubAddToCart">Add</span>
954 </a>
955 </div>
956 </div>
957 }
958 else
959 {
960 <div class="btn-addto-cart" style="margin-bottom:5px; cursor:not-allowed; display:none;">
961 <a><i class="fa fa-shopping-cart"></i> In Store Only </a>
962 </div>
963 }
964965 <div class="prod-compare" style="height : 35px;">
966 <form>
967 <label>
968 Compare
969 <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);">
970 <span></span>
971 </label>
972 </form>
973 </div>
974 </div>
975 }
976 <!--product end-->
977 }
978 loopCounter++;
979 }
980 }
981 <div onclick="topFunction()" id="myBtn" title="Go to top"></div>
982 }
983 <script>
984 $(document).ready(function () {
985 viewItemList(productId, productName, productCurrency, productDiscount, productBrand, firstCategory, secondCategory, thirdCategory, productFlavour, productColor, productSize, sellingPrice);
986 });
987 function topFunction() {
988 $('html, body').animate({ scrollTop: 0 }, 'fast')
989 }
990991 window.onscroll = function() {scrollFunction()};
992993 function scrollFunction() {
994 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
995 document.getElementById("myBtn").style.display = "block";
996 } else {
997 document.getElementById("myBtn").style.display = "none";
998 }
999 }
1000 function addtocartAjax(pid, pbrand, productName, PriceWithVAT, CurrencySymbol) {
1001 pbrand = pbrand.replace("\-", "'");
1002 ShowAddedItem_Then_AjaxAddToCart(" ", pid, pbrand.replace(' & ', ' myAND '), productName.replace(' & ', ' myAND ').replace('\"', ''), PriceWithVAT, CurrencySymbol, $("#quantityInput_" + pid).val(), true, "&cartcmd=add&productid=" + pid + "&quantity=");
1003 }
1004 </script>
1005 @using DWAPAC.PLC.Services
1006 @{
1007 string path = "/Admin/Public/Getimage.ashx?width=300&&format=webp&image=";
1008 string imgpath = "/Files/Images/Ecom/Products/";
1009 var birthday = false;
1010 bool showBirthdayPrice = false;
1011 bool userHasVIPCard = false;
1012 bool userHasValidVipCard = false;
1013 DateTime expDate = new DateTime();
1014 DateTime today = DateTime.Now;
1015 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
1016 {
1017 int i = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID"));
1018 Dynamicweb.Security.UserManagement.User u = Dynamicweb.Security.UserManagement.User.GetUserByID(i);
10191020 foreach (CustomFieldValue val in u.CustomFieldValues)
1021 {
1022 CustomField field = val.CustomField;
1023 string fieldName = field.Name;
10241025 if (fieldName == "DOB")
1026 {
1027 DateTime bDay = new DateTime();
1028 if (val.Value != null)
1029 {
1030 bDay = Dynamicweb.Core.Converter.ToDateTime(val.Value);
1031 if (bDay.Month == today.Month)
1032 {
1033 birthday = true;
1034 }
1035 }
1036 }
1037 if (fieldName == "ExpryDate")
1038 {
1039 expDate = Dynamicweb.Core.Converter.ToDateTime(val.Value);
1040 }
1041 switch (fieldName.ToUpper())
1042 {
1043 case "VIP CARD NO":
1044 userHasVIPCard = !string.IsNullOrEmpty((val.Value).ToString());
1045 break;
1046 case "EXPRYDATE":
1047 userHasValidVipCard = expDate.Date >= today.Date;
1048 break;
1049 default:
1050 break;
1051 }
1052 }
1053 }
1054 showBirthdayPrice = birthday && userHasVIPCard && userHasValidVipCard;
1055 string firstCategory = GetString("Ecom:Product:Field.FirstCategory");
1056 string secondCategory = GetString("Ecom:Product:Field.SecondCategory");
1057 string thirdCategory = GetString("Ecom:Product:Field.ThirdCategory");
1058 string pid = GetString("Ecom:Product.ID");
10591060 string Image = GetString("Ecom:Product.ImageMedium.Default.Clean");
1061 string imgpathjpg = imgpath + pid + ".jpg";
1062 string imgpathpng = imgpath + pid + ".png";
1063 var absolutePathsjpg = System.Web.HttpContext.Current.Server.MapPath("~/" + imgpathjpg);
1064 var absolutePathpng = System.Web.HttpContext.Current.Server.MapPath("~/" + imgpathpng);
1065 if (System.IO.File.Exists(absolutePathsjpg))
1066 {
1067 Image = imgpathjpg;
1068 }
1069 else if (System.IO.File.Exists(absolutePathpng))
1070 {
1071 Image = imgpathpng;
1072 }
10731074 var ProdImgLargePath = "/Files/Images/Ecom/Products/Large/";
1075 string ProdImgLarge = GetString("Ecom:Product.ImageLarge.Default.Clean");
1076 ProdImgLargePath = ProdImgLargePath + pid + ".jpg";
1077 var absolutePathjpg = System.Web.HttpContext.Current.Server.MapPath("~/" + ProdImgLargePath);
1078 if (System.IO.File.Exists(absolutePathjpg))
1079 {
1080 ProdImgLarge = ProdImgLargePath;
1081 }
10821083 string ProdName = GetString("Ecom:Product.Name");
1084 string ProdBarCode = GetString("Ecom:Product:Field.ProductBarCode");
1085 string pathproduct = "/Files/Images/plc";
1086 string productNumber = GetString("Ecom:Product.Number");
1087 string pageID = GetString("Ecom:Product:Page.ID");
1088 string skuCode = GetString("Ecom:Product:Field.SKUCode");
1089 string productSize = GetString("Ecom:Product:Field.Size");
1090 string productFlavour = GetString("Ecom:Product:Field.Flavour");
1091 string productColor = GetString("Ecom:Product:Field.Color");
10921093 bool hasSize = !string.IsNullOrEmpty(GetString("Ecom:Product:Field.Size"));
1094 bool hasFlavour = !string.IsNullOrEmpty(GetString("Ecom:Product:Field.Flavour"));
1095 bool hasColor = !string.IsNullOrEmpty(GetString("Ecom:Product:Field.Color"));
1096 int hasVariantCount = 0;
1097 hasVariantCount += hasSize ? 1 : 0;
1098 hasVariantCount += hasFlavour ? 1 : 0;
1099 hasVariantCount += hasColor ? 1 : 0;
11001101 string ProdStock = GetString("Ecom:Product.Stock");
1102 string ProdRating = GetString("Comments.Rating.Rounded2");
1103 string ProdLongDesc = GetString("Ecom:LongDescription");
1104 string ProdBrand = GetString("Ecom:Product:Field.ProductBrand");
1105 string ProdBrandEncode = System.Web.HttpUtility.UrlEncode(GetString("Ecom:Product:Field.ProductBrand"));
1106 string ProdInfo = GetString("Ecom:Product:Field.ProductInfo");
1107 string ProdActualPrice = GetString("Ecom:Product.Price");
1108 string ProdAvilableAmount = GetString("Ecom:Product.AvilableAmount");
1109 string ProdDiscount = GetString("Ecom:Product.Discount.Price");
1110 string ProdReview = GetString("Comments.TotalCount");
1111 var ProdSMemberPrice = GetDouble("Ecom:Product:Field.ProductSMemberPrice");
1112 var ProdBDPrice = GetDouble("Ecom:Product:Field.ProductSBirthdayPrice");
1113 string ProdSCost = GetString("Ecom:Product:Field.ProductSCodt");
1114 string CurrencyCode = GetString("Ecom:Product.Price.Currency.Code");
1115 string ProdPubBrand = GetString("Ecom:Product:Field.PublicBrand");
1116 string ProductVideoUrl = GetString("Ecom:Product:Field.Product_Video_Url");
1117 var productDetails = GetString("Ecom:Product:Field.ProductInfo");
1118 bool ProdRepackitems = GetBoolean("Ecom:Product:Field.RepackedItems");
1119 double productWeight = GetDouble("Ecom:Product.Weight");
1120 string repackProductId = "";
1121 double repackPrice = 0.00;
1122 var promoItems = "";
1123 var promoDescription = "";
1124 var internetPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSInternetPrice")) * 1000 / 5) / 200;
1125 var price = 9.95;
11261127 if (price == GetDouble("Ecom:Product:Field.ProductSInternetPrice"))
1128 {
1129 internetPrice = GetDouble("Ecom:Product:Field.ProductSInternetPrice");
1130 }
11311132 var sellingPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSPrice")) * 1000 / 5) / 200;
1133 Boolean inventoryDiscount = GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag");
1134 var discountPercentage = GetDouble("Ecom:Product:Field.ProductInventoryDiscount");
1135 var birthdayPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSBirthdayPrice")) * 1000 / 5) / 200;
1136 var memberPrice = Math.Floor((GetDouble("Ecom:Product:Field.ProductSMemberPrice")) * 1000 / 5) / 200;
1137 var promotion = 0.00;
1138 var discountType = "";
1139 foreach (LoopItem item in GetLoop("ProductDiscounts"))
1140 {
1141 if (item.GetString("Ecom:Product.Discount.Type") == "PERCENT")
1142 {
1143 discountType = "PERCENT";
1144 promotion = item.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted");
1145 }
1146 else
1147 {
1148 discountType = "AMOUNT";
1149 promotion = item.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted");
1150 }
1151 }
11521153 var storeLocationId = WebServices.getProductLocationServiceResponse(pid);
11541155 List<string> storeNameList = new List<string>();
1156 Dictionary<string, string> storeAddress1List = new Dictionary<string, string>();
1157 Dictionary<string, string> storeAddress2List = new Dictionary<string, string>();
1158 Dictionary<string, string> storePhoneNumberList = new Dictionary<string, string>();
1159 var storeLocationList = "0";
11601161 if (!string.IsNullOrWhiteSpace(storeLocationId))
1162 {
1163 var status = storeLocationId.Split(';')[0].Split('=')[1];
1164 if (status == "200")
1165 {
1166 storeLocationList = storeLocationId.Split(new string[] { "GetProductLocationResult=" }, StringSplitOptions.None)[1];
1167 storeLocationList = storeLocationList.Substring(1);
1168 storeLocationList = storeLocationList.Remove(storeLocationList.Length - 1).Replace("\"", "");
1169 }
1170 }
11711172 if (storeLocationList != "0")
1173 {
1174 var storeLocationNoList = storeLocationList.Split(',').Distinct().ToList();
11751176 foreach (var storeNo in storeLocationNoList)
1177 {
1178 var sqlString = "Select * from PLCStoreLocations where Storeid='" + storeNo + "'";
1179 using (System.Data.IDataReader myReader2 = Dynamicweb.Data.Database.CreateDataReader(sqlString))
1180 {
1181 while (myReader2.Read())
1182 {
1183 if (storeAddress1List.ContainsKey(myReader2["WebName"].ToString()) != true)
1184 {
1185 storeNameList.Add(myReader2["WebName"].ToString());
1186 storeAddress1List.Add(myReader2["WebName"].ToString(), myReader2["StoreAdd1"].ToString());
1187 storeAddress2List.Add(myReader2["WebName"].ToString(), myReader2["StoreAdd2"].ToString());
1188 storePhoneNumberList.Add(myReader2["WebName"].ToString(), myReader2["StoreTel"].ToString());
1189 }
11901191 }
1192 }
1193 }
11941195 storeNameList = storeNameList.OrderBy(q => q).ToList();
1196 }
1197 @*//Start of variant selection*@
11981199 string variantSelector = "";
12001201 if (!string.IsNullOrEmpty(productSize))
1202 {
1203 variantSelector = "size";
1204 }
1205 if (!string.IsNullOrEmpty(productColor))
1206 {
1207 variantSelector = "color";
1208 }
1209 if (!string.IsNullOrEmpty(productFlavour))
1210 {
1211 variantSelector = "flavour";
1212 }
1213 if (!string.IsNullOrEmpty(productSize) && !string.IsNullOrEmpty(productFlavour))
1214 {
1215 variantSelector = "flavour";
1216 }
1217 else if (!string.IsNullOrEmpty(productSize) && !string.IsNullOrEmpty(productColor))
1218 {
1219 variantSelector = "color";
1220 }
1221 else if (string.IsNullOrEmpty(productColor) && string.IsNullOrEmpty(productFlavour))
1222 {
1223 variantSelector = "size";
1224 }
12251226 List<string> sizeList = new List<string>();
1227 List<string> flavourList = new List<string>();
1228 List<string> colorList = new List<string>();
12291230 if (variantSelector == "color")
1231 {
1232 String SQL = "SELECT DISTINCT(Size) FROM EcomProducts WHERE SKUCodes IN (SELECT SkuCodes FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size IS NOT NULL AND ProductActive = 1";
1233 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL))
1234 {
1235 while (myReader.Read())
1236 {
1237 string size = myReader["Size"].ToString();
1238 sizeList.Add(size);
1239 }
1240 }
1241 String SQL2 = "SELECT DISTINCT(Color) FROM EcomProducts WHERE SKUCodes = (SELECT DISTINCT(SkuCodes) FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size='" + productSize + "' AND ProductActive = 1";
1242 using (System.Data.IDataReader myReader2 = Dynamicweb.Data.Database.CreateDataReader(SQL2))
1243 {
1244 while (myReader2.Read())
1245 {
1246 string color1 = myReader2["Color"].ToString();
1247 colorList.Add(color1);
1248 }
1249 }
1250 }
1251 else if (variantSelector == "flavour")
1252 {
1253 String SQL = "SELECT DISTINCT(Size) FROM EcomProducts WHERE SKUCodes IN (SELECT SkuCodes FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size IS NOT NULL AND ProductActive = 1";
1254 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL))
1255 {
1256 while (myReader.Read())
1257 {
1258 string size = myReader["Size"].ToString();
1259 sizeList.Add(size);
1260 }
1261 }
12621263 String SQL2 = "SELECT DISTINCT(Flavor) FROM EcomProducts WHERE SKUCodes = (SELECT DISTINCT(SkuCodes) FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND Size='" + productSize + "' AND ProductActive = 1";
1264 using (System.Data.IDataReader myReader2 = Dynamicweb.Data.Database.CreateDataReader(SQL2))
1265 {
1266 while (myReader2.Read())
1267 {
1268 string flavour1 = myReader2["flavor"].ToString();
1269 flavourList.Add(flavour1);
1270 }
1271 }
1272 }
1273 else if (variantSelector == "size")
1274 {
1275 String SQL = "SELECT DISTINCT(Size) FROM EcomProducts WHERE SKUCodes IN (SELECT SkuCodes FROM EcomProducts WHERE ProductId='" + pid + "'AND ProductlanguageId='LANG2') AND ProductActive = 1 AND Size IS NOT NULL AND ProductActive = 1";
1276 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL))
1277 {
1278 while (myReader.Read())
1279 {
1280 string size = myReader["Size"].ToString();
1281 sizeList.Add(size);
1282 }
1283 }
1284 }
1285 @*//End of Variant*@
12861287 @*//Start of repack*@
1288 if (ProdRepackitems)
1289 {
1290 if (productWeight == 0)
1291 {
1292 String SQL = "SELECT FieldValueProductId FROM EcomProductCategoryFieldValue WHERE FieldValueFieldId='Is_Default'";
1293 using (System.Data.IDataReader myReader = Dynamicweb.Data.Database.CreateDataReader(SQL))
1294 {
1295 while (myReader.Read())
1296 {
1297 repackProductId = myReader["FieldValueProductId"].ToString();
1298 }
1299 }
1300 }
1301 else
1302 {
1303 List<string> WeightList = new List<string>();
1304 List<string> RepackProductIdList = new List<string>();
1305 String SQL1 = "SELECT * FROM EcomProductCategoryFieldValue WHERE FieldValueFieldCategoryId='Repack' AND FieldValueFieldId='From_Weight' OR FieldValueFieldId='To_Weight' ";
1306 using (System.Data.IDataReader myReader1 = Dynamicweb.Data.Database.CreateDataReader(SQL1))
1307 {
1308 while (myReader1.Read())
1309 {
1310 WeightList.Add(myReader1["FieldValueValue"].ToString());
1311 RepackProductIdList.Add(myReader1["FieldValueProductId"].ToString());
1312 }
1313 }
1314 for (int i = 0; i < WeightList.Count; i++)
1315 {
1316 if (productWeight > Double.Parse(WeightList[i]))
1317 {
1318 if (productWeight <= Double.Parse(WeightList[i + 1]))
1319 {
1320 repackProductId = RepackProductIdList[i + 1].ToString();
1321 }
1322 }
1323 }
1324 }
13251326 string SQL4 = "SELECT ProductSInternetPrice FROM EcomProducts WHERE ProductId='" + repackProductId + "'";
1327 using (System.Data.IDataReader myReader4 = Dynamicweb.Data.Database.CreateDataReader(SQL4))
1328 {
1329 while (myReader4.Read())
1330 {
1331 repackPrice = Double.Parse(myReader4["ProductSInternetPrice"].ToString());
1332 }
1333 }
1334 }
1335 string brandUrl = "";
1336 string filePath = System.Web.HttpContext.Current.Server.MapPath("/Files/Files/Algolia/AlgoliaBrandUrls.json");
1337 if (System.IO.File.Exists(filePath))
1338 {
1339 string brandAndUrlMaps = System.IO.File.ReadAllText(filePath);
1340 dynamic brandAndUrlMapsJson = Newtonsoft.Json.JsonConvert.DeserializeObject(brandAndUrlMaps);
1341 foreach (dynamic brandAndUrlMap in brandAndUrlMapsJson)
1342 {
1343 if(brandAndUrlMap.BrandName.ToString().ToLower() == ProdBrand.ToLower()){
1344 brandUrl = brandAndUrlMap.Url.ToString();
1345 }
1346 }
1347 }
1348 }
13491350 <script>
1351 function setCookie(cname, cvalue, exdays) {
1352 var d = new Date();
1353 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
1354 var expires = "expires=" + d.toUTCString();
1355 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
1356 }
1357 function getCookie(cname) {
1358 var name = cname + "=";
1359 var ca = document.cookie.split(';');
1360 for (var i = 0; i < ca.length; i++) {
1361 var c = ca[i];
1362 while (c.charAt(0) == ' ') {
1363 c = c.substring(1);
1364 }
1365 if (c.indexOf(name) == 0) {
1366 return c.substring(name.length, c.length);
1367 }
1368 }
1369 return "";
1370 }
13711372 fbq('track', 'ViewContent', { content_ids: "@productNumber", content_type: "Product", value: "@string.Format("{0:0.00}", internetPrice)", content_name: "@ProdName", currency: "@CurrencyCode", content_category: "@firstCategory, @secondCategory, @thirdCategory" });
1373 </script>
13741375 @{
1376 string title = ProdName.ToLower();
1377 title = char.ToUpper(title[0]) + title.Substring(1);
1378 string descript = @System.Text.Encoding.UTF8.GetString(@System.Text.Encoding.Default.GetBytes(@System.Text.RegularExpressions.Regex.Replace(@GetString("Ecom:Product:Field.ProductInfo"), "<.*?>", String.Empty).Replace(" ", String.Empty)));
1379 }
13801381 <div hidden>hasSize: @hasSize | hasFlavour: @hasFlavour | hasColor: @hasColor | hasVariantCount: @hasVariantCount</div>
13821383 <meta property="og:title" content="@title">
1384 <meta property="og:description" content="@descript">
1385 <meta property="og:url" content="https://www.petloverscentre.com/@GetString("Ecom:Product.LinkGroup.Clean")">
1386 <meta property="og:image" content="@path@Image">
1387 <meta property="product:brand" content="@ProdBrand">
1388 <meta property="product:availability" content="in stock">
1389 <meta property="product:condition" content="new">
1390 <meta property="product:price:amount" content="@string.Format("{0:0.00}", sellingPrice)">
1391 <meta property="product:price:currency" content="SGD">
1392 <meta property="product:retailer_item_id" content="@pid">
1393 <meta property="product:category" content="@GetString("Ecom:Product:Field.GoogleCategoryId.Value.Clean")">
13941395 <div id="get_@pid">
1396 <div id="dvLoading" style="
1397 width: 100%;
1398 height: 100%;
1399 background: rgba(0,0,0,0.2);
1400 background-image:url('/Files/Images/plc/images/bx_loader.gif');
1401 background-repeat:no-repeat;
1402 background-position:center;
1403 z-index:10000000;
1404 position: fixed;
1405 top: 0px;
1406 left: 0px;
1407 display: none;">
1408 </div>
1409 <div align="center" class="col-1-3" style="margin-top:15px;">
1410 <form id="@pid" style="display:none" method="post">
14111412 <input type="" name='ProductLoopCounter@(GetString("Ecom:Product.LoopCounter"))' value='@GetString("Ecom:Product.LoopCounter")' />
1413 <input type="" name='ProductID@(GetString("Ecom:Product.LoopCounter"))' value='@GetString("Ecom:Product.ID")' />
1414 <input type="number" name="Quantity@(GetString("Ecom:Product.LoopCounter"))" id="productFormQuantity" value="1" />
14151416 <input type="" name='ProductLoopCounter2' value='2' />
1417 <input type="" name='ProductID2' id="repackProductId" value='@repackProductId' />
1418 <input type="number" id="repackFormQuantity" name="Quantity2" value="1" />
1419 <input name="EcomOrderLineFieldInput_ParentProductId2" value="@GetString("Ecom:Product.ID")" />
1420 <button id="multiFormSubmit" type="submit" name="CartCmd" value="AddMulti" title="add to cart Repack">Add all</button>
1421 </form>
1422 <div class="product-box">
1423 <div class="prod-img">
1424 @if (promotion != 0)
1425 {
1426 if (discountType == "PERCENT")
1427 {
1428 @*<div class="ribbon-P"><span>Pro @promotion% Off</span></div>*@
1429 }
1430 else
1431 {
1432 @*<div class="ribbon-P"><span>Pro $@promotion Off</span></div>*@
1433 }
1434 }
1435 else
1436 {
1437 @*//add ERP discount ribbon*@
1438 if (inventoryDiscount)
1439 {
1440 if (discountPercentage != 0)
1441 {
1442 @*<div class="ribbon-D"><span>@discountPercentage% Off</span></div>*@
1443 }
1444 }
1445 }
1446 @*//add ERP discount ribbon*@
1447 @if (inventoryDiscount && discountPercentage != 0)
1448 {
1449 <div class="ribbon-D"><span>@discountPercentage% Off</span></div>
1450 }
1451 </div>
1452 <img id="zoom_product" src='https://@System.Web.HttpContext.Current.Request.Url.Host@path@Image' data-zoom-image="https://@System.Web.HttpContext.Current.Request.Url.Host/Admin/Public/Getimage.ashx?width=600&format=webp&image=@ProdImgLarge" alt="@pid" />
1453 </div>
1454 <p align="center" class="smallText">@Translate("Rollover image to view larger image", "Rollover image to view larger image")</p>
1455 @*<div class="clearfix spaceheight"><p> </p></div>*@
14561457 @if (storeNameList.Count != 0)
1458 {
1459 <ul id="ImmediateAvailabilityAtDesktop" class="sidenavi">
1460 <li class="current curSub">
1461 <a style="background: #e6e6e6;text-align: left;">@Translate("Immediate Availability At", "Immediate Availability At")</a>
1462 @if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value")) {
1463 <div style="color:#ff8c00; text-align: left;font-weight: 600; margin: 10px;">Please call to reserve.</div>
1464 }
1465 <ul id="leftnavigation" class="sidenavi-store shoplist">
1466 @foreach (var string1 in storeNameList)
1467 {
1468 <li class="text-left">
1469 <a href="#@string1.Replace(" ", "_").Replace(".", "")" data-toggle="collapse">@string1</a>
1470 <div id="@string1.Replace(" ", "_").Replace(".", "")" class="collapse" style="padding-left: 35px;">
1471 <p><i class="fa fa-map-marker"></i> @storeAddress1List[string1] @Translate(",", ",") @storeAddress2List[string1] </p>
1472 <p><i class="fa fa-phone"></i> @storePhoneNumberList[string1]</p>
1473 </div>
1474 </li>
1475 }
1476 </ul>
1477 </li>
1478 </ul>
1479 }
1480 else if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
1481 {
1482 <ul id="ImmediateAvailabilityAt_Onlinebtn" class="sidenavi">
1483 <li class="current curSub">
1484 <a style="background: #e6e6e6;text-align: center; padding:0;">@Translate("Currently Unavailable in Stores", "Currently Unavailable in Stores")</a>
1485 </li>
1486 </ul>
1487 }
1488 </div>
1489 @foreach (var promoItem in GetLoop("AllDiscounts"))
1490 {
1491 promoItems += promoItem.GetString("Ecom:AllDiscounts.Discount.Name") + "<br>";
1492 }
1493 <div class="col-2-3">
1494 <div class="prod-details-top col-1-1">
1495 <p class="small-name" style="font-size: large;"><a href="@brandUrl" class="prodBrand">@ProdBrand</a></p>
1496 <h1>@ProdName </h1>
1497 @if (promoName != "")
1498 {
1499 <div style="color:#ff8c00;font-weight: 600;font-size: medium;">@promoName</div>
1500 @*<!--<div style="color:#ff8c00;font-weight: 600;font-size: small;">@promoD</div>-->*@
1501 }
1502 <div class="">
1503 @*<div style="padding-right:0px !important;color : #c8c8c8;" class="item col-md-3">@Translate("SKU :","SKU :") @productNumber</div>*@
1504 <div style="color : #c8c8c8;">@Translate("SKU :", "SKU :") @productNumber</div>
1505 @{
1506 var getProductMultiStatusAdvServiceResponse = WebServices.getProductMultiStatusAdvServiceResponse("{[" + pid + "]}");
1507 var getProductMultiStatusAdvServiceResponseSplit = getProductMultiStatusAdvServiceResponse.Split(';');
1508 string productStockStatus = getProductMultiStatusAdvServiceResponseSplit[2].Split('{')[1].Replace("}", "").Split(':')[1].Replace("]", "");
15091510 string tipsoMessage = "no Message Available!";
1511 switch (productStockStatus.ToUpper())
1512 {
1513 case "AVAILABLE":
1514 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";
1515 break;
1516 case "SPECIAL ORDER":
1517 tipsoMessage = "This item is sourced upon request. Payment is pre-authorized and only charged upon fulfillment. Delivery starts from 7 business days, subject to availability.";
1518 break;
1519 case "IN STOCK":
1520 tipsoMessage = "Only available in-stores. Please allow 5 working days for transfer and delivery, or order via GrabMart/FoodPanda for faster delivery.";
1521 break;
1522 default:
1523 tipsoMessage = "no Message Available!";
1524 break;
1525 }
1526 tipsoMessage = tipsoMessage.Replace("\'", "'");
1527 }
1528 <div>
1529 <br />
1530 @if (@productStockStatus.Contains("AVAILABLE"))
1531 {
1532 <ul class="info">
1533 <li>
1534 *@productStockStatus
1535 <span class="top tipso_style" data-tipso='@tipsoMessage' style="vertical-align: text-bottom;">
1536 <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;">
1537 </span>
1538 </li>
1539 </ul>
1540 }
1541 else
1542 {
1543 <ul class="info">
1544 <li>*@productStockStatus</li>
1545 <li style="padding-top: 5px;">@tipsoMessage</li>
1546 </ul>
1547 }
1548 </div>
1549 <div class="prod-star col-md-4">
1550 <p style="margin:-7px 0px;padding:0px;float:left;display:none;" class="rating">
1551 <input type="radio" id="star5" name="rating" value="5" /><label class="full" for="=" title="Awesome - 5 stars"></label>
1552 <input type="radio" id="star4half" name="rating" value="4.5" /><label class="half" for="=" title="Pretty good - 4.5 stars"></label>
1553 <input type="radio" id="star4" name="rating" value="4" /><label class="full" for="=" title="Pretty good - 4 stars"></label>
1554 <input type="radio" id="star3half" name="rating" value="3.5" /><label class="half" for="=" title="Meh - 3.5 stars"></label>
1555 <input type="radio" id="star3" name="rating" value="3" /><label class="full" for="=" title="Meh - 3 stars"></label>
1556 <input type="radio" id="star2half" name="rating" value="2.5" /><label class="half" for="=" title="Kinda bad - 2.5 stars"></label>
1557 <input type="radio" id="star2" name="rating" value="2" /><label class="full" for="=" title="Kinda bad - 2 stars"></label>
1558 <input type="radio" id="star1half" name="rating" value="1.5" /><label class="half" for="=" title="Meh - 1.5 stars"></label>
1559 <input type="radio" id="star1" name="rating" value="1" /><label class="full" for="=" title="Sucks big time - 1 star"></label>
1560 <input type="radio" id="starhalf" name="rating" value="0.5" /><label class="half" for="=" title="Sucks big time - 0.5 stars"></label>
1561 </p>
1562 </div>
1563 <script>
1564 $(document).ready(function () {
1565 $("#toggleReview").click(function () {
1566 $("#reviewButton").click();
1567 $('body, html').animate({
1568 scrollTop: $("#cmtContainer").offset().top
1569 }, 1000);
1570 });
1571 $("#toggleWrite").click(function () {
1572 $("#reviewButton").click();
1573 $('body, html').animate({
1574 scrollTop: $(".formContact").offset().top
1575 }, 1000);
1576 });
15771578 var ratingStars = document.getElementsByName('rating');
15791580 for (var i = 0; i < ratingStars.length; i++) {
15811582 if (ratingStars[i].value == "@ProdRating") {
15831584 ratingStars[i].click();
1585 }
1586 }
15871588 });
1589 </script>
15901591 @*<!--<div class="clearfix upper-review"></div>
1592 <div class="review col-md-5">
1593 <a id="toggleReview" href="javascript:void(0)">@Translate("Read reviews","Read reviews")</a>
1594 (@ProdReview)|
1595 <a id="toggleWrite" href="javascript:void(0)">Write review</a>
1596 </div> -->*@
1597 </div>
1598 </div>
15991600 <hr class="grey">
16011602 <div class="prod-details-left col-5-12">
1603 <p class="ZYM" style="display:none;">@internetPrice</p>
16041605 @if (inventoryDiscount)
1606 {
1607 if (sellingPrice != internetPrice)
1608 {
1609 <div class="prod-price">
1610 <p class="op">
[email protected]("{0:0.00}", sellingPrice)</p>
1611 <p class="np">
[email protected]("{0:0.00}", internetPrice)</p>
1612 <p class="save-price">Save
[email protected]("{0:0.00}", sellingPrice - internetPrice)</p>
1613 </div>
1614 }
1615 else if (sellingPrice == internetPrice)
1616 {
1617 <div class="prod-price">
1618 <p class="np">
[email protected]("{0:0.00}", sellingPrice)</p>
1619 </div>
1620 }
1621 }
1622 else
1623 {
1624 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
1625 {
1626 <div class="prod-price">
1627 <p class="np">
[email protected]("{0:0.00}", sellingPrice)</p>
1628 </div>
1629 <div class="member-price">
1630 @if (memberPrice > 0)
1631 {
1632 <div id="proId" style="display:none"></div>
1633 <div class="title" id="memberId">
1634 VIP Member
1635 @*<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.">*@
1636 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price">
1637 <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="">
1638 </span>
1639 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
1640 </div>
1641 <div class="title" id="birthdayId">
1642 VIP Birthday
1643 @*<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.">*@
1644 <span class="top tipso_style" data-tipso="Become a VIP member for only S$7 and log in to your online account to enjoy this price on your birthday month">
1645 <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">
1646 </span>
1647 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
1648 </div>
1649 }
1650 @if (birthdayPrice > 0 && showBirthdayPrice)
1651 {
1652 <div class="title">
1653 VIP Birthday
1654 @*<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.">*@
1655 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month">
1656 <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">
1657 </span>
1658 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
1659 </div>
1660 }
1661 </div>
1662 }
1663 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
1664 {
1665 <div class="prod-price">
1666 <p class="np">
[email protected]("{0:0.00}", internetPrice)</p>
1667 </div>
1668 if (userHasVIPCard)
1669 {
1670 if (userHasValidVipCard)
1671 {
1672 <div id="proId" style="display:none"></div>
1673 <div class="member-price">
1674 <div class="title" id="memberId">
1675 VIP Member
1676 @*<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.">*@
1677 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price">
1678 <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="">
1679 </span>
1680 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
1681 </div>
1682 <div class="title" id="birthdayId">
1683 VIP Birthday
1684 @*<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.">*@
1685 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month">
1686 <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">
1687 </span>
1688 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
1689 </div>
1690 </div>
1691 }
16921693 if (!birthday)
1694 {
1695 if (!userHasValidVipCard)
1696 {
1697 <div class="member-price">
1698 @if (memberPrice > 0)
1699 {
1700 <div class="title" id="memberId">
1701 VIP Member
1702 @*<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.">*@
1703 <span class="top tipso_style" data-tipso=" As a VIP member, you get to enjoy this price">
1704 <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">
1705 </span>
1706 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
1707 </div>
1708 }
1709 </div>
1710 }
1711 }
1712 else if (birthday)
1713 {
1714 if (!userHasValidVipCard)
1715 {
1716 <div class="member-price">
1717 <div class="title" id="birthdayId">
1718 VIP Birthday
1719 @*<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.">*@
1720 <span class="top tipso_style" data-tipso="As a VIP member, you get to enjoy this price on your birthday month">
1721 <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">
1722 </span>
1723 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
1724 </div>
1725 </div>
1726 }
1727 }
1728 }
1729 else
1730 {
1731 <div id="proId" style="display:none"></div>
1732 <div class="member-price">
1733 <div class="title" id="memberId">
1734 VIP Member
1735 @*<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.">*@
1736 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price">
1737 <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="">
1738 </span>
1739 <p class="price">
[email protected]("{0:0.00}", memberPrice)</p>
1740 </div>
1741 <div class="title" id="birthdayId">
1742 VIP Birthday
1743 @*<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.">*@
1744 <span class="top tipso_style" data-tipso="Become a VIP member for only $7 and enjoy this price on your birthday month">
1745 <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">
1746 </span>
1747 <p class="price">
[email protected]("{0:0.00}", birthdayPrice)</p>
1748 </div>
1749 </div>
1750 @*<div class="prod-price">
1751 <p class="op">
[email protected]("{0:0.00}", internetPrice)</p>
1752 </div>
1753 *@
1754 }
1755 }
1756 }
1757 </div>
1758 @if (birthday)
1759 {
1760 <div class="info-box" style="background:none;">
1761 @*<h3>That's because it's your birthday this month!</h3>*@
1762 </div>
1763 }
1764 @*
1765 <p><span class="bold">Spend @CurrencyCode 100, Save @CurrencyCode 20</span></p>
1766 <p><span class="bold">@Translate("Free delivery on all Online Orders","Free delivery on all Online Orders")</span></p>
1767 *@
1768 </div>
17691770 @if (GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
1771 {
1772 showHide = "hidden";
1773 <div class="prod-details-right pull-right col-8-12">
1774 <div style="padding: 10px;">
1775 <p style="background-color: darkgray; padding: 2px 30px; width: fit-content; color: #ffffff;">Available in Store Only</p>
1776 <strong style="font-size: 16px; color: #952203;">
1777 <label id="ctl00_ContentPlaceHolder1_ASPxLabel92">Remarks :</label>
1778 </strong>
1779 <div style="font-size: 12px; margin-left: -25px;">
1780 <ul>
1781 <li>
1782 Clearance Sale items are limited and valid for in-store purchase only, while stocks
1783 last.
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="https://customercare.petloverscentre.com/hc/en-us/articles/21905343581465-Reduced-to-Clear-R2C-Sales-and-Terms">
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>
18011802 }
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 }
19631964 @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>
19761977 <br><br><br>
1978 }
19791980 <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>*@
19861987 <br><br><hr><br>
19881989 @*<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 }
19971998 @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")
20302031 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>
20392040 <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;
20752076 $("#addToListButton").click(function () {
2077 var href = document.getElementById("wishlistLink").href;
2078 AddToFavorites(href);
2079 });
20802081 $("#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 });
20902091 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>
21102111 <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 <li class="mobile_tab"><a data-toggle='tab' class="resources-tab" href="#resources" style="width:120px; @resourceImagesListShow">Resources</a></li>
2122 </ul>
21232124 <div id="tabContainer" class="resp-tabs-container">
2125 <div id="details" class="tab-pane fade active in" id="details">
2126 <p style="margin-top:25px;">@productDetails</p>
2127 </div>
21282129 <div id="resources" class="tab-pane fade" id="resources">
2130 @if (resourceImagesList.Count != 0)
2131 {
2132 foreach (var image in resourceImagesList)
2133 {
2134 <p style="margin-top:15px;">
2135 <img src="@image" alt="Resource Image"/>
2136 </p>
2137 }
2138 }
2139 </div>
21402141 @if (ProductVideoUrl != "")
2142 {
2143 <div id="videoUrl" class="tab-pane fade" id="videoUrl" style="text-align: center; padding: 20px;">
2144 @ProductVideoUrl
2145 </div>
2146 }
2147 </div>
2148 <div id="cmtContainer" class="resp-tabs-container">
2149 <div id="review" class="tab-pane fade" id="reviews">
2150 <a name="Comments"></a>
2151 @if(Dynamicweb.Core.Converter.ToBoolean(GetValue("Ecom:Product.Rating"))){<text>
2152 <h3>Reviews</h3>
2153 @foreach (LoopItem i in GetLoop("Comments")){
21542155 if(Dynamicweb.Core.Converter.ToBoolean(i.GetValue("Website"))){<text>
2156 <a href="@i.GetValue("Website")">@i.GetValue("Name")</a>
2157 </text>}
2158 if(!Dynamicweb.Core.Converter.ToBoolean(i.GetValue("Website"))){<text>
2159 @i.GetValue("Name")
2160 </text>}
21612162 <span style="color:#c5c5c5;">@i.GetValue("CreatedDate.LongDate") @i.GetValue("EditedDate.ShortTime")</span><br />
2163 var rating = i.GetInteger("Rating");
2164 for(var j=0;j<rating;j++){
2165 <label class="starSelected"></label>
2166 }
2167 if(rating < 5){
2168 for(var k = 0;k<5-rating;k++){
2169 <label class="starUnselected"></label>
2170 }
2171 }
2172 <br />
2173 @i.GetValue("Text")
2174 <hr />
2175 }
2176 </text>}
21772178 <script type="text/javascript">
21792180 function validateEmail(email) {
2181 var re = (/^[^-\0-9][+a-zA-Z0-9._-]+@@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i);
2182 return re.test(email);
2183 }
21842185 function comment_validate() {
2186 var radioChecked = false;
2187 var radioRatings = document.getElementsByName("Comment.Rating");
2188 var validated = false;
218921902191 var loopCounter = 1;
2192 for(var i = 0; i < radioRatings.length;i++){
2193 if(radioRatings[i].checked==true){
2194 radioChecked = true;
21952196 }
2197 }
21982199 if (radioChecked == false) {
2200 //console.log('please rate');
2201 alert("Please rate the product.");
2202 return false;
22032204 }
22052206 if (document.getElementById("Comment.Name").value.length < 1) {
2207 alert("Specify your name.");
2208 document.getElementById("Comment.Name").focus();
2209 return false;
2210 }
22112212 if (document.getElementById("Comment.Text").value.length < 1) {
2213 alert("Specify your comment");
2214 document.getElementById("Comment.Text").focus();
2215 return false;
2216 }
2217 if (document.getElementById("Comment.Email").value.length < 1) {
2218 alert("Please Enter Email");
2219 document.getElementById("Comment.Text").focus();
2220 return false;
2221 }
22222223 if(!validateEmail(document.getElementById('Comment.Email').value))
2224 {
2225 alert("Email is invalid");
2226 return false;
2227 }
222822292230 //document.getElementById("commentform").action = '/Default.aspx?ID=7';
2231 document.getElementById("commentform").action = '@System.Web.HttpContext.Current.Request.Url.PathAndQuery';
22322233 document.getElementById("Comment.Command").value = "create";
2234 return true;
22352236 }
22372238 </script>
2239 <style type="text/css">
22402241 @@media only screen and (max-width: 600px){
2242 #commentform .labelComment{
2243 width: 100% !important;
2244 }
2245 #commentform input[type=text], #commentform select, #commentform option{
2246 width: 100% !important;
2247 }
2248 #commentform textarea{
2249 width: 100% !important;
2250 }
2251 }
22522253 #commentform { margin: 15px 0 0 0; }
2254 #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; }
2255 #commentform .labelComment .bg { position: absolute; top: 0; right: -15px; height: 38px; width: 15px; display: block; }
2256 #commentform input[type=text], #commentform textarea { font:14px/14px Arial, Helvetica, sans-serif; background: #fff; border: none; border: 1px solid #d8d8d8;}
2257 #commentform input[type=text], #commentform select, #commentform option { color:#666; width: 300px; margin: 0 5px 20px 0px; padding: 10px 7px; }
2258 #commentform textarea { color:#666; width: 300px; margin: 0 5px 20px 0px; padding: 5px 7px; }
2259 #commentform input[type=submit] { margin: 15px 0 0 180px; cursor: pointer; }
22602261 </style>
2262 <p> </p>
2263 <div class="dottedBoxGrey form">
2264 <form method="post" action="/Default.aspx?ID=7" id="commentform" onsubmit="return comment_validate()">
2265 <div class="formContact">
2266 <input type="hidden" name="Comment.Command" id="Comment.Command" value="" />
22672268 <input type="hidden" name="Comment.ItemType" value="ecomProduct" />
22692270 <input type="hidden" name="Comment.ItemID" value="@GetValue("Ecom:Product.ID")" />
2271 <input type="hidden" name="Comment.LangID" value="@GetValue("Ecom:Product.LanguageID")" />
2272 <div class="product-detailComment">
22732274 </div>
2275 <label class="labelComment pull-left" for="Comment.Rating">Your rating</label>
2276 <div class="prod-star pull-left">
2277 <p style="" class="ratingSubmit">
2278 <input type="radio" id="star5a" name="Comment.Rating" value="5" /><label class = "full" for="star5a" title="Awesome - 5 stars"></label>
22792280 <input type="radio" id="star4a" name="Comment.Rating" value="4" /><label class = "full" for="star4a" title="Pretty good - 4 stars"></label>
22812282 <input type="radio" id="star3a" name="Comment.Rating" value="3" /><label class = "full" for="star3a" title="Meh - 3 stars"></label>
22832284 <input type="radio" id="star2a" name="Comment.Rating" value="2" /><label class = "full" for="star2a" title="Kinda bad - 2 stars"></label>
22852286 <input type="radio" id="star1a" name="Comment.Rating" value="1" /><label class = "full" for="star1a" title="Sucks big time - 1 star"></label>
2287 </p>
2288 </div>
2289 <div class="clearfix"></div>
2290 <label class="labelComment" for="Comment.Name">Name</label>
2291 <input type="text" name="Comment.Name" id="Comment.Name" value="" /><br />
2292 <label class="labelComment" for="Comment.Email">E-mail</label>
2293 <input type="text" name="Comment.Email" id="Comment.Email" value="" /><br />
2294 <label class="labelComment" for="Comment.Text">Comment</label>
2295 <textarea name="Comment.Text" id="Comment.Text" rows="10" cols="50"></textarea><br />
22962297 <input type="submit" value="Send" />
2298 </div>
2299 </form>
2300 </div>
2301 <p> </p>
2302 </div>
2303 </div>
23042305 <ul id="ImmediateAvailabilityAtMobile" class="sidenavi">
2306 @if (storeNameList.Count != 0)
2307 {
2308 <li class="current curSub">
2309 <a style="background: #e6e6e6;">@Translate("Immediate Availability At", "Immediate Availability At")</a>
2310 @if (!GetBoolean("Ecom:Product:Field.ProductClassic.Value")) {
2311 <div style="color:#ff8c00; text-align: left;font-weight: 600; margin: 10px;">Please call to reserve.</div>
2312 }
2313 <ul id="leftnavigation" class="sidenavi-store shoplist" style="padding-bottom: 30px;">
2314 @foreach (var string1 in storeNameList)
2315 {
2316 <li class="text-left">
2317 <a href="#@string1.Replace(" ", "_").Replace(".", "")" data-toggle="collapse" data-value="#@string1.Replace(" ", "_").Replace(".", "")" onclick="collapseMobile('@string1.Replace(" ", "_").Replace(".", "")')">@string1</a>
2318 <div id="
[email protected](" ", "_").Replace(".", "")" class="collapse" style="padding-left: 35px;">
2319 <p><i class="fa fa-map-marker"></i> @storeAddress1List[string1] @Translate(",", ",") @storeAddress2List[string1] </p>
2320 <p><i class="fa fa-phone"></i> @storePhoneNumberList[string1]</p>
2321 </div>
2322 </li>
23232324 }
2325 </ul>
2326 </li>
2327 }
2328 </ul>
2329 </div>
2330 </div>
2331 </div>
23322333 <div></div>
23342335 <hr style="width:100%">
23362337 <div align="center" class="grid">
2338 @if (GetString("Ecom:Product.RelatedCount") != "0")
2339 {
2340 foreach (LoopItem related in GetLoop("ProductRelatedGroups"))
2341 {
2342 if (related.GetString("Ecom:Product:RelatedGroup.Name") == "Similar Products")
2343 {
2344 if (related.GetLoop("RelatedProducts").Count != 0)
2345 {
2346 <div class="row-bestseller">
2347 <div class="row-bestseller" style="margin:30px 0 70px 0;">
2348 <h1>@Translate("Similar Products", "Similar Products")</h1>
23492350 <ul class="bxslider-bestseller">
2351 @foreach (LoopItem products in related.GetLoop("RelatedProducts"))
2352 {
2353 var relatedRating = products.GetDouble("Ecom:Product.Rating");
2354 var sellingPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSPrice");
2355 var internetPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSInternetPrice");
2356 bool inventoryDiscountRelated = products.GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag");
2357 var discountPercentageRelated = products.GetDouble("Ecom:Product:Field.ProductInventoryDiscount");
2358 var birthdayPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSBirthdayPrice");
2359 var memberPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSMemberPrice");
2360 var disableRelated = products.GetBoolean("Ecom:Product:Field.Disable");
2361 @*// var promotionRelated=products.GetDouble("Ecom:Product.Discount.TotalPercentWithoutVATFormatted");*@
2362 var pidrelated = products.GetString("Ecom:Product.ID");
2363 string GroupLinkRelated = products.GetString("Ecom:Product.LinkGroup.Clean");
2364 var promotionRelated = 0.00;
2365 var discountTypeRelated = "";
2366 foreach (LoopItem item1 in products.GetLoop("ProductDiscounts"))
2367 {
23682369 if (item1.GetString("Ecom:Product.Discount.Type") == "PERCENT")
2370 {
2371 discountTypeRelated = "PERCENT";
2372 promotionRelated = item1.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted");
2373 }
2374 else
2375 {
2376 discountTypeRelated = "AMOUNT";
2377 promotionRelated = item1.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted");
2378 }
2379 }
2380 <li id="get_@pidrelated">
2381 @if (promotionRelated != 0)
2382 {
2383 if (discountTypeRelated == "PERCENT")
2384 {
2385 @*<div class="ribbon-P"><span>Pro @promotionRelated% Off</span></div>*@
2386 }
2387 else
2388 {
2389 @*<div class="ribbon-P"><span>Pro $@promotionRelated Off</span></div>*@
2390 }
2391 }
2392 else
2393 {
2394 @*//add ERP discount ribbon*@
2395 if (inventoryDiscount)
2396 {
2397 if (discountPercentage != 0)
2398 {
2399 @*<div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div>*@
2400 }
2401 }
2402 }
2403 @*//add ERP discount ribbon*@
2404 @if (inventoryDiscount && discountPercentage != 0)
2405 {
2406 <div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div>
2407 }
2408 <a href="@GroupLinkRelated"><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=300&&format=webp&image=@path@Image" alt="@Image" /></a>
2409 @if (inventoryDiscountRelated)
2410 {
2411 if (sellingPriceRelated != internetPriceRelated)
2412 {
2413 <text><p class="prod-promo2">Save @string.Format("{0:0.00}", sellingPriceRelated - internetPriceRelated)</p></text>
2414 }
2415 }
2416 else
2417 {
2418 <text><p class="prod-promo"> </p></text>
2419 }
24202421 <p class="prod-name">@products.GetString("Ecom:Product:Field.PublicBrand")</p>
2422 <p class="prod-name">@products.GetString("Ecom:Product.Name")</p>
2423 <div class="prod-star">
2424 @if (@relatedRating == 0)
2425 {
2426 <label class="starUnselected"></label>
2427 <label class="starUnselected"></label>
2428 <label class="starUnselected"></label>
2429 <label class="starUnselected"></label>
2430 <label class="starUnselected"></label>
2431 }
2432 @for (var i = 1; i < @relatedRating; i++)
2433 {
2434 <label class="starSelected"></label>
2435 }
2436 @if (relatedRating % 1 != 0)
2437 {
2438 <label class="starSelected half"></label>
2439 }
2440 </div>
2441 <div class="prod-priceBox">
2442 @if (inventoryDiscountRelated)
2443 {
2444 if (sellingPriceRelated != internetPriceRelated)
2445 {
2446 <div class="prod-price">
2447 <p class="op">
[email protected]("{0:0.00}", sellingPriceRelated)</p>
2448 <p class="np">
[email protected]("{0:0.00}", internetPriceRelated)</p>
24492450 </div>
2451 <div class="member-price"></div>
2452 }
2453 else if (sellingPriceRelated == internetPriceRelated)
2454 {
2455 <div class="prod-price">
2456 <p class="np">
[email protected]("{0:0.00}", sellingPriceRelated)</p>
2457 </div>
24582459 }
2460 }
2461 @*inventoryDiscount false*@
2462 else
2463 {
2464 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2465 {
2466 <div class="prod-price">
2467 <p class="np">
[email protected]("{0:0.00}", sellingPriceRelated)</p>
2468 </div>
2469 <div class="member-price">
2470 <div class="title">
2471 Member
2472 <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>
2473 <p class="price">
[email protected]("{0:0.00}", memberPriceRelated)</p>
2474 </div>
24752476 <div class="title">
2477 Birthday
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}", birthdayPriceRelated)</p>
2480 </div>
2481 </div>
2482 }
2483 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2484 {
2485 <div class="prod-price">
2486 <p class="np">
[email protected]("{0:0.00}", internetPriceRelated)</p>
2487 </div>
2488 if (!birthday)
2489 {
2490 <div class="member-price">
2491 <div class="title">
2492 Member
2493 <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>
2494 <p class="price">
[email protected]("{0:0.00}", memberPriceRelated)</p>
2495 </div>
2496 </div>
2497 }
2498 else
2499 {
2500 <div class="member-price">
2501 <div class="title">
2502 Birthday
2503 <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>
2504 <p class="price">
[email protected]("{0:0.00}", birthdayPriceRelated)</p>
2505 </div>
2506 </div>
2507 }
2508 }
2509 }
2510 </div>
25112512 @if (products.GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
2513 {
2514 <ul class="info">
2515 <li>*In Store Only</li>
2516 </ul>
2517 }
25182519 @if (!products.GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
2520 {
2521 <div class="btn-addto-cart" style="margin-bottom:5px;">
2522 <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>
2523 </div>
2524 }
2525 </li>
2526 }
2527 </ul>
2528 </div>
2529 </div>
2530 }
2531 }
2532 }
2533 }
2534 @if (GetString("Ecom:Product.RelatedCount") != "0")
2535 {
2536 foreach (LoopItem related in GetLoop("ProductRelatedGroups"))
2537 {
2538 if (related.GetString("Ecom:Product:RelatedGroup.Name") == "Similar Brand")
2539 {
2540 if (related.GetLoop("RelatedProducts").Count != 0)
2541 {
2542 <div class="row-bestseller">
2543 <div class="row-bestseller" style="margin:30px 0 70px 0;">
2544 <h2>@Translate("Similar Brands", "Similar Brands")</h2>
25452546 <ul class="bxslider-bestseller">
2547 @foreach (LoopItem products in related.GetLoop("RelatedProducts"))
2548 {
2549 var relatedRating = products.GetDouble("Ecom:Product.Rating");
2550 var sellingPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSPrice");
2551 var internetPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSInternetPrice");
2552 Boolean inventoryDiscountRelated = products.GetBoolean("Ecom:Product:Field.ProductInventoryDiscountFlag");
2553 var discountPercentageRelated = products.GetDouble("Ecom:Product:Field.ProductInventoryDiscount");
2554 var birthdayPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSBirthdayPrice");
2555 var memberPriceRelated = products.GetDouble("Ecom:Product:Field.ProductSMemberPrice");
2556 var disableRelated = products.GetBoolean("Ecom:Product:Field.Disable");
2557 @*// var promotionRelated=products.GetDouble("Ecom:Product.Discount.TotalPercentWithoutVATFormatted");*@
2558 var pidrelated = products.GetString("Ecom:Product.ID");
2559 string GroupLinkRelated = products.GetString("Ecom:Product.LinkGroup.Clean");
2560 var promotionRelated = 0.00;
2561 var discountTypeRelated = "";
2562 foreach (LoopItem item1 in products.GetLoop("ProductDiscounts"))
2563 {
25642565 if (item1.GetString("Ecom:Product.Discount.Type") == "PERCENT")
2566 {
2567 discountTypeRelated = "PERCENT";
2568 promotionRelated = item1.GetDouble("Ecom:Product.Discount.PercentWithoutVATFormatted");
2569 }
2570 else
2571 {
2572 discountTypeRelated = "AMOUNT";
2573 promotionRelated = item1.GetDouble("Ecom:Product.Discount.AmountWithoutVATFormatted");
2574 }
2575 }
2576 <li id="get_@pidrelated">
2577 @if (promotionRelated != 0)
2578 {
2579 if (discountTypeRelated == "PERCENT")
2580 {
2581 @*<div class="ribbon-P"><span>Pro @promotionRelated% Off</span></div>*@
2582 }
2583 else
2584 {
2585 @*<div class="ribbon-P"><span>Pro $@promotionRelated Off</span></div>*@
2586 }
25872588 }
2589 else
2590 {
2591 @*//add ERP discount ribbon*@
2592 if (inventoryDiscount)
2593 {
2594 if (discountPercentage != 0)
2595 {
2596 @*<div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div>*@
2597 }
2598 }
2599 }
2600 @*//add ERP discount ribbon*@
2601 @if (inventoryDiscount&& discountPercentage != 0)
2602 {
2603 <div class="ribbon-D"><span>Dis @discountPercentage% Off</span></div>
2604 }
2605 <a href="@GroupLinkRelated"><img class="yall_lazy" data-src="/Admin/Public/Getimage.ashx?width=300&format=webp&image=@path@Image" alt="@Image" /></a>
2606 @if (inventoryDiscountRelated)
2607 {
2608 if (sellingPriceRelated != internetPriceRelated)
2609 {
2610 <text><p class="prod-promo2">Save @string.Format("{0:0.00}", sellingPriceRelated - internetPriceRelated)</p></text>
2611 }
2612 }
2613 else
2614 {
2615 <text><p class="prod-promo"> </p></text>
2616 }
2617 <p class="prod-name">@products.GetString("Ecom:Product:Field.PublicBrand")</p>
2618 <p class="prod-name">@products.GetString("Ecom:Product.Name")</p>
2619 <div class="prod-star">
2620 @if (@relatedRating == 0)
2621 {
2622 <label class="starUnselected"></label>
2623 <label class="starUnselected"></label>
2624 <label class="starUnselected"></label>
2625 <label class="starUnselected"></label>
2626 <label class="starUnselected"></label>
2627 }
2628 @for (var i = 1; i < @relatedRating; i++)
2629 {
2630 <label class="starSelected"></label>
2631 }
2632 @if (relatedRating % 1 != 0)
2633 {
2634 <label class="starSelected half"></label>
2635 }
2636 </div>
2637 <div class="prod-priceBox">
2638 @if (inventoryDiscountRelated)
2639 {
2640 if (sellingPriceRelated != internetPriceRelated)
2641 {
2642 <div class="prod-price">
2643 <p class="op">
[email protected]("{0:0.00}", sellingPriceRelated)</p>
2644 <p class="np">
[email protected]("{0:0.00}", internetPriceRelated)</p>
26452646 </div>
2647 <div class="member-price"></div>
2648 }
2649 else if (sellingPriceRelated == internetPriceRelated)
2650 {
2651 <div class="prod-price">
2652 <p class="np">
[email protected]("{0:0.00}", sellingPriceRelated)</p>
2653 </div>
26542655 }
2656 }
2657 @*inventoryDiscount false*@
2658 else
2659 {
2660 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2661 {
2662 <div class="prod-price">
2663 <p class="np">
[email protected]("{0:0.00}", sellingPriceRelated)</p>
2664 </div>
2665 <div class="member-price">
2666 <div class="title">
2667 Member
2668 <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>
2669 <p class="price">
[email protected]("{0:0.00}", memberPriceRelated)</p>
2670 </div>
26712672 <div class="title">
2673 Birthday
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}", birthdayPriceRelated)</p>
2676 </div>
2677 </div>
2678 }
2679 else if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2680 {
2681 <div class="prod-price">
2682 <p class="np">
[email protected]("{0:0.00}", internetPriceRelated)</p>
2683 </div>
2684 if (!birthday)
2685 {
2686 <div class="member-price">
2687 <div class="title">
2688 Member
2689 <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>
2690 <p class="price">
[email protected]("{0:0.00}", memberPriceRelated)</p>
2691 </div>
2692 </div>
2693 }
2694 else
2695 {
2696 <div class="member-price">
2697 <div class="title">
2698 Birthday
2699 <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>
2700 <p class="price">
[email protected]("{0:0.00}", birthdayPriceRelated)</p>
2701 </div>
2702 </div>
2703 }
2704 }
2705 }
2706 </div>
27072708 @if (products.GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
2709 {
2710 <ul class="info">
2711 <li>*In Store Only</li>
2712 </ul>
2713 }
27142715 @if (!products.GetBoolean("Ecom:Product:Field.ProductClassic.Value"))
2716 {
2717 <div class="btn-addto-cart" style="margin-bottom:5px;">
2718 <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>
2719 </div>
2720 }
2721 </li>
2722 }
2723 </ul>
2724 </div>
2725 </div>
2726 }
2727 }
2728 }
2729 }
2730 </div>
2731 @using DWAPAC.PLC.Services.PLCPSWS;
2732 @using DWAPAC.PLC.Services;
2733 @using DWAPAC.PLC;
2734 @{
2735 DWAPAC.PLC.Services.PLCPSWS.PS_Service service_1 = new DWAPAC.PLC.Services.PLCPSWS.PS_Service();
2736 var productLocation_1 = service_1.GetProductLocation("dynamicweb", "{_0rfJ39sw", pid);
2737 }
27382739 <script src='/files/Templates/Designs/PLC/js/jquery.elevatezoom.js'></script>
2740 <script src='/files/Templates/Designs/PLC/js/jquery.bxslider.js'></script>
2741 @* ----- qty controller Begin----- *@
2742 <script type="text/javascript" src="/Files/Templates/Designs/PLC/js/PLCAddToCartQtyController.js"></script>
2743 @* ----- qty controller End------- *@
2744 <script>
2745 @*//Start of variant selection*@
2746 var firstChange = "";
2747 var secondVariant = "@variantSelector";
27482749 $("#flavourInput").change(function () {
2750 if (firstChange == "") {
2751 firstChange = "FLAVOUR";
2752 }
27532754 if (firstChange == "SIZE") {
2755 var size = $("#sizeInput").val();
2756 var data = $(this).serialize();
27572758 data += "&skuCode=@(skuCode)";
2759 data += "&size=" + size + "&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
27602761 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
2762 $.ajax({
2763 type: 'POST',
2764 url: '@plcUrl' + '/Default.aspx?ID=191',
2765 data: data,
2766 success: function (data) {
2767 var firstSplit = data.split('<script type="text/javascript">');
2768 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
2769 }
2770 });
2771 return false;
2772 } else {
2773 var data = $(this).serialize();
2774 data += "&pid=@(pid)&firstSelect=" + firstChange;
2775 var options = document.getElementById('sizeInput');
2776 while (options.hasChildNodes()) {
2777 options.removeChild(options.lastChild);
2778 }
2779 $("#sizeInput").append("<option>Please select size</option>");
2780 $.ajax({
2781 type: 'POST',
2782 url: '@plcUrl' + '/Default.aspx?ID=191',
2783 data: data,
2784 success: function (data) {
2785 var firstSplit = data.split('<script type="text/javascript">');
2786 $("#sizeInput").append(firstSplit[0]);
2787 }
2788 });
2789 return false;
2790 }
2791 });
27922793 $("#sizeInput").change(function () {
2794 if (firstChange == "") {
2795 firstChange = "SIZE";
2796 }
2797 if (firstChange == "SIZE" && secondVariant != "size") {
2798 var data = $(this).serialize();
2799 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
2800 var options = document.getElementById(secondVariant + 'Input');
2801 while (options.hasChildNodes()) {
2802 options.removeChild(options.lastChild);
2803 }
2804 $("#" + secondVariant + "Input").append("<option>Please select " + secondVariant + "</option>");
2805 $.ajax({
2806 type: 'POST',
2807 url: '@plcUrl' + '/Default.aspx?ID=191',
2808 data: data,
2809 success: function (data) {
2810 var firstSplit = data.split('<script type="text/javascript">');
2811 $("#" + secondVariant + "Input").append(firstSplit[0]);
2812 }
2813 });
2814 return false;
2815 } else if (firstChange == "SIZE" && secondVariant == "size") {
2816 var variant2 = $("#" + secondVariant + "Input").val();
2817 var data = $(this).serialize();
2818 data += "&skuCode=@(skuCode)";
2819 data += "&secondVariant=" + secondVariant + "&firstSelect=" + firstChange;
2820 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
2821 $.ajax({
2822 type: 'POST',
2823 url: '@plcUrl' + '/Default.aspx?ID=191',
2824 data: data,
2825 success: function (data) {
2826 var firstSplit = data.split('<script type="text/javascript">');
2827 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
2828 }
2829 });
2830 return false;
2831 } else if (firstChange != "SIZE") {
2832 var variant2 = $("#" + secondVariant + "Input").val();
2833 var data = $(this).serialize();
2834 data += "&skuCode=@(skuCode)";
2835 data += "&" + secondVariant + "=" + variant2 + "&firstSelect=" + firstChange;
2836 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
2837 $.ajax({
2838 type: 'POST',
2839 url: '@plcUrl' + '/Default.aspx?ID=191',
2840 data: data,
2841 success: function (data) {
2842 var firstSplit = data.split('<script type="text/javascript">');
2843 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
2844 }
2845 });
2846 return false;
2847 }
2848 });
28492850 $("#onlyflavourInput").change(function () {
2851 if (firstChange == "") {
2852 firstChange = "FLAVOUR";
2853 }
28542855 if (firstChange == "FLAVOUR" && secondVariant != "flavour") {
2856 var data = $(this).serialize();
2857 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
28582859 var options = document.getElementById(secondVariant + 'Input');
2860 while (options.hasChildNodes()) {
2861 options.removeChild(options.lastChild);
2862 }
2863 $("#" + secondVariant + "Input").append("<option>Please select " + secondVariant + "</option>");
2864 $.ajax({
2865 type: 'POST',
2866 url: '@plcUrl' + '/Default.aspx?ID=191',
2867 data: data,
2868 success: function (data) {
2869 var firstSplit = data.split('<script type="text/javascript">');
2870 $("#" + secondVariant + "Input").append(firstSplit[0]);
2871 }
2872 });
2873 return false;
2874 } else if (firstChange == "FLAVOUR" && secondVariant == "flavour") {
2875 var variant2 = $("#" + secondVariant + "Input").val();
2876 var data = $(this).serialize();
2877 data += "&skuCode=@(skuCode)";
2878 data += "&secondVariant=" + secondVariant + "&firstSelect=" + firstChange;
2879 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
2880 $.ajax({
2881 type: 'POST',
2882 url: '@plcUrl' + '/Default.aspx?ID=191',
2883 data: data,
2884 success: function (data) {
2885 var firstSplit = data.split('<script type="text/javascript">');
2886 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
2887 }
2888 });
2889 return false;
2890 } else if (firstChange != "FLAVOUR") {
2891 var variant2 = $("#" + secondVariant + "Input").val();
2892 var data = $(this).serialize();
2893 data += "&skuCode=@(skuCode)";
2894 data += "&" + secondVariant + "=" + variant2 + "&firstSelect=" + firstChange;
2895 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
2896 $.ajax({
2897 type: 'POST',
2898 url: '@plcUrl' + '/Default.aspx?ID=191',
2899 data: data,
2900 success: function (data) {
2901 var firstSplit = data.split('<script type="text/javascript">');
2902 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
2903 }
2904 });
2905 return false;
2906 } else {
2907 var data = $(this).serialize();
2908 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
2909 var options = document.getElementById('sizeInput');
2910 while (options.hasChildNodes()) {
2911 options.removeChild(options.lastChild);
2912 }
2913 $("#onlyflavourInput").append("<option>Please select flavour</option>");
2914 $.ajax({
2915 type: 'POST',
2916 url: '@plcUrl' + '/Default.aspx?ID=191',
2917 data: data,
2918 success: function (data) {
2919 var firstSplit = data.split('<script type="text/javascript">');
2920 $("#onlyflavourInput").append(firstSplit[0]);
2921 }
2922 });
2923 return false;
2924 }
2925 });
29262927 $("#onlycolorInput").change(function () {
2928 if (firstChange == "") {
2929 firstChange = "COLOR";
2930 }
2931 if (firstChange == "COLOR" && secondVariant != "color") {
29322933 var data = $(this).serialize();
2934 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
29352936 var options = document.getElementById(secondVariant + 'Input');
2937 while (options.hasChildNodes()) {
2938 options.removeChild(options.lastChild);
2939 }
2940 $("#" + secondVariant + "Input").append("<option>Please select " + secondVariant + "</option>");
2941 $.ajax({
2942 type: 'POST',
2943 url: '@plcUrl' + '/Default.aspx?ID=191',
2944 data: data,
2945 success: function (data) {
29462947 var firstSplit = data.split('<script type="text/javascript">');
2948 $("#" + secondVariant + "Input").append(firstSplit[0]);
29492950 }
2951 });
29522953 return false;
2954 } else if (firstChange == "COLOR" && secondVariant == "color") {
2955 var variant2 = $("#" + secondVariant + "Input").val();
2956 var data = $(this).serialize();
2957 data += "&skuCode=@(skuCode)";
2958 data += "&secondVariant=" + secondVariant + "&firstSelect=" + firstChange;
2959 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
2960 $.ajax({
2961 type: 'POST',
2962 url: '@plcUrl' + '/Default.aspx?ID=191',
2963 data: data,
2964 success: function (data) {
29652966 var firstSplit = data.split('<script type="text/javascript">');
2967 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
2968 }
2969 });
29702971 return false;
2972 } else if (firstChange != "COLOR") {
2973 var variant2 = $("#" + secondVariant + "Input").val();
2974 var data = $(this).serialize();
2975 data += "&skuCode=@(skuCode)";
2976 data += "&" + secondVariant + "=" + variant2 + "&firstSelect=" + firstChange;
2977 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
2978 $.ajax({
2979 type: 'POST',
2980 url: '@plcUrl' + '/Default.aspx?ID=191',
2981 data: data,
2982 success: function (data) {
2983 var firstSplit = data.split('<script type="text/javascript">');
2984 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
2985 }
2986 });
29872988 return false;
2989 } else {
2990 var data = $(this).serialize();
2991 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
2992 var options = document.getElementById('sizeInput');
2993 while (options.hasChildNodes()) {
2994 options.removeChild(options.lastChild);
2995 }
2996 $("#onlycolorInput").append("<option>Please select color</option>");
2997 $.ajax({
2998 type: 'POST',
2999 url: '@plcUrl' + '/Default.aspx?ID=191',
3000 data: data,
3001 success: function (data) {
3002 var firstSplit = data.split('<script type="text/javascript">');
3003 $("#onlycolorInput").append(firstSplit[0]);
3004 }
3005 });
30063007 return false;
3008 }
3009 });
3010 $("#colorInput").change(function () {
3011 if (firstChange == "") {
3012 firstChange = "COLOR";
3013 }
3014 if (firstChange == "SIZE") {
3015 var size = $("#sizeInput").val();
3016 var data = $(this).serialize();
3017 data += "&skuCode=@(skuCode)";
3018 data += "&size=" + size + "&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
3019 $.blockUI({ message: $('#addingToCart'), css: { border: 'none', background: 'none' } });
3020 $.ajax({
3021 type: 'POST',
3022 url: '@plcUrl' + '/Default.aspx?ID=191',
3023 data: data,
3024 success: function (data) {
30253026 var firstSplit = data.split('<script type="text/javascript">');
3027 window.location = '@plcUrl' + '/default.aspx?id=@(pageID)&productid=' + firstSplit[0];
3028 }
3029 });
30303031 return false;
3032 } else {
3033 var data = $(this).serialize();
3034 data += "&pid=@(pid)&firstSelect=" + firstChange + "&secondVariant=" + secondVariant;
3035 var options = document.getElementById('sizeInput');
3036 while (options.hasChildNodes()) {
3037 options.removeChild(options.lastChild);
3038 }
3039 $("#sizeInput").append("<option>Please select size</option>");
3040 $.ajax({
3041 type: 'POST',
3042 url: '@plcUrl' + '/Default.aspx?ID=191',
3043 data: data,
3044 success: function (data) {
3045 var firstSplit = data.split('<script type="text/javascript">');
3046 $("#sizeInput").append(firstSplit[0]);
3047 }
3048 });
30493050 return false;
3051 }
3052 });
30533054 @*//End of variant selector*@
30553056 $("#quantityInput").change(function () {
3057 var repack = '@ProdRepackitems';
3058 if (repack == 'True') {
3059 document.getElementById("repackQuantity").max = this.value;
30603061 document.getElementById("productFormQuantity").value = this.value;
3062 if (!$('#requireRepack').prop("checked")) {
3063 var linkstring = document.getElementById("addtocartLink").href.split('quantity=');
3064 var proid = document.getElementById("addtocartLink").href.split(',');
3065 var result = linkstring[0] + "quantity=" + this.value + "'," + proid[1] + "," + proid[2];
3066 document.getElementById("addtocartLink").href = result;
3067 }
3068 } else {
30693070 var linkstring = document.getElementById("addtocartLink").href.split('quantity=');
3071 var proid = document.getElementById("addtocartLink").href.split(',');
3072 var result = linkstring[0] + "quantity=" + this.value + "'," + proid[1] + "," + proid[2];
3073 document.getElementById("addtocartLink").href = result;
3074 }
30753076 });
3077 @*//Start of repack*@
3078 $("#requireRepack").click(function () {
3079 if ($('#requireRepack').prop("checked")) {
3080 document.getElementById("repackChoose").style.display = "block";
3081 document.getElementById("addtocartLink").href = 'javascript:void(0)';
3082 document.getElementById("addtocartLink").setAttribute("onclick", "submitRepack()");
3083 } else {
3084 document.getElementById("repackChoose").style.display = "none";
3085 document.getElementById("addtocartLink").href = '?productid=@pid&cartcmd=add&quantity=' + document.getElementById("quantityInput").value;
3086 document.getElementById("addtocartLink").setAttribute("onclick", "");
30873088 }
3089 });
3090 $("#repackQuantity").change(function () {
3091 document.getElementById("repackFormQuantity").value = this.value;
3092 document.getElementById("repackProductPrice").innerHTML = "$" + parseInt(this.value) * parseFloat("@repackPrice") + ".00";
3093 if (parseInt($("#quantityInput").val()) < parseInt(this.value)) {
3094 this.value = 1;
3095 $("#repackError").attr("class", "");
3096 } else {
3097 $("#repackError").attr("class", "hide");
3098 }
3099 });
31003101 function submitRepack() {
3102 showaddedItem('?cartcmd=add&productid=@pid&quantity=' + document.getElementById("quantityInput").value, @pid, false);
3103 document.getElementById("multiFormSubmit").click();
3104 }
31053106 $("#repackQuantity").keyup(function (event) {
3107 if (parseInt($("#quantityInput").val()) < parseInt(this.value)) {
3108 this.value = 1;
3109 $("#repackError").attr("class", "");
3110 } else {
3111 $("#repackError").attr("class", "hide");
3112 }
3113 }).keydown(function (event) {
3114 if (event.which == 13) {
3115 event.preventDefault();
3116 }
3117 });
3118 @*//End of repack*@
3119 function productDetailBreadCrumb() {
3120 var brandname = "@ProdBrand";
3121 $('#breadcrumb').append('<li><a href="@plcUrl">Home</a><li >></li></li>');
3122 @*//$('#breadcrumb').append('<li><a href="@plcUrl/@GetGlobalValue("Global:Page.Name")">@GetGlobalValue("Global:Page.Name")</a><li >></li></li>');*@
3123 $('#breadcrumb').append('<li><a href="@plcUrl/default.aspx?id=@pageID&
[email protected]()">@firstCategory</a><li >></li></li>');
3124 @*//$('#breadcrumb').append('<li><a href="default.aspx?id=@pageID&
[email protected]()&
[email protected]()">@secondCategory.Replace("-a-","&")</a><li >></li></li>');*@
3125 @*//$('#breadcrumb').append('<li><a href="default.aspx?id=@pageID&
[email protected]()&
[email protected]()&
[email protected]()">@thirdCategory.Replace("-a-","&")</a><li >></li></li>');*@
3126 @*//$('#breadcrumb').append('<li><a href="@plcUrl/@GetGlobalValue("Global:Page.Name")?q='+brandname+'">'+brandname+'</a><li >></li></li>');*@
3127 $('#breadcrumb').append("<li><a href='@plcUrl/@GetGlobalValue("Global:Page.Name")
[email protected]()'>@ProdBrand</a><li >></li></li>");
3128 $('#breadcrumb').append('<li class="active">@ProdName</li>');
3129 }
31303131 productDetailBreadCrumb();
31323133 $(function () {
3134 $('#tabDivMain a:first').tab('show');
3135 });
31363137 @*//addProductDetails();*@
3138 @*<!------------------- Add to Cart Begin -------------->*@
3139 @*<!------- Check all variants are selected begin ---------->*@
3140 function CheckVariantSelected() {
3141 var returnValue = true;
3142 if (parseInt('@hasVariantCount') > 1) {
3143 if (('@hasSize').toLowerCase() == 'true') {
3144 if ($("#sizeInput").val() == "" || $("#sizeInput").val().toLowerCase() == "please select size") {
3145 alert("Please select size.");
3146 returnValue = false;
3147 }
3148 }
3149 if (('@hasFlavour').toLowerCase() == 'true') {
3150 if ($("#flavourInput").val() == "" || $("#flavourInput").val().toLowerCase() == "please select flavour") {
3151 alert("Please select flavour.");
3152 returnValue = false;
3153 }
3154 }
3155 if (('@hasColor').toLowerCase() == 'true') {
3156 if ($("#colorInput").val() == "" || $("#colorInput").val().toLowerCase() == "please select color") {
3157 alert("Please select color.");
3158 returnValue = false;
3159 }
3160 }
3161 }
3162 if (returnValue) {
3163 @*//showaddedItem(" ", "@pid", "@ProdBrand", "@GetString("Ecom:Product.Name")", "@GetString("Ecom:Product.Price.PriceWithVAT")", "@GetString("Ecom:Product.Price.Currency.Symbol")", $("#quantityInput_" + "@pid").val(), true);*@
3164 @*//AjaxAddToCart("?cartcmd=add&productid=@pid&quantity=", "@pid");*@
31653166 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");
3167 }
3168 }
3169 @*<!------- Check all variants are selected end ---------->*@
3170 @*<!------------------- Add to Cart End -------------->*@
31713172 @*// var $j = jQuery.noConflict();*@
3173 $('#zoom_product').elevateZoom({
3174 zoomType: "inner",
3175 cursor: "crosshair",
3176 zoomWindowFadeIn: 500,
3177 zoomWindowFadeOut: 750
3178 });
3179 function collapseMobile(val) {
3180 if ($("#mb_" + val)[0].classList.contains("in")) {
3181 $("#mb_" + val).removeClass("in");
3182 } else {
3183 $("#mb_" + val).addClass("in");
3184 }
3185 }
3186 $(document).ready(function () {
3187 gtag("event", "view_item", {
3188 currency: "@CurrencyCode",
3189 value: @internetPrice,
3190 items: [
3191 {
3192 item_id: "@pid",
3193 item_name: "@ProdName",
3194 currency: "@CurrencyCode",
3195 discount: @string.Format("{0:0.00}", sellingPrice-internetPrice),
3196 index: 0,
3197 item_brand: "@ProdBrand",
3198 item_category: "@firstCategory",
3199 item_category2: "@secondCategory",
3200 item_category3: "@thirdCategory",
3201 item_variant: "@productFlavour",
3202 item_variant2: "@productColor",
3203 item_variant3: "@productSize",
3204 price: @sellingPrice,
3205 quantity: 1
3206 }
3207 ]
3208 });
3209 });
3210 </script>