Error compiling template "Designs/Kinder_generated/eCom/Productlist/ProductListSearch.cshtml"
Line 120: 'PriceInfo.PriceInfo()' is obsolete: 'Use overload with currency instead.'
Line 120: 'PriceInfo.PriceInfo()' is obsolete: 'Use overload with currency instead.'
Line 133: 'PriceCalculated.PriceCalculated(PriceRaw)' is obsolete: 'Use one of the static Create methods, set relevant properties and then call the Calculate method.'
Line 140: 'PriceInfo.PriceInfo()' is obsolete: 'Use overload with currency instead.'
Line 140: 'PriceInfo.PriceInfo()' is obsolete: 'Use overload with currency instead.'
Line 186: 'List' does not contain a definition for 'Discount' and no accessible extension method 'Discount' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 186: 'List' does not contain a definition for 'FreeArticleQuantity' and no accessible extension method 'FreeArticleQuantity' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 188: 'List' does not contain a definition for 'Discount' and no accessible extension method 'Discount' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 188: 'List' does not contain a definition for 'Quantity' and no accessible extension method 'Quantity' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 188: 'List' does not contain a definition for 'FreeArticleQuantity' and no accessible extension method 'FreeArticleQuantity' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 190: 'List' does not contain a definition for 'PriceWithVat' and no accessible extension method 'PriceWithVat' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 190: 'List' does not contain a definition for 'Price' and no accessible extension method 'Price' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 192: 'List' does not contain a definition for 'Quantity' and no accessible extension method 'Quantity' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 192: 'List' does not contain a definition for 'Discount' and no accessible extension method 'Discount' accepting a first argument of type 'List' could be found (are you missing a using directive or an assembly reference?)
Line 1856: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 1856: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.42000
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 namespace CompiledRazorTemplates.Dynamic {
12 using System;
13 using System.Collections.Generic;
14
15 #line 5 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
16 using System.Linq;
17
18 #line default
19 #line hidden
20
21 #line 2 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
22 using Dynamicweb;
23
24 #line default
25 #line hidden
26
27 #line 3 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
28 using Bluedesk.DynamicWeb.ItemTypes.Pages;
29
30 #line default
31 #line hidden
32
33 #line 4 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
34 using Bluedesk.Tools.DynamicWeb.ExtensionMethods;
35
36 #line default
37 #line hidden
38
39 #line 6 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
40 using Dynamicweb.Content;
41
42 #line default
43 #line hidden
44
45 #line 9 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
46 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
47
48 #line default
49 #line hidden
50
51 #line 44 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
52 using Dynamicweb.Ecommerce.Prices;
53
54 #line default
55 #line hidden
56
57 #line 45 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
58 using Bluedesk.DynamicWeb.Integration.ProfitPlus.ExtensionMethods;
59
60 #line default
61 #line hidden
62
63
64 public class RazorEngine_446218043f404934a537ff4323303b2d : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> {
65
66 #line hidden
67
68 #line 47 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
69 public RazorEngine.Templating.TemplateWriter renderProduct(LoopItem product, string productdetailPriceSuffix, string WithVATSuffix, string FormattedSuffix, bool enableShoppingCart, bool displayPrice, bool enableProductStock, string listId, string listName, EcomConfig EcommerceConfiguration) {
70 #line default
71 #line hidden
72 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
73
74 #line 47 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
75
76 bool hideZeroPrices = EcommerceConfiguration.HideZeroPrices;
77 bool enableAddToCartForZeroPrices = EcommerceConfiguration.AddToCartAllowZeroPrices;
78 bool enableAddToCartForOutOfStock = EcommerceConfiguration.AddToCartAllowOutOfStock;
79 string stockFormat = EcommerceConfiguration.StockFormat;
80
81 int productDetailPageId = GetPageIdByNavigationTag("ProductOverview");
82
83 string productName = product.GetString("Ecom:Product.Name");
84 string productImage = product.GetString("Ecom:Product.ImageMedium.Clean");
85 string productId = product.GetString("Ecom:Product.ID");
86 string productNumber = product.GetString("Ecom:Product.Number");
87 string productVariantId = product.GetString("Ecom:Product.VariantID");
88 string productURL = product.GetString("Ecom:Product.VariantLinkGroup.Clean").Replace($"ID={Pageview.ID.ToString()}&", $"ID={productDetailPageId.ToString()}&");
89 string productManufacturer = product.GetString("Ecom:Manufacturer.Name");
90 string productLoopCount = product.GetString("Products.LoopCounter");
91 var p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productId, productVariantId, Pageview.Area.EcomLanguageId);
92
93 bool isVariant = !string.IsNullOrWhiteSpace(p.VariantId);
94 bool hasVariants = !isVariant ? product.GetInteger("Ecom:Product.VariantCount") > 0 : false;
95
96 var productCategory = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID"));
97 string productCategoryName = productCategory != null ? productCategory.Name.Replace("''", "\\\"").Replace("'", "") : "";
98
99 bool isPriceZero = product.GetDouble("Ecom:Product.Price.Price.Value") <= 0;
100 bool hasDiscount = product.GetBoolean("Ecom:Product.HaveDiscount") && product.GetString("Ecom:Product.Price.PriceWithoutVATFormatted") != product.GetString("Ecom:Product.Discount.Price.PriceWithoutVATFormatted");
101 string OriginalPrice = product.GetString("Ecom:Product.Price.Price" + WithVATSuffix + FormattedSuffix);
102 string Price = product.GetString("Ecom:Product.Discount.Price.Price" + WithVATSuffix + FormattedSuffix);
103 string gtmDiscount = product.GetString("Ecom:Product.Discount.TotalAmount.Price.Value").Replace(",", ".");
104 string gtmPrice = product.GetString("Ecom:Product.Price.Price.Value").Replace(",", ".");
105 string yourDiscount = product.GetString("Ecom:Product.Discount.TotalAmount.Price" + WithVATSuffix + FormattedSuffix);
106 double discountPercentage = Math.Round((((GetDouble("Ecom:Product.Discount.Price.Price" + WithVATSuffix) - GetDouble("Ecom:Product.Price.Price" + WithVATSuffix)) / GetDouble("Ecom:Product.Price.Price" + WithVATSuffix)) * 100));
107
108 string informativePrice = product.GetString("Ecom:Product.InformativePrice.Price");
109 double informativePriceForDiscountPercentage = product.GetDouble("Ecom:Product.InformativePrice.Price" + WithVATSuffix);
110
111 if (EcommerceConfiguration.UseInformativePriceAsFromPrice && !string.IsNullOrWhiteSpace(informativePrice))
112 {
113 double informativePriceValue = product.GetDouble("Ecom:Product.InformativePrice.Price.Value");
114 hasDiscount = product.GetDouble("Ecom:Product.Price.Price.Value") < informativePriceValue && product.GetString("Ecom:Product.Price.PriceWithoutVATFormatted") != product.GetString("Ecom:Product.InformativePrice.PriceWithoutVATFormatted");
115 if (hasDiscount)
116 {
117 OriginalPrice = product.GetString("Ecom:Product.InformativePrice.Price" + WithVATSuffix + FormattedSuffix);
118 double yourProfitValue = product.GetDouble("Ecom:Product.InformativePrice.Price" + WithVATSuffix) - product.GetDouble("Ecom:Product.Price.Price" + WithVATSuffix);
119 discountPercentage = Math.Round(((yourProfitValue / informativePriceForDiscountPercentage) * 100));
120 yourDiscount = WithVATSuffix == "WithVAT" ? new PriceInfo { PriceWithVAT = yourProfitValue }.PriceWithVATFormatted : new PriceInfo { PriceWithoutVAT = yourProfitValue }.PriceWithoutVATFormatted;
121 }
122 }
123
124 string retailPrice = "";
125 bool displayRetailPrice = EcommerceConfiguration.DisplayRetailPrice;
126 if(EcommerceConfiguration.DisplayRetailPriceForUsers && Pageview.User == null) {
127 displayRetailPrice = false;
128 }
129 if(displayRetailPrice) {
130 string priceFieldName = EcommerceConfiguration.RetailPriceField;
131 if(EcommerceConfiguration.RetailPriceIsDbPrice) {
132 PriceRaw customerPriceRaw = new PriceRaw(product.GetDouble("Ecom:Product.DBPrice"), Dynamicweb.Ecommerce.Common.Context.Currency);
133 PriceCalculated customerPrice = new Dynamicweb.Ecommerce.Prices.PriceCalculated(customerPriceRaw);
134 if(customerPrice.Price > 0) {
135 retailPrice = WithVATSuffix == "WithVAT" ? customerPrice.PriceWithVATFormatted : customerPrice.PriceWithoutVATFormatted;
136 }
137 } else if(!string.IsNullOrWhiteSpace(priceFieldName)) {
138 double customerPriceValue = product.GetDouble($"Ecom:Product:Field.{priceFieldName}.Value");
139 if(customerPriceValue > 0) {
140 retailPrice = WithVATSuffix == "WithVAT" ? new PriceInfo { PriceWithVAT = customerPriceValue }.PriceWithVATFormatted : new PriceInfo { PriceWithoutVAT = customerPriceValue }.PriceWithoutVATFormatted;
141 }
142 }
143 }
144
145 double stockSize = hasVariants ? product.GetLoop("VariantInfos").Sum(item => item.GetDouble("Stock")) : product.GetDouble("Ecom:Product.Stock");
146 string stockText = product.GetString("Ecom:Product:Stock.Text");
147 string stockSizeFormatted = stockSize.ToString(p.Stock % 1 == 0 ? "N0" : "N2", System.Globalization.CultureInfo.GetCultureInfo(Pageview.Area.CultureInfo.TwoLetterISOLanguageName));
148 bool neverOutOfStock = product.GetBoolean("Ecom:Product.NeverOutOfStock");
149 bool isInStock = stockSize > 0 || neverOutOfStock;
150 string stockClass = isInStock ? "products-module__product-stock-state--instock" : "products-module__product-stock-state--outofstock";
151
152 int productRating = product.GetInteger("Ecom:Product.Rating");
153 int productCommentCount = product.GetInteger("Ecom:Product.CommentCount");
154 string productRibbon = product.GetString("Ecom:Product:Field.Product_Ribbon.Value");
155 string productRibbonStyle = product.GetString("Ecom:Product:Field.RibbonStyle.Value");
156
157 string yourProfitLabel = Translate("Productdetail.YourProfitLabel", "Uw voordeel:");
158
159 bool enableProductShoppingCart = enableShoppingCart;
160 if(!enableAddToCartForZeroPrices && isPriceZero) {
161 enableProductShoppingCart = false;
162 }
163
164 if(!enableAddToCartForOutOfStock && !isInStock) {
165 enableProductShoppingCart = false;
166 }
167
168 if(product.GetBoolean("Ecom:Product.Discontinued"))
169 {
170 enableProductShoppingCart = false;
171 }
172
173 bool displayProductPrice = displayPrice;
174 if(hideZeroPrices && isPriceZero) {
175 displayProductPrice = false;
176 }
177
178 string promotionText = product.GetString("Ecom:Product:Field.PromotionWebName.Value.Clean");
179
180 int result;
181 int contactId = int.TryParse(Pageview.User?.CustomerNumber, out result) ? result : 0;
182 var volumeReduction = p?.GetVolumeReduction(contactId) ?? null;
183 string volumeDiscountText = "";
184 if(volumeReduction != null)
185 {
186 if (volumeReduction.Discount == 0 && volumeReduction.FreeArticleQuantity > 0)
187 {
188 volumeReduction.Discount = Math.Round((100 / volumeReduction.Quantity) * volumeReduction.FreeArticleQuantity);
189 }
190 string volumeReductionPrice = WithVATSuffix == "WithVAT" ? volumeReduction.PriceWithVat.ToString("0.###") : volumeReduction.Price.ToString("0.###");
191
192 volumeDiscountText = string.Format(Translate("VolumeDiscountText", "Vanaf {0} St aan {1} € ({2}% korting)"), volumeReduction.Quantity.ToString("0.###"), volumeReductionPrice, volumeReduction.Discount.ToString("0.###"));
193 }
194
195 string hasPromoTextClass = !string.IsNullOrWhiteSpace(promotionText) ? "products-module--haspromo" : "";
196 bool priceOnRequest = product.GetBoolean("Ecom:Product:Field.PriceOnRequest.Value");
197
198 if(priceOnRequest) {
199 displayProductPrice = false;
200 enableProductShoppingCart = false;
201 }
202
203 string unitCode = string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.Unit Code.Value")) ? "" : $"/ {product.GetString("Ecom:Product:Field.Unit Code.Value")}";
204 string onlySellCompletePackage = product.GetString("Ecom:Product:Field.Only Sell Complete Package.Value");
205 var minimumQuantity = p.PurchaseMinimumQuantity;
206
207
208
209 #line default
210 #line hidden
211 WriteLiteralTo(__razor_helper_writer, "\t<div");
212
213 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 10776), Tuple.Create("\"", 10818)
214 , Tuple.Create(Tuple.Create("", 10784), Tuple.Create("products-module", 10784), true)
215
216 #line 179 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
217 , Tuple.Create(Tuple.Create(" ", 10799), Tuple.Create<System.Object, System.Int32>(hasPromoTextClass
218
219 #line default
220 #line hidden
221 , 10800), false)
222 );
223
224 WriteLiteralTo(__razor_helper_writer, ">\r\n\r\n");
225
226
227 #line 181 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
228
229
230 #line default
231 #line hidden
232
233 #line 181 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
234 if(!string.IsNullOrWhiteSpace(promotionText))
235 {
236
237
238 #line default
239 #line hidden
240 WriteLiteralTo(__razor_helper_writer, "\t\t\t<p");
241
242 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__promotion-description\"");
243
244 WriteLiteralTo(__razor_helper_writer, ">\r\n");
245
246 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t");
247
248
249 #line 184 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
250 WriteTo(__razor_helper_writer, promotionText);
251
252
253 #line default
254 #line hidden
255 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t</p>\r\n");
256
257
258 #line 186 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
259 }
260
261
262 #line default
263 #line hidden
264 WriteLiteralTo(__razor_helper_writer, "\r\n");
265
266
267 #line 188 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
268
269
270 #line default
271 #line hidden
272
273 #line 188 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
274 if (!string.IsNullOrWhiteSpace(productRibbon))
275 {
276
277
278 #line default
279 #line hidden
280 WriteLiteralTo(__razor_helper_writer, "\t\t\t<p");
281
282 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 11032), Tuple.Create("\"", 11108)
283 , Tuple.Create(Tuple.Create("", 11040), Tuple.Create("products-module__ribbon", 11040), true)
284 , Tuple.Create(Tuple.Create(" ", 11063), Tuple.Create("products-module__ribbon--", 11064), true)
285
286 #line 190 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
287 , Tuple.Create(Tuple.Create("", 11089), Tuple.Create<System.Object, System.Int32>(productRibbonStyle
288
289 #line default
290 #line hidden
291 , 11089), false)
292 );
293
294 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t<span");
295
296 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__ribbon-text\"");
297
298 WriteLiteralTo(__razor_helper_writer, ">");
299
300
301 #line 191 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
302 WriteTo(__razor_helper_writer, productRibbon);
303
304
305 #line default
306 #line hidden
307 WriteLiteralTo(__razor_helper_writer, "</span>\r\n\t\t\t</p>\r\n");
308
309
310 #line 193 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
311 }
312
313
314 #line default
315 #line hidden
316 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t<figure");
317
318 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__image-container\"");
319
320 WriteLiteralTo(__razor_helper_writer, ">\r\n");
321
322
323 #line 196 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
324
325
326 #line default
327 #line hidden
328
329 #line 196 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
330 if(!string.IsNullOrWhiteSpace(productImage))
331 {
332
333
334 #line default
335 #line hidden
336 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<img");
337
338 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 11315), Tuple.Create("\"", 11424)
339 , Tuple.Create(Tuple.Create("", 11321), Tuple.Create("/Admin/Public/GetImage.ashx?Image=", 11321), true)
340
341 #line 198 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
342 , Tuple.Create(Tuple.Create("", 11355), Tuple.Create<System.Object, System.Int32>(productImage
343
344 #line default
345 #line hidden
346 , 11355), false)
347 , Tuple.Create(Tuple.Create("", 11368), Tuple.Create("&Crop=7&Format=webp&Quality=90&Compression=80&Height=200", 11368), true)
348 );
349
350 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 11425), Tuple.Create("\"", 11443)
351
352 #line 198 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
353 , Tuple.Create(Tuple.Create("", 11431), Tuple.Create<System.Object, System.Int32>(productName
354
355 #line default
356 #line hidden
357 , 11431), false)
358 );
359
360 WriteLiteralTo(__razor_helper_writer, " loading=\"lazy\"");
361
362 WriteLiteralTo(__razor_helper_writer, " height=\"200\"");
363
364 WriteLiteralTo(__razor_helper_writer, " width=\"300\"");
365
366 WriteLiteralTo(__razor_helper_writer, " />\r\n");
367
368
369 #line 199 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
370 }
371
372
373 #line default
374 #line hidden
375 WriteLiteralTo(__razor_helper_writer, "\t\t</figure>\r\n\r\n\t\t<h3");
376
377 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-name\"");
378
379 WriteLiteralTo(__razor_helper_writer, ">\r\n");
380
381
382 #line 203 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
383
384
385 #line default
386 #line hidden
387
388 #line 203 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
389 if(!string.IsNullOrWhiteSpace(productManufacturer))
390 {
391
392
393 #line default
394 #line hidden
395 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<span");
396
397 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-name--manufacturer\"");
398
399 WriteLiteralTo(__razor_helper_writer, ">");
400
401
402 #line 205 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
403 WriteTo(__razor_helper_writer, productManufacturer);
404
405
406 #line default
407 #line hidden
408 WriteLiteralTo(__razor_helper_writer, "</span>\t\r\n");
409
410
411 #line 206 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
412 }
413
414
415 #line default
416 #line hidden
417 WriteLiteralTo(__razor_helper_writer, "\t\t\t<span");
418
419 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-name--product\"");
420
421 WriteLiteralTo(__razor_helper_writer, ">");
422
423
424 #line 207 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
425 WriteTo(__razor_helper_writer, productName);
426
427
428 #line default
429 #line hidden
430 WriteLiteralTo(__razor_helper_writer, "</span>\r\n\t\t</h3>\r\n\r\n");
431
432
433 #line 210 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
434
435
436 #line default
437 #line hidden
438
439 #line 210 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
440 if(!string.IsNullOrWhiteSpace(productNumber))
441 {
442
443
444 #line default
445 #line hidden
446 WriteLiteralTo(__razor_helper_writer, "\t\t\t<p");
447
448 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-article-number\"");
449
450 WriteLiteralTo(__razor_helper_writer, ">");
451
452
453 #line 212 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
454 WriteTo(__razor_helper_writer, productNumber);
455
456
457 #line default
458 #line hidden
459 WriteLiteralTo(__razor_helper_writer, "</p>\r\n");
460
461
462 #line 213 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
463 }
464
465
466 #line default
467 #line hidden
468 WriteLiteralTo(__razor_helper_writer, "\r\n");
469
470
471 #line 215 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
472
473
474 #line default
475 #line hidden
476
477 #line 215 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
478 if (productCommentCount > 0)
479 {
480
481
482 #line default
483 #line hidden
484 WriteLiteralTo(__razor_helper_writer, "\t\t\t<div");
485
486 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-review-indicator\"");
487
488 WriteLiteralTo(__razor_helper_writer, ">\r\n");
489
490 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t");
491
492
493 #line 218 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
494 WriteTo(__razor_helper_writer, renderReviewIndicator("gold", productRating, "row", true, productCommentCount));
495
496
497 #line default
498 #line hidden
499 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t</div>\r\n");
500
501
502 #line 220 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
503 }
504
505
506 #line default
507 #line hidden
508 WriteLiteralTo(__razor_helper_writer, "\r\n");
509
510
511 #line 222 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
512
513
514 #line default
515 #line hidden
516
517 #line 222 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
518 if (displayPrice && displayProductPrice)
519 {
520
521
522 #line default
523 #line hidden
524 WriteLiteralTo(__razor_helper_writer, "\t\t\t<div");
525
526 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-price-container\"");
527
528 WriteLiteralTo(__razor_helper_writer, ">\r\n");
529
530
531 #line 225 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
532
533
534 #line default
535 #line hidden
536
537 #line 225 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
538 if (hasDiscount)
539 {
540
541
542 #line default
543 #line hidden
544 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<span");
545
546 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-price-original\"");
547
548 WriteLiteralTo(__razor_helper_writer, ">");
549
550
551 #line 227 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
552 WriteTo(__razor_helper_writer, OriginalPrice);
553
554
555 #line default
556 #line hidden
557 WriteLiteralTo(__razor_helper_writer, "</span>\r\n");
558
559 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<span");
560
561 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-price\"");
562
563 WriteLiteralTo(__razor_helper_writer, ">");
564
565
566 #line 228 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
567 WriteTo(__razor_helper_writer, Price);
568
569
570 #line default
571 #line hidden
572 WriteLiteralTo(__razor_helper_writer, " <span>/ ");
573
574
575 #line 228 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
576 WriteTo(__razor_helper_writer, unitCode);
577
578
579 #line default
580 #line hidden
581 WriteLiteralTo(__razor_helper_writer, "</span></span>\r\n");
582
583
584 #line 229 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
585 }
586 else
587 {
588
589
590 #line default
591 #line hidden
592 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<span");
593
594 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-price\"");
595
596 WriteLiteralTo(__razor_helper_writer, ">");
597
598
599 #line 232 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
600 WriteTo(__razor_helper_writer, OriginalPrice);
601
602
603 #line default
604 #line hidden
605 WriteLiteralTo(__razor_helper_writer, " <span>/ ");
606
607
608 #line 232 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
609 WriteTo(__razor_helper_writer, unitCode);
610
611
612 #line default
613 #line hidden
614 WriteLiteralTo(__razor_helper_writer, "</span></span>\r\n");
615
616
617 #line 233 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
618 }
619
620
621 #line default
622 #line hidden
623 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<span");
624
625 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-price-suffix\"");
626
627 WriteLiteralTo(__razor_helper_writer, ">");
628
629
630 #line 234 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
631 WriteTo(__razor_helper_writer, productdetailPriceSuffix);
632
633
634 #line default
635 #line hidden
636 WriteLiteralTo(__razor_helper_writer, "</span>\r\n");
637
638
639 #line 235 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
640
641
642 #line default
643 #line hidden
644
645 #line 235 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
646 if (hasDiscount && discountPercentage > 0)
647 {
648
649
650 #line default
651 #line hidden
652 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<span");
653
654 WriteLiteralTo(__razor_helper_writer, " class=\"pdp-price__percentage\"");
655
656 WriteLiteralTo(__razor_helper_writer, ">-");
657
658
659 #line 237 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
660 WriteTo(__razor_helper_writer, discountPercentage);
661
662
663 #line default
664 #line hidden
665 WriteLiteralTo(__razor_helper_writer, "%</span>\r\n");
666
667
668 #line 238 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
669 }
670
671
672 #line default
673 #line hidden
674 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t");
675
676
677 #line 239 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
678 if (onlySellCompletePackage == "True")
679 {
680
681
682 #line default
683 #line hidden
684 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<p>Bestellen per ");
685
686
687 #line 241 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
688 WriteTo(__razor_helper_writer, minimumQuantity);
689
690
691 #line default
692 #line hidden
693 WriteLiteralTo(__razor_helper_writer, " ");
694
695
696 #line 241 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
697 WriteTo(__razor_helper_writer, unitCode);
698
699
700 #line default
701 #line hidden
702 WriteLiteralTo(__razor_helper_writer, "</p>\r\n");
703
704
705 #line 242 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
706 }
707
708
709 #line default
710 #line hidden
711 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t");
712
713
714 #line 243 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
715 if (!string.IsNullOrWhiteSpace(retailPrice))
716 {
717
718
719 #line default
720 #line hidden
721 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<p");
722
723 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-retail-price\"");
724
725 WriteLiteralTo(__razor_helper_writer, ">\r\n");
726
727 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t");
728
729
730 #line 246 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
731 WriteTo(__razor_helper_writer, String.Format(Translate("ProductBlockTitle.RetailPrice", "Retail price: {0}"), retailPrice));
732
733
734 #line default
735 #line hidden
736 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t\t\t</p>\r\n");
737
738
739 #line 248 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
740 }
741
742
743 #line default
744 #line hidden
745 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t");
746
747
748 #line 249 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
749 if (hasDiscount)
750 {
751
752
753 #line default
754 #line hidden
755 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<p");
756
757 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-your-discount\"");
758
759 WriteLiteralTo(__razor_helper_writer, ">");
760
761
762 #line 251 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
763 WriteTo(__razor_helper_writer, Translate("Productdetail.YourProfitLabel", "Uw voordeel:"));
764
765
766 #line default
767 #line hidden
768 WriteLiteralTo(__razor_helper_writer, " ");
769
770
771 #line 251 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
772 WriteTo(__razor_helper_writer, yourDiscount);
773
774
775 #line default
776 #line hidden
777 WriteLiteralTo(__razor_helper_writer, "</p>\r\n");
778
779
780 #line 252 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
781 }
782
783
784 #line default
785 #line hidden
786 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t");
787
788
789 #line 253 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
790 if (!string.IsNullOrWhiteSpace(volumeDiscountText))
791 {
792
793
794 #line default
795 #line hidden
796 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<p");
797
798 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__volume-discount\"");
799
800 WriteLiteralTo(__razor_helper_writer, ">");
801
802
803 #line 255 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
804 WriteTo(__razor_helper_writer, volumeDiscountText);
805
806
807 #line default
808 #line hidden
809 WriteLiteralTo(__razor_helper_writer, "</p>\r\n");
810
811
812 #line 256 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
813 }
814
815
816 #line default
817 #line hidden
818 WriteLiteralTo(__razor_helper_writer, "\t\t\t</div>\r\n");
819
820
821 #line 258 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
822 }
823
824
825 #line default
826 #line hidden
827 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t<section");
828
829 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__product-actions\"");
830
831 WriteLiteralTo(__razor_helper_writer, ">\r\n");
832
833
834 #line 261 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
835
836
837 #line default
838 #line hidden
839
840 #line 261 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
841 if(enableProductStock && !string.IsNullOrWhiteSpace(stockFormat))
842 {
843 if(stockFormat == "text") {
844 if (!string.IsNullOrWhiteSpace(stockText))
845 {
846
847
848 #line default
849 #line hidden
850 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t<p");
851
852 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 13718), Tuple.Create("\"", 13774)
853 , Tuple.Create(Tuple.Create("", 13726), Tuple.Create("products-module__product-stock-state", 13726), true)
854
855 #line 266 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
856 , Tuple.Create(Tuple.Create(" ", 13762), Tuple.Create<System.Object, System.Int32>(stockClass
857
858 #line default
859 #line hidden
860 , 13763), false)
861 );
862
863 WriteLiteralTo(__razor_helper_writer, ">");
864
865
866 #line 266 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
867 WriteTo(__razor_helper_writer, string.Format(stockText, stockSize));
868
869
870 #line default
871 #line hidden
872 WriteLiteralTo(__razor_helper_writer, "</p>\r\n");
873
874
875 #line 267 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
876 }
877 }
878 else
879 {
880 string translationTag = "";
881
882 if(stockSize == 1)
883 {
884 translationTag = Translate("ProductBlockStockInfo.AmountInStockSingle", "{0} product in stock");
885 }
886 else if(stockSize > 1)
887 {
888 translationTag = Translate("ProductBlockStockInfo.AmountInStockMultiple", "{0} products in stock");
889 }
890 else if(neverOutOfStock)
891 {
892 translationTag = Translate("ProductBlockStockInfo.AmountInStock", "In stock");
893 }
894 else if(!isInStock)
895 {
896 translationTag = Translate("ProductBlockStockInfo.AmountOutOfStock", "Out of stock");
897 }
898
899
900 #line default
901 #line hidden
902 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<p");
903
904 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 14470), Tuple.Create("\"", 14526)
905 , Tuple.Create(Tuple.Create("", 14478), Tuple.Create("products-module__product-stock-state", 14478), true)
906
907 #line 289 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
908 , Tuple.Create(Tuple.Create(" ", 14514), Tuple.Create<System.Object, System.Int32>(stockClass
909
910 #line default
911 #line hidden
912 , 14515), false)
913 );
914
915 WriteLiteralTo(__razor_helper_writer, ">");
916
917
918 #line 289 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
919 WriteTo(__razor_helper_writer, string.Format(translationTag, stockSizeFormatted));
920
921
922 #line default
923 #line hidden
924 WriteLiteralTo(__razor_helper_writer, "</p>\r\n");
925
926
927 #line 290 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
928 }
929 }
930
931
932 #line default
933 #line hidden
934 WriteLiteralTo(__razor_helper_writer, "\r\n");
935
936
937 #line 293 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
938
939
940 #line default
941 #line hidden
942
943 #line 293 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
944 if(!hasVariants && enableShoppingCart && enableProductShoppingCart)
945 {
946
947
948 #line default
949 #line hidden
950 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<add-to-cart");
951
952 WriteLiteralTo(__razor_helper_writer, " \r\n\t\t\t\t\tclass=\"app-addtocart\"");
953
954 WriteLiteralTo(__razor_helper_writer, " \r\n\t\t\t\t\tdata-prodid=\"");
955
956
957 #line 297 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
958 WriteTo(__razor_helper_writer, productId);
959
960
961 #line default
962 #line hidden
963 WriteLiteralTo(__razor_helper_writer, "\"");
964
965 WriteLiteralTo(__razor_helper_writer, " \r\n\t\t\t\t\tdata-variantid=\"");
966
967
968 #line 298 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
969 WriteTo(__razor_helper_writer, productVariantId);
970
971
972 #line default
973 #line hidden
974 WriteLiteralTo(__razor_helper_writer, "\"");
975
976 WriteLiteralTo(__razor_helper_writer, " \r\n\t\t\t\t\tdata-show-text=\"False\"");
977
978 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t\t\tdata-min-quantity=\"");
979
980
981 #line 300 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
982 WriteTo(__razor_helper_writer, product.GetDouble("Ecom:Product.PurchaseMinimumQuantity"));
983
984
985 #line default
986 #line hidden
987 WriteLiteralTo(__razor_helper_writer, "\"");
988
989 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t\t\tdata-step=\"");
990
991
992 #line 301 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
993 WriteTo(__razor_helper_writer, product.GetDouble("Ecom:Product.PurchaseQuantityStep"));
994
995
996 #line default
997 #line hidden
998 WriteLiteralTo(__razor_helper_writer, "\"");
999
1000 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t</add-to-cart>\r\n");
1001
1002
1003 #line 303 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1004 }
1005
1006
1007 #line default
1008 #line hidden
1009 WriteLiteralTo(__razor_helper_writer, "\t\t</section>\r\n\r\n\t\t<a");
1010
1011 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 15036), Tuple.Create("\"", 15054)
1012
1013 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1014 , Tuple.Create(Tuple.Create("", 15043), Tuple.Create<System.Object, System.Int32>(productURL
1015
1016 #line default
1017 #line hidden
1018 , 15043), false)
1019 );
1020
1021 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__link\"");
1022
1023 WriteLiteralTo(__razor_helper_writer, " data-id=\"");
1024
1025
1026 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1027 WriteTo(__razor_helper_writer, productId);
1028
1029
1030 #line default
1031 #line hidden
1032 WriteLiteralTo(__razor_helper_writer, "\"");
1033
1034 WriteLiteralTo(__razor_helper_writer, " data-name=\'");
1035
1036
1037 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1038 WriteTo(__razor_helper_writer, productName.Replace("''", "\\\"").Replace("'", ""));
1039
1040
1041 #line default
1042 #line hidden
1043 WriteLiteralTo(__razor_helper_writer, "\'");
1044
1045 WriteLiteralTo(__razor_helper_writer, " data-number=\"");
1046
1047
1048 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1049 WriteTo(__razor_helper_writer, productNumber);
1050
1051
1052 #line default
1053 #line hidden
1054 WriteLiteralTo(__razor_helper_writer, "\"");
1055
1056 WriteLiteralTo(__razor_helper_writer, " data-position=\"");
1057
1058
1059 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1060 WriteTo(__razor_helper_writer, productLoopCount);
1061
1062
1063 #line default
1064 #line hidden
1065 WriteLiteralTo(__razor_helper_writer, "\"");
1066
1067 WriteLiteralTo(__razor_helper_writer, " data-brand=\'");
1068
1069
1070 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1071 WriteTo(__razor_helper_writer, productManufacturer.Replace("''", "\\\"").Replace("'", ""));
1072
1073
1074 #line default
1075 #line hidden
1076 WriteLiteralTo(__razor_helper_writer, "\'");
1077
1078 WriteLiteralTo(__razor_helper_writer, " data-category=\'");
1079
1080
1081 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1082 WriteTo(__razor_helper_writer, productCategoryName);
1083
1084
1085 #line default
1086 #line hidden
1087 WriteLiteralTo(__razor_helper_writer, "\'");
1088
1089 WriteLiteralTo(__razor_helper_writer, " data-listid=\"");
1090
1091
1092 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1093 WriteTo(__razor_helper_writer, listId);
1094
1095
1096 #line default
1097 #line hidden
1098 WriteLiteralTo(__razor_helper_writer, "\"");
1099
1100 WriteLiteralTo(__razor_helper_writer, " data-listname=\"");
1101
1102
1103 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1104 WriteTo(__razor_helper_writer, listName);
1105
1106
1107 #line default
1108 #line hidden
1109 WriteLiteralTo(__razor_helper_writer, "\"");
1110
1111 WriteLiteralTo(__razor_helper_writer, " data-variantid=\"");
1112
1113
1114 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1115 WriteTo(__razor_helper_writer, productVariantId);
1116
1117
1118 #line default
1119 #line hidden
1120 WriteLiteralTo(__razor_helper_writer, "\"");
1121
1122 WriteLiteralTo(__razor_helper_writer, " data-gtmprice=\"");
1123
1124
1125 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1126 WriteTo(__razor_helper_writer, gtmPrice);
1127
1128
1129 #line default
1130 #line hidden
1131 WriteLiteralTo(__razor_helper_writer, "\"");
1132
1133 WriteLiteralTo(__razor_helper_writer, " data-gtmdiscount=\"");
1134
1135
1136 #line 306 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1137 WriteTo(__razor_helper_writer, gtmDiscount);
1138
1139
1140 #line default
1141 #line hidden
1142 WriteLiteralTo(__razor_helper_writer, "\"");
1143
1144 WriteLiteralTo(__razor_helper_writer, "></a>\r\n\t</div>\r\n");
1145
1146
1147 #line 308 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1148
1149
1150 #line default
1151 #line hidden
1152 });
1153
1154 #line 308 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1155 }
1156 #line default
1157 #line hidden
1158
1159
1160 #line 310 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1161 public RazorEngine.Templating.TemplateWriter renderProductSliderItem(LoopItem product, string productdetailPriceSuffix, string WithVATSuffix, string FormattedSuffix, bool enableShoppingCart, bool displayPrice, bool enableProductStock, string listId, string listname, EcomConfig EcommerceConfiguration) {
1162 #line default
1163 #line hidden
1164 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
1165
1166 #line 310 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1167
1168
1169
1170 #line default
1171 #line hidden
1172 WriteLiteralTo(__razor_helper_writer, "\t<li");
1173
1174 WriteLiteralTo(__razor_helper_writer, " class=\"products-module__slider-cell\"");
1175
1176 WriteLiteralTo(__razor_helper_writer, ">\r\n");
1177
1178 WriteLiteralTo(__razor_helper_writer, "\t\t");
1179
1180
1181 #line 312 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1182 WriteTo(__razor_helper_writer, renderProduct(product, productdetailPriceSuffix, WithVATSuffix, FormattedSuffix, enableShoppingCart, displayPrice, enableProductStock, listId, listname, EcommerceConfiguration));
1183
1184
1185 #line default
1186 #line hidden
1187 WriteLiteralTo(__razor_helper_writer, "\r\n\t</li>\r\n");
1188
1189
1190 #line 314 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1191
1192
1193 #line default
1194 #line hidden
1195 });
1196
1197 #line 314 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1198 }
1199 #line default
1200 #line hidden
1201
1202
1203 #line 316 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1204 public RazorEngine.Templating.TemplateWriter renderReviewIndicator(string progressbarColor, int value, string flexDirection, bool boolReviews, int CommentCount)
1205 {
1206 #line default
1207 #line hidden
1208 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
1209
1210 #line 317 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1211
1212 int ratingPercentage = (100 / 5) * value;
1213
1214
1215
1216 #line default
1217 #line hidden
1218 WriteLiteralTo(__razor_helper_writer, "\t<section");
1219
1220 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 16194), Tuple.Create("\"", 16289)
1221 , Tuple.Create(Tuple.Create("", 16202), Tuple.Create("display:", 16202), true)
1222 , Tuple.Create(Tuple.Create(" ", 16210), Tuple.Create("flex;", 16211), true)
1223 , Tuple.Create(Tuple.Create(" ", 16216), Tuple.Create("flex-direction:", 16217), true)
1224
1225 #line 320 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1226 , Tuple.Create(Tuple.Create(" ", 16232), Tuple.Create<System.Object, System.Int32>(flexDirection
1227
1228 #line default
1229 #line hidden
1230 , 16233), false)
1231 , Tuple.Create(Tuple.Create("", 16247), Tuple.Create(";", 16247), true)
1232 , Tuple.Create(Tuple.Create(" ", 16248), Tuple.Create("position:", 16249), true)
1233 , Tuple.Create(Tuple.Create(" ", 16258), Tuple.Create("relative;", 16259), true)
1234 , Tuple.Create(Tuple.Create(" ", 16268), Tuple.Create("align-items:", 16269), true)
1235 , Tuple.Create(Tuple.Create(" ", 16281), Tuple.Create("center;", 16282), true)
1236 );
1237
1238 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<div");
1239
1240 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator\"");
1241
1242 WriteLiteralTo(__razor_helper_writer, " style=\"display: flex; flex-direction: row;\"");
1243
1244 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<div");
1245
1246 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator-progressbar\"");
1247
1248 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 16419), Tuple.Create("\"", 16501)
1249 , Tuple.Create(Tuple.Create("", 16427), Tuple.Create("width:", 16427), true)
1250
1251 #line 322 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1252 , Tuple.Create(Tuple.Create(" ", 16433), Tuple.Create<System.Object, System.Int32>(ratingPercentage.ToString()
1253
1254 #line default
1255 #line hidden
1256 , 16434), false)
1257 , Tuple.Create(Tuple.Create("", 16462), Tuple.Create("%;", 16462), true)
1258 , Tuple.Create(Tuple.Create(" ", 16464), Tuple.Create("background-color:", 16465), true)
1259
1260 #line 322 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1261 , Tuple.Create(Tuple.Create(" ", 16482), Tuple.Create<System.Object, System.Int32>(progressbarColor
1262
1263 #line default
1264 #line hidden
1265 , 16483), false)
1266 , Tuple.Create(Tuple.Create("", 16500), Tuple.Create(";", 16500), true)
1267 );
1268
1269 WriteLiteralTo(__razor_helper_writer, "></div>\r\n\t\t\t<ul");
1270
1271 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator-star-list\"");
1272
1273 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t<li");
1274
1275 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator-star-list-item\"");
1276
1277 WriteLiteralTo(__razor_helper_writer, "></li>\r\n\t\t\t\t<li");
1278
1279 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator-star-list-item\"");
1280
1281 WriteLiteralTo(__razor_helper_writer, "></li>\r\n\t\t\t\t<li");
1282
1283 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator-star-list-item\"");
1284
1285 WriteLiteralTo(__razor_helper_writer, "></li>\r\n\t\t\t\t<li");
1286
1287 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator-star-list-item\"");
1288
1289 WriteLiteralTo(__razor_helper_writer, "></li>\r\n\t\t\t\t<li");
1290
1291 WriteLiteralTo(__razor_helper_writer, " class=\"reviews__indicator-star-list-item\"");
1292
1293 WriteLiteralTo(__razor_helper_writer, "></li>\r\n\t\t\t</ul>\r\n\t\t</div>\r\n\t\t<span");
1294
1295 WriteLiteralTo(__razor_helper_writer, " style=\"display: flex; position: relative; font-size: 12px; line-height: initial;" +
1296 "\"");
1297
1298 WriteLiteralTo(__razor_helper_writer, ">\r\n");
1299
1300 WriteLiteralTo(__razor_helper_writer, "\t\t\t");
1301
1302
1303 #line 332 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1304 WriteTo(__razor_helper_writer, value);
1305
1306
1307 #line default
1308 #line hidden
1309 WriteLiteralTo(__razor_helper_writer, " / 5\r\n");
1310
1311
1312 #line 333 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1313
1314
1315 #line default
1316 #line hidden
1317
1318 #line 333 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1319 if (boolReviews)
1320 {
1321
1322 #line default
1323 #line hidden
1324 WriteLiteralTo(__razor_helper_writer, "(");
1325
1326
1327 #line 334 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1328 WriteTo(__razor_helper_writer, CommentCount);
1329
1330
1331 #line default
1332 #line hidden
1333 WriteLiteralTo(__razor_helper_writer, " reviews)");
1334
1335
1336 #line 334 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1337 }
1338
1339
1340 #line default
1341 #line hidden
1342 WriteLiteralTo(__razor_helper_writer, "\t\t</span>\r\n\t</section>\r\n");
1343
1344
1345 #line 337 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1346
1347
1348
1349 #line default
1350 #line hidden
1351 });
1352
1353 #line 338 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1354 }
1355 #line default
1356 #line hidden
1357
1358
1359 #line 340 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1360 public RazorEngine.Templating.TemplateWriter RenderProductModuleUSP(string USP, string USPInfo)
1361 {
1362 #line default
1363 #line hidden
1364 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
1365
1366 #line 341 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1367
1368 if (!string.IsNullOrWhiteSpace(USP))
1369 {
1370
1371
1372 #line default
1373 #line hidden
1374 WriteLiteralTo(__razor_helper_writer, "\t\t<li");
1375
1376 WriteLiteralTo(__razor_helper_writer, " class=\"pdp-usplist__item pdp-usplist__item--product\"");
1377
1378 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<i");
1379
1380 WriteLiteralTo(__razor_helper_writer, " class=\"fal fa-check\"");
1381
1382 WriteLiteralTo(__razor_helper_writer, "></i>\r\n");
1383
1384 WriteLiteralTo(__razor_helper_writer, "\t\t\t");
1385
1386
1387 #line 346 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1388 WriteTo(__razor_helper_writer, USP);
1389
1390
1391 #line default
1392 #line hidden
1393 WriteLiteralTo(__razor_helper_writer, "\r\n");
1394
1395
1396 #line 347 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1397
1398
1399 #line default
1400 #line hidden
1401
1402 #line 347 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1403 if (!string.IsNullOrWhiteSpace(USPInfo))
1404 {
1405
1406
1407 #line default
1408 #line hidden
1409 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<span");
1410
1411 WriteLiteralTo(__razor_helper_writer, " data-tippy-content=\"");
1412
1413
1414 #line 349 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1415 WriteTo(__razor_helper_writer, USPInfo);
1416
1417
1418 #line default
1419 #line hidden
1420 WriteLiteralTo(__razor_helper_writer, "\"");
1421
1422 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<i");
1423
1424 WriteLiteralTo(__razor_helper_writer, " class=\"fal fa-info-circle\"");
1425
1426 WriteLiteralTo(__razor_helper_writer, "></i>\r\n\t\t\t\t</span>\r\n");
1427
1428
1429 #line 352 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1430 }
1431
1432
1433 #line default
1434 #line hidden
1435 WriteLiteralTo(__razor_helper_writer, "\t\t</li>\r\n");
1436
1437
1438 #line 354 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1439 }
1440
1441
1442 #line default
1443 #line hidden
1444 });
1445
1446 #line 355 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1447 }
1448 #line default
1449 #line hidden
1450
1451
1452 #line 357 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1453 public RazorEngine.Templating.TemplateWriter renderProductCompareButton(string productId, string name, string thumbnail) {
1454 #line default
1455 #line hidden
1456 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
1457
1458 #line 357 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1459
1460 string title = Translate("ProductBlockAction.Compare", "Add to product compare");
1461
1462
1463 #line default
1464 #line hidden
1465 WriteLiteralTo(__razor_helper_writer, "\t<button");
1466
1467 WriteLiteralTo(__razor_helper_writer, " class=\"po-block__action-btn po-block__action-btn--compare\"");
1468
1469 WriteAttributeTo(__razor_helper_writer, "aria-label", Tuple.Create(" aria-label=\"", 17685), Tuple.Create("\"", 17704)
1470
1471 #line 359 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1472 , Tuple.Create(Tuple.Create("", 17698), Tuple.Create<System.Object, System.Int32>(title
1473
1474 #line default
1475 #line hidden
1476 , 17698), false)
1477 );
1478
1479 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 17705), Tuple.Create("\"", 17719)
1480
1481 #line 359 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1482 , Tuple.Create(Tuple.Create("", 17713), Tuple.Create<System.Object, System.Int32>(title
1483
1484 #line default
1485 #line hidden
1486 , 17713), false)
1487 );
1488
1489 WriteLiteralTo(__razor_helper_writer, " data-prodid=\"");
1490
1491
1492 #line 359 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1493 WriteTo(__razor_helper_writer, productId);
1494
1495
1496 #line default
1497 #line hidden
1498 WriteLiteralTo(__razor_helper_writer, "\"");
1499
1500 WriteLiteralTo(__razor_helper_writer, " data-imgsmall=\"");
1501
1502
1503 #line 359 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1504 WriteTo(__razor_helper_writer, thumbnail);
1505
1506
1507 #line default
1508 #line hidden
1509 WriteLiteralTo(__razor_helper_writer, "\"");
1510
1511 WriteLiteralTo(__razor_helper_writer, " data-prodname=\"");
1512
1513
1514 #line 359 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1515 WriteTo(__razor_helper_writer, name);
1516
1517
1518 #line default
1519 #line hidden
1520 WriteLiteralTo(__razor_helper_writer, "\"");
1521
1522 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<i");
1523
1524 WriteLiteralTo(__razor_helper_writer, " class=\"fas fa-exchange-alt\"");
1525
1526 WriteLiteralTo(__razor_helper_writer, "></i>\r\n\t</button>\r\n");
1527
1528
1529 #line 362 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1530
1531
1532 #line default
1533 #line hidden
1534 });
1535
1536 #line 362 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1537 }
1538 #line default
1539 #line hidden
1540
1541
1542 #line 364 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1543 public RazorEngine.Templating.TemplateWriter renderProductFavoriteButton(LoopItem product, string listId, string listName) {
1544 #line default
1545 #line hidden
1546 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
1547
1548 #line 364 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1549
1550 string productId = product.GetString("Ecom:Product.ID");
1551 string productVariantId = !string.IsNullOrWhiteSpace(product.GetString("Ecom:Product.VariantID")) ? product.GetString("Ecom:Product.VariantID") : "";
1552 string productName = product.GetString("Ecom:Product.Name").Replace("''", "\\\"").Replace("'", "");
1553 string productNumber = product.GetString("Ecom:Product.Number");
1554 string gtmDiscount = product.GetString("Ecom:Product.Discount.TotalAmount.Price.Value").Replace(",", ".");
1555 string gtmPrice = product.GetString("Ecom:Product.Price.Price.Value").Replace(",", ".");
1556 string gtmValue = product.GetString("Ecom:Product.Discount.Price.Value").Replace(",", ".");
1557 var productCategory = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID"));
1558 string productCategoryName = productCategory != null ? productCategory.Name.Replace("''", "\\\"").Replace("'", "") : "";
1559 string productManufacturer = product.GetString("Ecom:Manufacturer.Name").Replace("''", "\\\"").Replace("'", "");
1560
1561 string title = Translate("ProductBlockAction.Wishlist", "Add to wish list");
1562 bool isActive = Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites.UserExtensions.IsProductInAnyFavoriteList(Pageview.User, productId, productVariantId);
1563 string activeClass = isActive ? "po-block__action-btn--visible" : "";
1564
1565
1566
1567 #line default
1568 #line hidden
1569 WriteLiteralTo(__razor_helper_writer, "\t<button");
1570
1571 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 19313), Tuple.Create("\"", 19385)
1572 , Tuple.Create(Tuple.Create("", 19321), Tuple.Create("po-block__action-btn", 19321), true)
1573 , Tuple.Create(Tuple.Create(" ", 19341), Tuple.Create("po-block__action-btn--wishlist", 19342), true)
1574
1575 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1576 , Tuple.Create(Tuple.Create(" ", 19372), Tuple.Create<System.Object, System.Int32>(activeClass
1577
1578 #line default
1579 #line hidden
1580 , 19373), false)
1581 );
1582
1583 WriteAttributeTo(__razor_helper_writer, "aria-label", Tuple.Create(" aria-label=\"", 19386), Tuple.Create("\"", 19405)
1584
1585 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1586 , Tuple.Create(Tuple.Create("", 19399), Tuple.Create<System.Object, System.Int32>(title
1587
1588 #line default
1589 #line hidden
1590 , 19399), false)
1591 );
1592
1593 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 19406), Tuple.Create("\"", 19420)
1594
1595 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1596 , Tuple.Create(Tuple.Create("", 19414), Tuple.Create<System.Object, System.Int32>(title
1597
1598 #line default
1599 #line hidden
1600 , 19414), false)
1601 );
1602
1603 WriteLiteralTo(__razor_helper_writer, " data-id=\"");
1604
1605
1606 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1607 WriteTo(__razor_helper_writer, productId);
1608
1609
1610 #line default
1611 #line hidden
1612 WriteLiteralTo(__razor_helper_writer, "\"");
1613
1614 WriteLiteralTo(__razor_helper_writer, " data-offcanvas-target=\"favoritelist\"");
1615
1616 WriteLiteralTo(__razor_helper_writer, " data-productid=\"");
1617
1618
1619 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1620 WriteTo(__razor_helper_writer, productId);
1621
1622
1623 #line default
1624 #line hidden
1625 WriteLiteralTo(__razor_helper_writer, "\"");
1626
1627 WriteLiteralTo(__razor_helper_writer, " data-variantid=\"");
1628
1629
1630 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1631 WriteTo(__razor_helper_writer, productVariantId);
1632
1633
1634 #line default
1635 #line hidden
1636 WriteLiteralTo(__razor_helper_writer, "\"");
1637
1638 WriteLiteralTo(__razor_helper_writer, " data-number=\"");
1639
1640
1641 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1642 WriteTo(__razor_helper_writer, productNumber);
1643
1644
1645 #line default
1646 #line hidden
1647 WriteLiteralTo(__razor_helper_writer, "\"");
1648
1649 WriteLiteralTo(__razor_helper_writer, " data-name=\'");
1650
1651
1652 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1653 WriteTo(__razor_helper_writer, productName);
1654
1655
1656 #line default
1657 #line hidden
1658 WriteLiteralTo(__razor_helper_writer, "\'");
1659
1660 WriteLiteralTo(__razor_helper_writer, " data-position=\"");
1661
1662
1663 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1664 WriteTo(__razor_helper_writer, product.GetInteger("Products.LoopCounter"));
1665
1666
1667 #line default
1668 #line hidden
1669 WriteLiteralTo(__razor_helper_writer, "\"");
1670
1671 WriteLiteralTo(__razor_helper_writer, " data-brand=\'");
1672
1673
1674 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1675 WriteTo(__razor_helper_writer, productManufacturer);
1676
1677
1678 #line default
1679 #line hidden
1680 WriteLiteralTo(__razor_helper_writer, "\'");
1681
1682 WriteLiteralTo(__razor_helper_writer, " data-category=\'");
1683
1684
1685 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1686 WriteTo(__razor_helper_writer, productCategoryName);
1687
1688
1689 #line default
1690 #line hidden
1691 WriteLiteralTo(__razor_helper_writer, "\'");
1692
1693 WriteLiteralTo(__razor_helper_writer, " data-listid=\"");
1694
1695
1696 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1697 WriteTo(__razor_helper_writer, listId);
1698
1699
1700 #line default
1701 #line hidden
1702 WriteLiteralTo(__razor_helper_writer, "\"");
1703
1704 WriteLiteralTo(__razor_helper_writer, " data-listname=\"");
1705
1706
1707 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1708 WriteTo(__razor_helper_writer, listName);
1709
1710
1711 #line default
1712 #line hidden
1713 WriteLiteralTo(__razor_helper_writer, "\"");
1714
1715 WriteLiteralTo(__razor_helper_writer, " data-gtmprice=\"");
1716
1717
1718 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1719 WriteTo(__razor_helper_writer, gtmPrice);
1720
1721
1722 #line default
1723 #line hidden
1724 WriteLiteralTo(__razor_helper_writer, "\"");
1725
1726 WriteLiteralTo(__razor_helper_writer, " data-gtmdiscount=\"");
1727
1728
1729 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1730 WriteTo(__razor_helper_writer, gtmDiscount);
1731
1732
1733 #line default
1734 #line hidden
1735 WriteLiteralTo(__razor_helper_writer, "\"");
1736
1737 WriteLiteralTo(__razor_helper_writer, " data-gtmvalue=\"");
1738
1739
1740 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1741 WriteTo(__razor_helper_writer, gtmValue);
1742
1743
1744 #line default
1745 #line hidden
1746 WriteLiteralTo(__razor_helper_writer, "\"");
1747
1748 WriteLiteralTo(__razor_helper_writer, " data-currencycode=\"");
1749
1750
1751 #line 380 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1752 WriteTo(__razor_helper_writer, Dynamicweb.Ecommerce.Common.Context.Currency.Code);
1753
1754
1755 #line default
1756 #line hidden
1757 WriteLiteralTo(__razor_helper_writer, "\"");
1758
1759 WriteLiteralTo(__razor_helper_writer, ">\r\n");
1760
1761
1762 #line 381 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1763
1764
1765 #line default
1766 #line hidden
1767
1768 #line 381 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1769 if(isActive) {
1770
1771
1772 #line default
1773 #line hidden
1774 WriteLiteralTo(__razor_helper_writer, "\t\t\t<i");
1775
1776 WriteLiteralTo(__razor_helper_writer, " class=\"fas fa-heart\"");
1777
1778 WriteLiteralTo(__razor_helper_writer, "></i>\r\n");
1779
1780
1781 #line 383 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1782 } else {
1783
1784
1785 #line default
1786 #line hidden
1787 WriteLiteralTo(__razor_helper_writer, "\t\t\t<i");
1788
1789 WriteLiteralTo(__razor_helper_writer, " class=\"far fa-heart\"");
1790
1791 WriteLiteralTo(__razor_helper_writer, "></i>\r\n");
1792
1793
1794 #line 385 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1795 }
1796
1797
1798 #line default
1799 #line hidden
1800 WriteLiteralTo(__razor_helper_writer, "\t</button>\r\n");
1801
1802
1803 #line 387 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1804
1805
1806
1807 #line default
1808 #line hidden
1809 });
1810
1811 #line 388 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1812 }
1813 #line default
1814 #line hidden
1815
1816
1817 #line 476 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1818
1819 int getFirstpage(int currentPage, int totalPages, double pagesToShow)
1820 {
1821 int firstPage = 0;
1822 if(pagesToShow >= totalPages) {
1823 firstPage = 1;
1824 } else {
1825 firstPage = currentPage - Convert.ToInt32(Math.Floor(pagesToShow / 2));
1826 firstPage = firstPage < 1 ? 1 : firstPage;
1827 }
1828 return firstPage;
1829 }
1830
1831 int getLastpage(int currentPage, int totalPages, double pagesToShow, int firstPage)
1832 {
1833 int lastPage = 0;
1834 lastPage = firstPage + Convert.ToInt32(pagesToShow);
1835 if (lastPage > totalPages) {
1836 lastPage = totalPages;
1837 }
1838 return lastPage;
1839 }
1840
1841 #line default
1842 #line hidden
1843
1844
1845 public RazorEngine_446218043f404934a537ff4323303b2d() {
1846 }
1847
1848 public override void Execute() {
1849 WriteLiteral("\r\n\r\n");
1850
1851 WriteLiteral("\r\n");
1852
1853
1854 #line 11 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1855
1856 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration");
1857 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>
1858 ();
1859 EcomConfig EcommerceConfiguration = mc.EcomConfiguration;
1860
1861 bool FormattedBool = EcommerceConfiguration.FormattedPrices;
1862 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True";
1863 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers;
1864 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber;
1865 if(pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) {
1866 WithVATBool = false;
1867 }
1868 if(pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) {
1869 WithVATBool = false;
1870 }
1871 bool hidePricesForGuests = EcommerceConfiguration.HidePricesForGuests;
1872 bool hideShoppingCartForGuests = EcommerceConfiguration.HideShoppingCartForGuests;
1873 bool hideStockForGuests = EcommerceConfiguration.HideStockForGuests;
1874
1875 string WithVATSuffix = WithVATBool ? "WithVAT" : "WithoutVAT";
1876 string FormattedSuffix = FormattedBool ? "Formatted" : "";
1877 string priceVatFormattedSuffix = WithVATSuffix + FormattedSuffix;
1878
1879 bool enableShoppingCart = hideShoppingCartForGuests && Pageview.User == null ? false : Pageview.Area.Item["ConfigModuleShoppingCart"] != null ? (bool)Pageview.Area.Item["ConfigModuleShoppingCart"] : false;
1880 bool displayPrice = hidePricesForGuests ? Pageview.User != null : true;
1881 bool enableProductStock = hideStockForGuests ? Pageview.User != null : true;
1882
1883 string ProductdetailPriceSuffixWithVAT = Translate("Productdetail.Price.Suffix.WithVAT", "Incl. VAT");
1884 string ProductdetailPriceSuffixWithoutVAT = Translate("Productdetail.Price.Suffix.WithoutVAT", "Excl. VAT");
1885 string ProductdetailPriceSuffix = WithVATBool ? ProductdetailPriceSuffixWithVAT : ProductdetailPriceSuffixWithoutVAT;
1886
1887
1888 #line default
1889 #line hidden
1890 WriteLiteral("\r\n\r\n");
1891
1892 WriteLiteral("\r\n");
1893
1894 WriteLiteral("\r\n");
1895
1896 WriteLiteral("\r\n");
1897
1898 WriteLiteral("\r\n");
1899
1900 WriteLiteral("\r\n");
1901
1902 WriteLiteral("\r\n");
1903
1904 WriteLiteral("\r\n\r\n");
1905
1906
1907 #line 391 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1908
1909 string listId = "search_results";
1910 string listName = "Search results";
1911
1912
1913 #line default
1914 #line hidden
1915 WriteLiteral("\r\n\r\n");
1916
1917
1918 #line 396 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1919 if(GetLoop("Products").Any())
1920 {
1921
1922
1923 #line default
1924 #line hidden
1925 WriteLiteral(" <p>");
1926
1927
1928 #line 398 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1929 Write(string.Format(Translate("Search.ProductsFoundCount", "{0} results"), GetString("Ecom:ProductList.PageProdCnt")));
1930
1931
1932 #line default
1933 #line hidden
1934 WriteLiteral("</p>\r\n");
1935
1936 WriteLiteral(" <div");
1937
1938 WriteLiteral(" class=\"content-product-list\"");
1939
1940 WriteLiteral(">\r\n");
1941
1942
1943 #line 400 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1944
1945
1946 #line default
1947 #line hidden
1948
1949 #line 400 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1950 foreach (LoopItem product in GetLoop("Products"))
1951 {
1952
1953
1954 #line default
1955 #line hidden
1956
1957 #line 402 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1958 Write(renderProduct(product, ProductdetailPriceSuffix, WithVATSuffix, FormattedSuffix, enableShoppingCart, displayPrice, enableProductStock, listId, listName, EcommerceConfiguration));
1959
1960
1961 #line default
1962 #line hidden
1963
1964 #line 402 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1965 ;
1966 }
1967
1968
1969 #line default
1970 #line hidden
1971 WriteLiteral(" </div>\r\n");
1972
1973
1974 #line 405 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1975 } else {
1976
1977
1978 #line default
1979 #line hidden
1980 WriteLiteral(" <p>");
1981
1982
1983 #line 406 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1984 Write(Translate("Search.NoProductsFound", "No products found"));
1985
1986
1987 #line default
1988 #line hidden
1989 WriteLiteral("</p>\r\n");
1990
1991
1992 #line 407 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
1993 }
1994
1995
1996 #line default
1997 #line hidden
1998 WriteLiteral("\r\n");
1999
2000
2001 #line 409 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2002 if(GetLoop("Products").Any() && GetInteger("Ecom:ProductList.TotalPages") > 1)
2003 {
2004 int totalPages = GetInteger("Ecom:ProductList.TotalPages");
2005 int currentPagenumber = GetInteger("Ecom:ProductList.CurrentPage");
2006 int previousPagenumber = currentPagenumber - 1;
2007 int nextPagenumber = currentPagenumber + 1;
2008 int firstPage = getFirstpage(currentPagenumber, totalPages, 7);
2009 int lastPage = getLastpage(currentPagenumber, totalPages, 7, firstPage);
2010
2011 string searchQuery = Dynamicweb.Context.Current.Request["q"];
2012 string firstPageUrl = string.Format("/Default.aspx?ID={0}&PageNum={1}&q={2}", Pageview.ID, 1, searchQuery);
2013 string prevPageLink = GetString("Ecom:ProductList.PrevPage.Clean");
2014 string nextPageLink = GetString("Ecom:ProductList.NextPage.Clean");
2015 string lastPageUrl = string.Format("/Default.aspx?ID={0}&PageNum={1}&q={2}", Pageview.ID, totalPages, searchQuery);
2016
2017
2018
2019 #line default
2020 #line hidden
2021 WriteLiteral(" <nav");
2022
2023 WriteLiteral(" class=\"pagination\"");
2024
2025 WriteLiteral(" role=\"navigation\"");
2026
2027 WriteLiteral(" aria-label=\"Pagination navigation\"");
2028
2029 WriteLiteral(">\r\n <ul");
2030
2031 WriteLiteral(" class=\"pagination__list\"");
2032
2033 WriteLiteral(">\r\n\r\n");
2034
2035
2036 #line 427 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2037
2038
2039 #line default
2040 #line hidden
2041
2042 #line 427 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2043 if(!string.IsNullOrWhiteSpace(prevPageLink)) {
2044
2045
2046 #line default
2047 #line hidden
2048 WriteLiteral(" <li");
2049
2050 WriteLiteral(" class=\"pagination__list-item\"");
2051
2052 WriteLiteral(">\r\n <a");
2053
2054 WriteAttribute("href", Tuple.Create(" href=\"", 21898), Tuple.Create("\"", 21918)
2055
2056 #line 429 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2057 , Tuple.Create(Tuple.Create("", 21905), Tuple.Create<System.Object, System.Int32>(firstPageUrl
2058
2059 #line default
2060 #line hidden
2061 , 21905), false)
2062 );
2063
2064 WriteLiteral(" class=\"pagination__button\"");
2065
2066 WriteLiteral(" aria-label=\"Go to page 1\"");
2067
2068 WriteLiteral(">\r\n <i");
2069
2070 WriteLiteral(" class=\"fal fa-arrow-to-left text-base\"");
2071
2072 WriteLiteral("></i>\r\n </a>\r\n </li>\r\n");
2073
2074 WriteLiteral(" <li");
2075
2076 WriteLiteral(" class=\"pagination__list-item\"");
2077
2078 WriteLiteral(">\r\n <a");
2079
2080 WriteAttribute("href", Tuple.Create(" href=\"", 22170), Tuple.Create("\"", 22190)
2081
2082 #line 434 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2083 , Tuple.Create(Tuple.Create("", 22177), Tuple.Create<System.Object, System.Int32>(prevPageLink
2084
2085 #line default
2086 #line hidden
2087 , 22177), false)
2088 );
2089
2090 WriteLiteral(" class=\"pagination__button\"");
2091
2092 WriteAttribute("aria-label", Tuple.Create(" aria-label=\"", 22218), Tuple.Create("\"", 22261)
2093 , Tuple.Create(Tuple.Create("", 22231), Tuple.Create("Go", 22231), true)
2094 , Tuple.Create(Tuple.Create(" ", 22233), Tuple.Create("to", 22234), true)
2095 , Tuple.Create(Tuple.Create(" ", 22236), Tuple.Create("page", 22237), true)
2096
2097 #line 434 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2098 , Tuple.Create(Tuple.Create(" ", 22241), Tuple.Create<System.Object, System.Int32>(previousPagenumber
2099
2100 #line default
2101 #line hidden
2102 , 22242), false)
2103 );
2104
2105 WriteLiteral(">\r\n <i");
2106
2107 WriteLiteral(" class=\"fal fa-arrow-left text-base\"");
2108
2109 WriteLiteral("></i>\r\n </a>\r\n </li>\r\n");
2110
2111
2112 #line 438 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2113 }
2114
2115
2116 #line default
2117 #line hidden
2118 WriteLiteral("\r\n <li");
2119
2120 WriteLiteral(" class=\"pagination__list-item\"");
2121
2122 WriteLiteral(">\r\n <ul");
2123
2124 WriteLiteral(" class=\"pagination__pages\"");
2125
2126 WriteLiteral(">\r\n");
2127
2128
2129 #line 442 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2130
2131
2132 #line default
2133 #line hidden
2134
2135 #line 442 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2136 for(int i = @firstPage; i <= @lastPage; i++)
2137 {
2138 bool isActivePage = @currentPagenumber == i;
2139 string activePageClass = isActivePage ? "pagination__button--active" : "";
2140 string pageUrl = string.Format("/Default.aspx?ID={0}&PageNum={1}&q={2}", Pageview.ID, i, searchQuery);
2141 string ariaLabel = isActivePage ? string.Format("aria-label='Current Page, Page {0}' aria-current='true'", i) : string.Format("aria-label='Go to page {0}'", i);
2142
2143
2144
2145 #line default
2146 #line hidden
2147 WriteLiteral("<li");
2148
2149 WriteLiteral(" class=\"pagination__list-item\"");
2150
2151 WriteLiteral(">\r\n <a");
2152
2153 WriteAttribute("href", Tuple.Create(" href=\"", 23170), Tuple.Create("\"", 23185)
2154
2155 #line 450 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2156 , Tuple.Create(Tuple.Create("", 23177), Tuple.Create<System.Object, System.Int32>(pageUrl
2157
2158 #line default
2159 #line hidden
2160 , 23177), false)
2161 );
2162
2163 WriteAttribute("class", Tuple.Create(" class=\"", 23186), Tuple.Create("\"", 23229)
2164 , Tuple.Create(Tuple.Create("", 23194), Tuple.Create("pagination__button", 23194), true)
2165
2166 #line 450 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2167 , Tuple.Create(Tuple.Create(" ", 23212), Tuple.Create<System.Object, System.Int32>(activePageClass
2168
2169 #line default
2170 #line hidden
2171 , 23213), false)
2172 );
2173
2174 WriteLiteral(" ");
2175
2176
2177 #line 450 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2178 Write(ariaLabel);
2179
2180
2181 #line default
2182 #line hidden
2183 WriteLiteral(">\r\n <span");
2184
2185 WriteLiteral(" class=\"pagination__text\"");
2186
2187 WriteLiteral(">");
2188
2189
2190 #line 451 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2191 Write(i);
2192
2193
2194 #line default
2195 #line hidden
2196 WriteLiteral("</span>\r\n </a>\r\n </li>\r\n");
2197
2198
2199 #line 454 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2200 }
2201
2202
2203 #line default
2204 #line hidden
2205 WriteLiteral(" </ul>\r\n </li>\r\n\r\n");
2206
2207
2208 #line 458 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2209
2210
2211 #line default
2212 #line hidden
2213
2214 #line 458 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2215 if(!string.IsNullOrWhiteSpace(nextPageLink)) {
2216
2217
2218 #line default
2219 #line hidden
2220 WriteLiteral(" <li");
2221
2222 WriteLiteral(" class=\"pagination__list-item\"");
2223
2224 WriteLiteral(">\r\n <a");
2225
2226 WriteAttribute("href", Tuple.Create(" href=\"", 23585), Tuple.Create("\"", 23605)
2227
2228 #line 460 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2229 , Tuple.Create(Tuple.Create("", 23592), Tuple.Create<System.Object, System.Int32>(nextPageLink
2230
2231 #line default
2232 #line hidden
2233 , 23592), false)
2234 );
2235
2236 WriteLiteral(" class=\"pagination__button\"");
2237
2238 WriteAttribute("aria-label", Tuple.Create(" aria-label=\"", 23633), Tuple.Create("\"", 23672)
2239 , Tuple.Create(Tuple.Create("", 23646), Tuple.Create("Go", 23646), true)
2240 , Tuple.Create(Tuple.Create(" ", 23648), Tuple.Create("to", 23649), true)
2241 , Tuple.Create(Tuple.Create(" ", 23651), Tuple.Create("page", 23652), true)
2242
2243 #line 460 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2244 , Tuple.Create(Tuple.Create(" ", 23656), Tuple.Create<System.Object, System.Int32>(nextPagenumber
2245
2246 #line default
2247 #line hidden
2248 , 23657), false)
2249 );
2250
2251 WriteLiteral(">\r\n <i");
2252
2253 WriteLiteral(" class=\"fal fa-arrow-right text-base\"");
2254
2255 WriteLiteral("></i>\r\n </a>\r\n </li>\r\n");
2256
2257 WriteLiteral(" <li");
2258
2259 WriteLiteral(" class=\"pagination__list-item\"");
2260
2261 WriteLiteral(">\r\n <a");
2262
2263 WriteAttribute("href", Tuple.Create(" href=\"", 23869), Tuple.Create("\"", 23888)
2264
2265 #line 465 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2266 , Tuple.Create(Tuple.Create("", 23876), Tuple.Create<System.Object, System.Int32>(lastPageUrl
2267
2268 #line default
2269 #line hidden
2270 , 23876), false)
2271 );
2272
2273 WriteLiteral(" class=\"pagination__button\"");
2274
2275 WriteAttribute("aria-label", Tuple.Create(" aria-label=\"", 23916), Tuple.Create("\"", 23951)
2276 , Tuple.Create(Tuple.Create("", 23929), Tuple.Create("Go", 23929), true)
2277 , Tuple.Create(Tuple.Create(" ", 23931), Tuple.Create("to", 23932), true)
2278 , Tuple.Create(Tuple.Create(" ", 23934), Tuple.Create("page", 23935), true)
2279
2280 #line 465 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2281 , Tuple.Create(Tuple.Create(" ", 23939), Tuple.Create<System.Object, System.Int32>(totalPages
2282
2283 #line default
2284 #line hidden
2285 , 23940), false)
2286 );
2287
2288 WriteLiteral(">\r\n <i");
2289
2290 WriteLiteral(" class=\"fal fa-arrow-to-right text-base\"");
2291
2292 WriteLiteral("></i>\r\n </a>\r\n </li>\r\n");
2293
2294
2295 #line 469 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2296 }
2297
2298
2299 #line default
2300 #line hidden
2301 WriteLiteral("\r\n </ul>\r\n </nav>\r\n");
2302
2303
2304 #line 473 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2305 }
2306
2307
2308 #line default
2309 #line hidden
2310 WriteLiteral("\r\n\r\n");
2311
2312 WriteLiteral("\r\n");
2313
2314
2315 #line 500 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2316 Write(SnippetStart("DataLayer"));
2317
2318
2319 #line default
2320 #line hidden
2321 WriteLiteral("\r\n\t<text>\r\n<script>\r\nif(window.dataLayer) {\r\n dataLayer.push({\r\n \'event" +
2322 "\': \'view_item_list\',\r\n \'ecommerce\': {\r\n \'item_list_id\': \'");
2323
2324
2325 #line 507 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2326 Write(listId);
2327
2328
2329 #line default
2330 #line hidden
2331 WriteLiteral("\',\r\n \'item_list_name\': \'");
2332
2333
2334 #line 508 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2335 Write(listName);
2336
2337
2338 #line default
2339 #line hidden
2340 WriteLiteral("\',\r\n \'items\': [\r\n");
2341
2342
2343 #line 510 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2344
2345
2346 #line default
2347 #line hidden
2348
2349 #line 510 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2350 foreach (var product in GetLoop("Products")) {
2351 var categoryObject = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID"));
2352 string categoryName = categoryObject != null ? categoryObject.Name.Replace("''", "\\\"").Replace("'", "") : "";
2353
2354
2355 #line default
2356 #line hidden
2357 WriteLiteral(" ");
2358
2359 WriteLiteral("\r\n {\r\n \'item_id\': \'");
2360
2361
2362 #line 515 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2363 Write(product.GetString("Ecom:Product.ID"));
2364
2365
2366 #line default
2367 #line hidden
2368 WriteLiteral("\',\r\n \'item_name\': \'");
2369
2370
2371 #line 516 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2372 Write(product.GetString("Ecom:Product.Name").Replace("''", "\\\"").Replace("'", ""));
2373
2374
2375 #line default
2376 #line hidden
2377 WriteLiteral("\',\r\n \'item_number\': \'");
2378
2379
2380 #line 517 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2381 Write(product.GetString("Ecom:Product.Number"));
2382
2383
2384 #line default
2385 #line hidden
2386 WriteLiteral("\',\r\n \'discount\': ");
2387
2388
2389 #line 518 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2390 Write(product.GetString("Ecom:Product.Discount.TotalAmount.Price.Value").Replace(",", "."));
2391
2392
2393 #line default
2394 #line hidden
2395 WriteLiteral(",\r\n \'index\': ");
2396
2397
2398 #line 519 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2399 Write(product.GetInteger("Products.LoopCounter"));
2400
2401
2402 #line default
2403 #line hidden
2404 WriteLiteral(",\r\n \'item_brand\': \'");
2405
2406
2407 #line 520 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2408 Write(product.GetString("Ecom:Manufacturer.Name").Replace("''", "\\\"").Replace("'", ""));
2409
2410
2411 #line default
2412 #line hidden
2413 WriteLiteral("\',\r\n \'item_category\': \'");
2414
2415
2416 #line 521 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2417 Write(categoryName);
2418
2419
2420 #line default
2421 #line hidden
2422 WriteLiteral("\',\r\n \'item_list_id\': \'");
2423
2424
2425 #line 522 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2426 Write(listId);
2427
2428
2429 #line default
2430 #line hidden
2431 WriteLiteral("\',\r\n\t\t\t\t\t\t\'item_list_name\': \'");
2432
2433
2434 #line 523 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2435 Write(listName);
2436
2437
2438 #line default
2439 #line hidden
2440 WriteLiteral("\',\r\n \'item_variant\': \'");
2441
2442
2443 #line 524 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2444 Write(product.GetString("Ecom:Product.VariantID"));
2445
2446
2447 #line default
2448 #line hidden
2449 WriteLiteral("\',\r\n \'price\': ");
2450
2451
2452 #line 525 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2453 Write(product.GetString("Ecom:Product.Price.Price.Value").Replace(",", "."));
2454
2455
2456 #line default
2457 #line hidden
2458 WriteLiteral(",\r\n \'quantity\': 1,\r\n },\r\n " +
2459 " ");
2460
2461 WriteLiteral("\r\n");
2462
2463
2464 #line 529 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2465 }
2466
2467
2468 #line default
2469 #line hidden
2470 WriteLiteral(" ]\r\n }\r\n });\r\n}\r\n</script>\r\n</text>\r\n\r\n");
2471
2472
2473 #line 537 "D:\dynamicweb.net\Solutions\DeKinder\Productie\files\Templates\Designs\Kinder_generated\eCom\Productlist\ProductListSearch.cshtml"
2474 Write(SnippetEnd("DataLayer"));
2475
2476
2477 #line default
2478 #line hidden
2479 WriteLiteral("\r\n");
2480
2481 }
2482 }
2483 }
2484
1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
2 @using Dynamicweb;
3 @using Bluedesk.DynamicWeb.ItemTypes.Pages;
4 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods;
5 @using System.Linq;
6 @using Dynamicweb.Content;
7
8
9 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
10
11 @{
12 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration");
13 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>
14 ();
15 EcomConfig EcommerceConfiguration = mc.EcomConfiguration;
16
17 bool FormattedBool = EcommerceConfiguration.FormattedPrices;
18 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True";
19 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers;
20 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber;
21 if(pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) {
22 WithVATBool = false;
23 }
24 if(pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) {
25 WithVATBool = false;
26 }
27 bool hidePricesForGuests = EcommerceConfiguration.HidePricesForGuests;
28 bool hideShoppingCartForGuests = EcommerceConfiguration.HideShoppingCartForGuests;
29 bool hideStockForGuests = EcommerceConfiguration.HideStockForGuests;
30
31 string WithVATSuffix = WithVATBool ? "WithVAT" : "WithoutVAT";
32 string FormattedSuffix = FormattedBool ? "Formatted" : "";
33 string priceVatFormattedSuffix = WithVATSuffix + FormattedSuffix;
34
35 bool enableShoppingCart = hideShoppingCartForGuests && Pageview.User == null ? false : Pageview.Area.Item["ConfigModuleShoppingCart"] != null ? (bool)Pageview.Area.Item["ConfigModuleShoppingCart"] : false;
36 bool displayPrice = hidePricesForGuests ? Pageview.User != null : true;
37 bool enableProductStock = hideStockForGuests ? Pageview.User != null : true;
38
39 string ProductdetailPriceSuffixWithVAT = Translate("Productdetail.Price.Suffix.WithVAT", "Incl. VAT");
40 string ProductdetailPriceSuffixWithoutVAT = Translate("Productdetail.Price.Suffix.WithoutVAT", "Excl. VAT");
41 string ProductdetailPriceSuffix = WithVATBool ? ProductdetailPriceSuffixWithVAT : ProductdetailPriceSuffixWithoutVAT;
42 }
43
44 @using Dynamicweb.Ecommerce.Prices;
45 @using Bluedesk.DynamicWeb.Integration.ProfitPlus.ExtensionMethods;
46
47 @helper renderProduct(LoopItem product, string productdetailPriceSuffix, string WithVATSuffix, string FormattedSuffix, bool enableShoppingCart, bool displayPrice, bool enableProductStock, string listId, string listName, EcomConfig EcommerceConfiguration) {
48 bool hideZeroPrices = EcommerceConfiguration.HideZeroPrices;
49 bool enableAddToCartForZeroPrices = EcommerceConfiguration.AddToCartAllowZeroPrices;
50 bool enableAddToCartForOutOfStock = EcommerceConfiguration.AddToCartAllowOutOfStock;
51 string stockFormat = EcommerceConfiguration.StockFormat;
52
53 int productDetailPageId = GetPageIdByNavigationTag("ProductOverview");
54
55 string productName = product.GetString("Ecom:Product.Name");
56 string productImage = product.GetString("Ecom:Product.ImageMedium.Clean");
57 string productId = product.GetString("Ecom:Product.ID");
58 string productNumber = product.GetString("Ecom:Product.Number");
59 string productVariantId = product.GetString("Ecom:Product.VariantID");
60 string productURL = product.GetString("Ecom:Product.VariantLinkGroup.Clean").Replace($"ID={Pageview.ID.ToString()}&", $"ID={productDetailPageId.ToString()}&");
61 string productManufacturer = product.GetString("Ecom:Manufacturer.Name");
62 string productLoopCount = product.GetString("Products.LoopCounter");
63 var p = Dynamicweb.Ecommerce.Services.Products.GetProductById(productId, productVariantId, Pageview.Area.EcomLanguageId);
64
65 bool isVariant = !string.IsNullOrWhiteSpace(p.VariantId);
66 bool hasVariants = !isVariant ? product.GetInteger("Ecom:Product.VariantCount") > 0 : false;
67
68 var productCategory = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID"));
69 string productCategoryName = productCategory != null ? productCategory.Name.Replace("''", "\\\"").Replace("'", "") : "";
70
71 bool isPriceZero = product.GetDouble("Ecom:Product.Price.Price.Value") <= 0;
72 bool hasDiscount = product.GetBoolean("Ecom:Product.HaveDiscount") && product.GetString("Ecom:Product.Price.PriceWithoutVATFormatted") != product.GetString("Ecom:Product.Discount.Price.PriceWithoutVATFormatted");
73 string OriginalPrice = product.GetString("Ecom:Product.Price.Price" + WithVATSuffix + FormattedSuffix);
74 string Price = product.GetString("Ecom:Product.Discount.Price.Price" + WithVATSuffix + FormattedSuffix);
75 string gtmDiscount = product.GetString("Ecom:Product.Discount.TotalAmount.Price.Value").Replace(",", ".");
76 string gtmPrice = product.GetString("Ecom:Product.Price.Price.Value").Replace(",", ".");
77 string yourDiscount = product.GetString("Ecom:Product.Discount.TotalAmount.Price" + WithVATSuffix + FormattedSuffix);
78 double discountPercentage = Math.Round((((GetDouble("Ecom:Product.Discount.Price.Price" + WithVATSuffix) - GetDouble("Ecom:Product.Price.Price" + WithVATSuffix)) / GetDouble("Ecom:Product.Price.Price" + WithVATSuffix)) * 100));
79
80 string informativePrice = product.GetString("Ecom:Product.InformativePrice.Price");
81 double informativePriceForDiscountPercentage = product.GetDouble("Ecom:Product.InformativePrice.Price" + WithVATSuffix);
82
83 if (EcommerceConfiguration.UseInformativePriceAsFromPrice && !string.IsNullOrWhiteSpace(informativePrice))
84 {
85 double informativePriceValue = product.GetDouble("Ecom:Product.InformativePrice.Price.Value");
86 hasDiscount = product.GetDouble("Ecom:Product.Price.Price.Value") < informativePriceValue && product.GetString("Ecom:Product.Price.PriceWithoutVATFormatted") != product.GetString("Ecom:Product.InformativePrice.PriceWithoutVATFormatted");
87 if (hasDiscount)
88 {
89 OriginalPrice = product.GetString("Ecom:Product.InformativePrice.Price" + WithVATSuffix + FormattedSuffix);
90 double yourProfitValue = product.GetDouble("Ecom:Product.InformativePrice.Price" + WithVATSuffix) - product.GetDouble("Ecom:Product.Price.Price" + WithVATSuffix);
91 discountPercentage = Math.Round(((yourProfitValue / informativePriceForDiscountPercentage) * 100));
92 yourDiscount = WithVATSuffix == "WithVAT" ? new PriceInfo { PriceWithVAT = yourProfitValue }.PriceWithVATFormatted : new PriceInfo { PriceWithoutVAT = yourProfitValue }.PriceWithoutVATFormatted;
93 }
94 }
95
96 string retailPrice = "";
97 bool displayRetailPrice = EcommerceConfiguration.DisplayRetailPrice;
98 if(EcommerceConfiguration.DisplayRetailPriceForUsers && Pageview.User == null) {
99 displayRetailPrice = false;
100 }
101 if(displayRetailPrice) {
102 string priceFieldName = EcommerceConfiguration.RetailPriceField;
103 if(EcommerceConfiguration.RetailPriceIsDbPrice) {
104 PriceRaw customerPriceRaw = new PriceRaw(product.GetDouble("Ecom:Product.DBPrice"), Dynamicweb.Ecommerce.Common.Context.Currency);
105 PriceCalculated customerPrice = new Dynamicweb.Ecommerce.Prices.PriceCalculated(customerPriceRaw);
106 if(customerPrice.Price > 0) {
107 retailPrice = WithVATSuffix == "WithVAT" ? customerPrice.PriceWithVATFormatted : customerPrice.PriceWithoutVATFormatted;
108 }
109 } else if(!string.IsNullOrWhiteSpace(priceFieldName)) {
110 double customerPriceValue = product.GetDouble($"Ecom:Product:Field.{priceFieldName}.Value");
111 if(customerPriceValue > 0) {
112 retailPrice = WithVATSuffix == "WithVAT" ? new PriceInfo { PriceWithVAT = customerPriceValue }.PriceWithVATFormatted : new PriceInfo { PriceWithoutVAT = customerPriceValue }.PriceWithoutVATFormatted;
113 }
114 }
115 }
116
117 double stockSize = hasVariants ? product.GetLoop("VariantInfos").Sum(item => item.GetDouble("Stock")) : product.GetDouble("Ecom:Product.Stock");
118 string stockText = product.GetString("Ecom:Product:Stock.Text");
119 string stockSizeFormatted = stockSize.ToString(p.Stock % 1 == 0 ? "N0" : "N2", System.Globalization.CultureInfo.GetCultureInfo(Pageview.Area.CultureInfo.TwoLetterISOLanguageName));
120 bool neverOutOfStock = product.GetBoolean("Ecom:Product.NeverOutOfStock");
121 bool isInStock = stockSize > 0 || neverOutOfStock;
122 string stockClass = isInStock ? "products-module__product-stock-state--instock" : "products-module__product-stock-state--outofstock";
123
124 int productRating = product.GetInteger("Ecom:Product.Rating");
125 int productCommentCount = product.GetInteger("Ecom:Product.CommentCount");
126 string productRibbon = product.GetString("Ecom:Product:Field.Product_Ribbon.Value");
127 string productRibbonStyle = product.GetString("Ecom:Product:Field.RibbonStyle.Value");
128
129 string yourProfitLabel = Translate("Productdetail.YourProfitLabel", "Uw voordeel:");
130
131 bool enableProductShoppingCart = enableShoppingCart;
132 if(!enableAddToCartForZeroPrices && isPriceZero) {
133 enableProductShoppingCart = false;
134 }
135
136 if(!enableAddToCartForOutOfStock && !isInStock) {
137 enableProductShoppingCart = false;
138 }
139
140 if(product.GetBoolean("Ecom:Product.Discontinued"))
141 {
142 enableProductShoppingCart = false;
143 }
144
145 bool displayProductPrice = displayPrice;
146 if(hideZeroPrices && isPriceZero) {
147 displayProductPrice = false;
148 }
149
150 string promotionText = product.GetString("Ecom:Product:Field.PromotionWebName.Value.Clean");
151
152 int result;
153 int contactId = int.TryParse(Pageview.User?.CustomerNumber, out result) ? result : 0;
154 var volumeReduction = p?.GetVolumeReduction(contactId) ?? null;
155 string volumeDiscountText = "";
156 if(volumeReduction != null)
157 {
158 if (volumeReduction.Discount == 0 && volumeReduction.FreeArticleQuantity > 0)
159 {
160 volumeReduction.Discount = Math.Round((100 / volumeReduction.Quantity) * volumeReduction.FreeArticleQuantity);
161 }
162 string volumeReductionPrice = WithVATSuffix == "WithVAT" ? volumeReduction.PriceWithVat.ToString("0.###") : volumeReduction.Price.ToString("0.###");
163
164 volumeDiscountText = string.Format(Translate("VolumeDiscountText", "Vanaf {0} St aan {1} € ({2}% korting)"), volumeReduction.Quantity.ToString("0.###"), volumeReductionPrice, volumeReduction.Discount.ToString("0.###"));
165 }
166
167 string hasPromoTextClass = !string.IsNullOrWhiteSpace(promotionText) ? "products-module--haspromo" : "";
168 bool priceOnRequest = product.GetBoolean("Ecom:Product:Field.PriceOnRequest.Value");
169
170 if(priceOnRequest) {
171 displayProductPrice = false;
172 enableProductShoppingCart = false;
173 }
174
175 string unitCode = string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.Unit Code.Value")) ? "" : $"/ {product.GetString("Ecom:Product:Field.Unit Code.Value")}";
176 string onlySellCompletePackage = product.GetString("Ecom:Product:Field.Only Sell Complete Package.Value");
177 var minimumQuantity = p.PurchaseMinimumQuantity;
178
179 <div class="products-module @hasPromoTextClass">
180
181 @if(!string.IsNullOrWhiteSpace(promotionText))
182 {
183 <p class="products-module__promotion-description">
184 @promotionText
185 </p>
186 }
187
188 @if (!string.IsNullOrWhiteSpace(productRibbon))
189 {
190 <p class="products-module__ribbon products-module__ribbon--@productRibbonStyle">
191 <span class="products-module__ribbon-text">@productRibbon</span>
192 </p>
193 }
194
195 <figure class="products-module__image-container">
196 @if(!string.IsNullOrWhiteSpace(productImage))
197 {
198 <img src="/Admin/Public/GetImage.ashx?Image=@productImage&Crop=7&Format=webp&Quality=90&Compression=80&Height=200" alt="@productName" loading="lazy" height="200" width="300" />
199 }
200 </figure>
201
202 <h3 class="products-module__product-name">
203 @if(!string.IsNullOrWhiteSpace(productManufacturer))
204 {
205 <span class="products-module__product-name--manufacturer">@productManufacturer</span>
206 }
207 <span class="products-module__product-name--product">@productName</span>
208 </h3>
209
210 @if(!string.IsNullOrWhiteSpace(productNumber))
211 {
212 <p class="products-module__product-article-number">@productNumber</p>
213 }
214
215 @if (productCommentCount > 0)
216 {
217 <div class="products-module__product-review-indicator">
218 @renderReviewIndicator("gold", productRating, "row", true, productCommentCount)
219 </div>
220 }
221
222 @if (displayPrice && displayProductPrice)
223 {
224 <div class="products-module__product-price-container">
225 @if (hasDiscount)
226 {
227 <span class="products-module__product-price-original">@OriginalPrice</span>
228 <span class="products-module__product-price">@Price <span>/ @unitCode</span></span>
229 }
230 else
231 {
232 <span class="products-module__product-price">@OriginalPrice <span>/ @unitCode</span></span>
233 }
234 <span class="products-module__product-price-suffix">@productdetailPriceSuffix</span>
235 @if (hasDiscount && discountPercentage > 0)
236 {
237 <span class="pdp-price__percentage">-@discountPercentage%</span>
238 }
239 @if (onlySellCompletePackage == "True")
240 {
241 <p>Bestellen per @minimumQuantity @unitCode</p>
242 }
243 @if (!string.IsNullOrWhiteSpace(retailPrice))
244 {
245 <p class="products-module__product-retail-price">
246 @String.Format(Translate("ProductBlockTitle.RetailPrice", "Retail price: {0}"), retailPrice)
247 </p>
248 }
249 @if (hasDiscount)
250 {
251 <p class="products-module__product-your-discount">@Translate("Productdetail.YourProfitLabel", "Uw voordeel:") @yourDiscount</p>
252 }
253 @if (!string.IsNullOrWhiteSpace(volumeDiscountText))
254 {
255 <p class="products-module__volume-discount">@volumeDiscountText</p>
256 }
257 </div>
258 }
259
260 <section class="products-module__product-actions">
261 @if(enableProductStock && !string.IsNullOrWhiteSpace(stockFormat))
262 {
263 if(stockFormat == "text") {
264 if (!string.IsNullOrWhiteSpace(stockText))
265 {
266 <p class="products-module__product-stock-state @stockClass">@string.Format(stockText, stockSize)</p>
267 }
268 }
269 else
270 {
271 string translationTag = "";
272
273 if(stockSize == 1)
274 {
275 translationTag = Translate("ProductBlockStockInfo.AmountInStockSingle", "{0} product in stock");
276 }
277 else if(stockSize > 1)
278 {
279 translationTag = Translate("ProductBlockStockInfo.AmountInStockMultiple", "{0} products in stock");
280 }
281 else if(neverOutOfStock)
282 {
283 translationTag = Translate("ProductBlockStockInfo.AmountInStock", "In stock");
284 }
285 else if(!isInStock)
286 {
287 translationTag = Translate("ProductBlockStockInfo.AmountOutOfStock", "Out of stock");
288 }
289 <p class="products-module__product-stock-state @stockClass">@string.Format(translationTag, stockSizeFormatted)</p>
290 }
291 }
292
293 @if(!hasVariants && enableShoppingCart && enableProductShoppingCart)
294 {
295 <add-to-cart
296 class="app-addtocart"
297 data-prodid="@productId"
298 data-variantid="@productVariantId"
299 data-show-text="False"
300 data-min-quantity="@product.GetDouble("Ecom:Product.PurchaseMinimumQuantity")"
301 data-step="@product.GetDouble("Ecom:Product.PurchaseQuantityStep")">
302 </add-to-cart>
303 }
304 </section>
305
306 <a href="@productURL" class="products-module__link" data-id="@productId" data-name='@productName.Replace("''", "\\\"").Replace("'", "")' data-number="@productNumber" data-position="@productLoopCount" data-brand='@productManufacturer.Replace("''", "\\\"").Replace("'", "")' data-category='@productCategoryName' data-listid="@listId" data-listname="@listName" data-variantid="@productVariantId" data-gtmprice="@gtmPrice" data-gtmdiscount="@gtmDiscount"></a>
307 </div>
308 }
309
310 @helper renderProductSliderItem(LoopItem product, string productdetailPriceSuffix, string WithVATSuffix, string FormattedSuffix, bool enableShoppingCart, bool displayPrice, bool enableProductStock, string listId, string listname, EcomConfig EcommerceConfiguration) {
311 <li class="products-module__slider-cell">
312 @renderProduct(product, productdetailPriceSuffix, WithVATSuffix, FormattedSuffix, enableShoppingCart, displayPrice, enableProductStock, listId, listname, EcommerceConfiguration)
313 </li>
314 }
315
316 @helper renderReviewIndicator(string progressbarColor, int value, string flexDirection, bool boolReviews, int CommentCount)
317 {
318 int ratingPercentage = (100 / 5) * value;
319
320 <section style="display: flex; flex-direction: @flexDirection; position: relative; align-items: center;">
321 <div class="reviews__indicator" style="display: flex; flex-direction: row;">
322 <div class="reviews__indicator-progressbar" style="width: @ratingPercentage.ToString()%; background-color: @progressbarColor;"></div>
323 <ul class="reviews__indicator-star-list">
324 <li class="reviews__indicator-star-list-item"></li>
325 <li class="reviews__indicator-star-list-item"></li>
326 <li class="reviews__indicator-star-list-item"></li>
327 <li class="reviews__indicator-star-list-item"></li>
328 <li class="reviews__indicator-star-list-item"></li>
329 </ul>
330 </div>
331 <span style="display: flex; position: relative; font-size: 12px; line-height: initial;">
332 @value / 5
333 @if (boolReviews)
334 {<text>(@CommentCount reviews)</text>}
335 </span>
336 </section>
337
338 }
339
340 @helper RenderProductModuleUSP(string USP, string USPInfo)
341 {
342 if (!string.IsNullOrWhiteSpace(USP))
343 {
344 <li class="pdp-usplist__item pdp-usplist__item--product">
345 <i class="fal fa-check"></i>
346 @USP
347 @if (!string.IsNullOrWhiteSpace(USPInfo))
348 {
349 <span data-tippy-content="@USPInfo">
350 <i class="fal fa-info-circle"></i>
351 </span>
352 }
353 </li>
354 }
355 }
356
357 @helper renderProductCompareButton(string productId, string name, string thumbnail) {
358 string title = Translate("ProductBlockAction.Compare", "Add to product compare");
359 <button class="po-block__action-btn po-block__action-btn--compare" aria-label="@title" title="@title" data-prodid="@productId" data-imgsmall="@thumbnail" data-prodname="@name">
360 <i class="fas fa-exchange-alt"></i>
361 </button>
362 }
363
364 @helper renderProductFavoriteButton(LoopItem product, string listId, string listName) {
365 string productId = product.GetString("Ecom:Product.ID");
366 string productVariantId = !string.IsNullOrWhiteSpace(product.GetString("Ecom:Product.VariantID")) ? product.GetString("Ecom:Product.VariantID") : "";
367 string productName = product.GetString("Ecom:Product.Name").Replace("''", "\\\"").Replace("'", "");
368 string productNumber = product.GetString("Ecom:Product.Number");
369 string gtmDiscount = product.GetString("Ecom:Product.Discount.TotalAmount.Price.Value").Replace(",", ".");
370 string gtmPrice = product.GetString("Ecom:Product.Price.Price.Value").Replace(",", ".");
371 string gtmValue = product.GetString("Ecom:Product.Discount.Price.Value").Replace(",", ".");
372 var productCategory = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID"));
373 string productCategoryName = productCategory != null ? productCategory.Name.Replace("''", "\\\"").Replace("'", "") : "";
374 string productManufacturer = product.GetString("Ecom:Manufacturer.Name").Replace("''", "\\\"").Replace("'", "");
375
376 string title = Translate("ProductBlockAction.Wishlist", "Add to wish list");
377 bool isActive = Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites.UserExtensions.IsProductInAnyFavoriteList(Pageview.User, productId, productVariantId);
378 string activeClass = isActive ? "po-block__action-btn--visible" : "";
379
380 <button class="po-block__action-btn po-block__action-btn--wishlist @activeClass" aria-label="@title" title="@title" data-id="@productId" data-offcanvas-target="favoritelist" data-productid="@productId" data-variantid="@productVariantId" data-number="@productNumber" data-name='@productName' data-position="@product.GetInteger("Products.LoopCounter")" data-brand='@productManufacturer' data-category='@productCategoryName' data-listid="@listId" data-listname="@listName" data-gtmprice="@gtmPrice" data-gtmdiscount="@gtmDiscount" data-gtmvalue="@gtmValue" data-currencycode="@Dynamicweb.Ecommerce.Common.Context.Currency.Code">
381 @if(isActive) {
382 <i class="fas fa-heart"></i>
383 } else {
384 <i class="far fa-heart"></i>
385 }
386 </button>
387
388 }
389
390
391 @{
392 string listId = "search_results";
393 string listName = "Search results";
394 }
395
396 @if(GetLoop("Products").Any())
397 {
398 <p>@string.Format(Translate("Search.ProductsFoundCount", "{0} results"), GetString("Ecom:ProductList.PageProdCnt"))</p>
399 <div class="content-product-list">
400 @foreach (LoopItem product in GetLoop("Products"))
401 {
402 @renderProduct(product, ProductdetailPriceSuffix, WithVATSuffix, FormattedSuffix, enableShoppingCart, displayPrice, enableProductStock, listId, listName, EcommerceConfiguration);
403 }
404 </div>
405 } else {
406 <p>@Translate("Search.NoProductsFound", "No products found")</p>
407 }
408
409 @if(GetLoop("Products").Any() && GetInteger("Ecom:ProductList.TotalPages") > 1)
410 {
411 int totalPages = GetInteger("Ecom:ProductList.TotalPages");
412 int currentPagenumber = GetInteger("Ecom:ProductList.CurrentPage");
413 int previousPagenumber = currentPagenumber - 1;
414 int nextPagenumber = currentPagenumber + 1;
415 int firstPage = getFirstpage(currentPagenumber, totalPages, 7);
416 int lastPage = getLastpage(currentPagenumber, totalPages, 7, firstPage);
417
418 string searchQuery = Dynamicweb.Context.Current.Request["q"];
419 string firstPageUrl = string.Format("/Default.aspx?ID={0}&PageNum={1}&q={2}", Pageview.ID, 1, searchQuery);
420 string prevPageLink = GetString("Ecom:ProductList.PrevPage.Clean");
421 string nextPageLink = GetString("Ecom:ProductList.NextPage.Clean");
422 string lastPageUrl = string.Format("/Default.aspx?ID={0}&PageNum={1}&q={2}", Pageview.ID, totalPages, searchQuery);
423
424 <nav class="pagination" role="navigation" aria-label="Pagination navigation">
425 <ul class="pagination__list">
426
427 @if(!string.IsNullOrWhiteSpace(prevPageLink)) {
428 <li class="pagination__list-item">
429 <a href="@firstPageUrl" class="pagination__button" aria-label="Go to page 1">
430 <i class="fal fa-arrow-to-left text-base"></i>
431 </a>
432 </li>
433 <li class="pagination__list-item">
434 <a href="@prevPageLink" class="pagination__button" aria-label="Go to page @previousPagenumber">
435 <i class="fal fa-arrow-left text-base"></i>
436 </a>
437 </li>
438 }
439
440 <li class="pagination__list-item">
441 <ul class="pagination__pages">
442 @for(int i = @firstPage; i <= @lastPage; i++)
443 {
444 bool isActivePage = @currentPagenumber == i;
445 string activePageClass = isActivePage ? "pagination__button--active" : "";
446 string pageUrl = string.Format("/Default.aspx?ID={0}&PageNum={1}&q={2}", Pageview.ID, i, searchQuery);
447 string ariaLabel = isActivePage ? string.Format("aria-label='Current Page, Page {0}' aria-current='true'", i) : string.Format("aria-label='Go to page {0}'", i);
448
449 <li class="pagination__list-item">
450 <a href="@pageUrl" class="pagination__button @activePageClass" @ariaLabel>
451 <span class="pagination__text">@i</span>
452 </a>
453 </li>
454 }
455 </ul>
456 </li>
457
458 @if(!string.IsNullOrWhiteSpace(nextPageLink)) {
459 <li class="pagination__list-item">
460 <a href="@nextPageLink" class="pagination__button" aria-label="Go to page @nextPagenumber">
461 <i class="fal fa-arrow-right text-base"></i>
462 </a>
463 </li>
464 <li class="pagination__list-item">
465 <a href="@lastPageUrl" class="pagination__button" aria-label="Go to page @totalPages">
466 <i class="fal fa-arrow-to-right text-base"></i>
467 </a>
468 </li>
469 }
470
471 </ul>
472 </nav>
473 }
474
475
476 @functions {
477 int getFirstpage(int currentPage, int totalPages, double pagesToShow)
478 {
479 int firstPage = 0;
480 if(pagesToShow >= totalPages) {
481 firstPage = 1;
482 } else {
483 firstPage = currentPage - Convert.ToInt32(Math.Floor(pagesToShow / 2));
484 firstPage = firstPage < 1 ? 1 : firstPage;
485 }
486 return firstPage;
487 }
488
489 int getLastpage(int currentPage, int totalPages, double pagesToShow, int firstPage)
490 {
491 int lastPage = 0;
492 lastPage = firstPage + Convert.ToInt32(pagesToShow);
493 if (lastPage > totalPages) {
494 lastPage = totalPages;
495 }
496 return lastPage;
497 }
498 }
499
500 @SnippetStart("DataLayer")
501 <text>
502 <script>
503 if(window.dataLayer) {
504 dataLayer.push({
505 'event': 'view_item_list',
506 'ecommerce': {
507 'item_list_id': '@listId',
508 'item_list_name': '@listName',
509 'items': [
510 @foreach (var product in GetLoop("Products")) {
511 var categoryObject = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID"));
512 string categoryName = categoryObject != null ? categoryObject.Name.Replace("''", "\\\"").Replace("'", "") : "";
513 <text>
514 {
515 'item_id': '@product.GetString("Ecom:Product.ID")',
516 'item_name': '@product.GetString("Ecom:Product.Name").Replace("''", "\\\"").Replace("'", "")',
517 'item_number': '@product.GetString("Ecom:Product.Number")',
518 'discount': @product.GetString("Ecom:Product.Discount.TotalAmount.Price.Value").Replace(",", "."),
519 'index': @product.GetInteger("Products.LoopCounter"),
520 'item_brand': '@product.GetString("Ecom:Manufacturer.Name").Replace("''", "\\\"").Replace("'", "")',
521 'item_category': '@categoryName',
522 'item_list_id': '@listId',
523 'item_list_name': '@listName',
524 'item_variant': '@product.GetString("Ecom:Product.VariantID")',
525 'price': @product.GetString("Ecom:Product.Price.Price.Value").Replace(",", "."),
526 'quantity': 1,
527 },
528 </text>
529 }
530 ]
531 }
532 });
533 }
534 </script>
535 </text>
536
537 @SnippetEnd("DataLayer")
538