Error executing template "Designs/Inox/eCom/Productlist/ProductList.cshtml"
System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Double.Parse(String s)
at CompiledRazorTemplates.Dynamic.RazorEngine_e46cf9ec85c64fe0a0dbfa8b2c29ebeb.<>c__DisplayClass3_0.<RenderProduct>b__0(TextWriter __razor_helper_writer) in D:\websites\INOX\Files\Templates\Designs\Inox\eCom\Productlist\ProductList.cshtml:line 207
at CompiledRazorTemplates.Dynamic.RazorEngine_e46cf9ec85c64fe0a0dbfa8b2c29ebeb.<ProductList>b__4_0(TextWriter __razor_helper_writer) in D:\websites\INOX\Files\Templates\Designs\Inox\eCom\Productlist\ProductList.cshtml:line 512
at CompiledRazorTemplates.Dynamic.RazorEngine_e46cf9ec85c64fe0a0dbfa8b2c29ebeb.Execute() in D:\websites\INOX\Files\Templates\Designs\Inox\eCom\Productlist\ProductList.cshtml:line 626
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits RazorTemplateBase<RazorTemplateModel<Template>>
2 @using Dynamicweb;
3 @using Dynamicweb.Rendering;
4 @using Inox.Logic.Helpers;
5
6 @using Dynamicweb.Admin.dk.dynamicweb.templates
7 @using System.Web;
8 @using System.Collections.Generic;
9
10
11 @helper Filters()
12 {
13 string GroupId = GetString("Ecom:Group.ID");
14 if (GetLoop("FacetGroups").Any())
15 {
16 <div class="sidebar mb-5">
17 <div class="filters-toggler btn btn--icon-left">
18 <svg role="img"><use xlink:href="/Files/Templates/Designs/Inox/static/dist/icons.svg#filter"></use></svg>
19 Filter
20 <div class="close">
21 <svg role="img"><use xlink:href="/Files/Templates/Designs/Inox/static/dist/icons.svg#close"></use></svg>
22 </div>
23 </div>
24
25 <div class="filters-wrapper">
26 <form name="filters" id="filters" action="" method="get">
27
28 @{
29 int visibleCounter = 1;
30
31 var RelevantGroupFacets = Inox.Website.CustomModules.EcomFilterManagement.Frontend.Helper.GetEcomGroupFilters(GroupId).OrderBy(x => x.Sorting).ToList();
32
33
34 }
35
36
37 @foreach (var facetGroup in GetLoop("FacetGroups"))
38 {
39 var visibleFacets = new List<LoopItem>();
40 var hiddenFacets = new List<LoopItem>();
41
42 foreach (var FacetGroup in RelevantGroupFacets)
43 {
44 var facets = facetGroup.GetLoop("Facets").Where(x => x.GetString("Facet.Name") == FacetGroup.FacetSystemName);
45
46 foreach (LoopItem facet in facets)
47 {
48 if (facet.GetLoop("FacetOptions").Any())
49 {
50 if (visibleCounter <= 4)
51 {
52 visibleFacets.Add(facet);
53 }
54 else
55 {
56 hiddenFacets.Add(facet);
57 }
58
59 visibleCounter++;
60 }
61
62 }
63 }
64
65
66
67 foreach (var facet in visibleFacets)
68 {
69
70 @FilterOptions(facet)
71 }
72 if (hiddenFacets.Any())
73 {
74 <div class="collapse" id="hiddenFacets">
75 <div class="collapse-filters">
76 @foreach (var facet in hiddenFacets)
77 {
78 @FilterOptions(facet)
79 }
80 </div>
81 </div>
82 }
83
84 }
85
86 </form>
87 <div class="row hidden-md hidden-lg">
88 <div class="col-12">
89 <div class="d-flex justify-content-between align-items-center">
90 <button class="btn filters-collapse-toggle rounded-0 mt-4" type="button" data-bs-toggle="collapse" data-bs-target="#hiddenFacets" aria-expanded="false">
91 <span class="collapse-open-text">
92 @Translate("Filter Toggle Btn - Expand - Text", "Flere filtre")
93 </span>
94 <span class="collapse-close-text">
95 @Translate("Filter Toggle Btn - Collapse - Text", "Færre filtre")
96 </span>
97 </button>
98 <div class="filters-reset">
99 @Translate("Reset", "Nulstil")
100 </div>
101 </div>
102 </div>
103 </div>
104 </div>
105
106 </div>
107 }
108 }
109
110
111 @helper FilterOptions(LoopItem facet)
112 {
113 List<string> sorting = Inox.Website.CustomCode.Helper.DimensionSortings.Instance().OrderBy(s => s.Value).Select(s => s.Key).ToList();
114 List<string> selectedValues = new List<string>();
115 if (facet.GetInteger("Facet.OptionWithResultCount") > 0)
116 {
117 string translateFilterString = "facetName_" +
118 @GetString("Ecom:Group.ID") + "_" +
119 @facet.GetString("Facet.Name").Replace(" ", "_");
120
121
122 <div class="filter-checkbox-group d-flex align-items-start flex-column flex-md-row align-items-md-center flex-grow-1" role="group" data-filter-name="@facet.GetString("Facet.QueryParameter")">
123 <strong class="me-3">@Translate(translateFilterString, translateFilterString)</strong>
124 <div class="d-flex flex-wrap align-items-center">
125 @{
126 var facetOptionsSorted = facet.GetLoop("FacetOptions").OrderBy(facetOption => sorting.IndexOf(facetOption.GetString("FacetOption.Name"))).ThenBy(facetOption => facetOption.GetString("FacetOption.Name"));
127 }
128 @foreach (var facetOption in facetOptionsSorted)
129 {
130 string facetOptionCount = facetOption.GetString("FacetOption.Count");
131 bool facetOptionCountDisabled = facetOption.GetInteger("FacetOption.Count") == 0;
132 string facetOptionName = facetOption.GetString("FacetOption.Name");
133 bool facetOptionSelected = facetOption.GetBoolean("FacetOption.Selected");
134 string facetOptionNameFormatted = facetOptionName.Replace("_", "/").Replace("£", "\"");
135
136 if (facetOptionSelected)
137 {
138 selectedValues.Add(facetOptionName);
139 }
140
141 <div class="form-check custom-form-check">
142 <input class="form-check-input" id="@translateFilterString@facetOption.GetInteger("FacetOptions.LoopCounter")" data-name="@facet.GetString("Facet.QueryParameter")" value="@facetOptionName" type="checkbox" @(facetOptionSelected ? "checked" : string.Empty) @(facetOptionCountDisabled ? "disabled" : string.Empty)/>
143 <label class="form-check-label" for="@translateFilterString@facetOption.GetInteger("FacetOptions.LoopCounter")">@facetOptionNameFormatted</label>
144 </div>
145
146 }
147 <input class="js-selected-filters-input" type="hidden" value="@(selectedValues.Any() ? string.Join(",", selectedValues) : string.Empty)" name="@facet.GetString("Facet.QueryParameter")"/>
148 </div>
149
150 </div>
151
152 }
153 }
154
155 @helper FacetNameTranslate(string facetName)
156 {
157 string value = facetName;
158
159 if (Pageview.Area.ID == 2)
160 {
161 switch (facetName)
162 {
163 case "Kvalitet":
164 value = "Grade";
165 break;
166 case "Profil":
167 value = "Profile";
168 break;
169 case "Udførsel 1":
170 value = "Execution 1";
171 break;
172 case "Udførsel 2":
173 value = "Execution 2";
174 break;
175 case "Norm":
176 value = "Standard";
177 break;
178 default:
179 break;
180 }
181 }
182
183 @value
184 }
185 @inherits RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Template>>
186 @using Dynamicweb.Ecommerce.Products
187 @using Dynamicweb.Rendering
188 @using Dynamicweb.Environment
189
190 @inherits RazorTemplateBase<RazorTemplateModel<Template>>
191 @using Dynamicweb.Ecommerce.Products
192 @using Dynamicweb.Rendering
193 @using Dynamicweb.Environment
194 @using Firstweb.OrderTemplate
195 @using Inox.Logic.Helpers
196 @using System
197
198
199 @helper RenderProduct(LoopItem product)
200 {
201 string userName = GetGlobalValue("Global:Extranet.UserName");
202 string message = Translate("ThisDemandsALogIn", "Dette kræver at du logger ind");
203 string customerProductNumber = Inox.Website.CustomCode.FrontendHelpers.CustomerProductNumber.GetCustomerProductNumber(product.GetString("Ecom:Product.ID"));
204 string productId = product.GetString("Ecom:Product.ID");
205 string productName = product.GetString("Ecom:Product.Name");
206 string defaultUnit = (product.GetString("Ecom:Product.DefaultUnitID") == product.GetString("Ecom:Product:Field.ProductUnitConvertFromUnit.Value") ? "from" : "to");
207 double convertFactor = double.Parse(Pageview.AreaID != 1 ? product.GetString("Ecom:Product:Field.ProductUnitConvertFactor.Value").Replace(",", ".") : product.GetString("Ecom:Product:Field.ProductUnitConvertFactor.Value"));
208 var stockLevel = product.GetInteger("Ecom:Product.Stock");
209 bool showUnitOptions = product.GetString("Ecom:Product:Field.ProductLevel1.Value") != "F" &&
210 product.GetString("Ecom:Product:Field.ProductLevel2.Value") != "R_SV" &&
211 product.GetString("Ecom:Product:Field.ProductLevel2.Value") != "R_ME" &&
212 product.GetString("Ecom:Product:Field.ProductLevel2.Value") != "R_SM" &&
213 product.GetString("Ecom:Product:Field.ProductLevel2.Value") != "R_DE" &&
214 product.GetString("Ecom:Product:Field.ProductLevel2.Value") != "R_OVERSKUD" &&
215 product.GetString("Ecom:Product:Field.ProductLevel2.Value") != "RP";
216 string otid = Dynamicweb.Context.Current.Request.GetString("otid");
217 bool hasOtid = !string.IsNullOrEmpty(otid);
218 string hasOtidClass = hasOtid ? "products-list--ot" : "";
219
220 string ecomProductLoopCounter = product.GetString("Ecom:Product.LoopCounter");
221 string productLoopCounter = "ProductLoopCounter" + ecomProductLoopCounter;
222 string productIdCounter = "ProductID" + ecomProductLoopCounter;
223 string quantityCounter = "Quantity" + ecomProductLoopCounter;
224
225 string dimensionsText = product.GetString("Ecom:Product:Field.ProductDimensionLine.Value").Replace("_", "/").Replace("£", "\"");
226
227 string productImagePrimary = product.GetString("Ecom:Product.PrimaryImage");
228 string productImage = "";
229
230 if (!string.IsNullOrEmpty(productImagePrimary))
231 {
232 productImage = "/Admin/Public/GetImage.ashx?image=" + productImagePrimary + "&width=300";
233 Dynamicweb.Frontend.PageView.Current().Meta.AddTag("og:image", productImagePrimary);
234 }
235
236 <div class="product-list-row @hasOtidClass" id="line-@productId" data-productid="@productId" itemscope itemtype="http://schema.org/Product">
237 <div class="product-list-row-item product-list-row-item--image d-none d-sm-block">
238 <a href="@product.GetString("Ecom:Product.LinkGroup.Clean")">
239 <img src="@productImage" alt="@productName" />
240 </a>
241 </div>
242 <div class="product-list-row-item product-list-row-item--number" itemprop="mpn">
243 <a href="@product.GetString("Ecom:Product.LinkGroup.Clean")" itemprop="mpn">
244 <strong class="mb-2 d-inline-block">
245 @product.GetString("Ecom:Product.Number")
246 </strong>
247 </a>
248 <div class="product-list-row-item product-list-row-item--favorite d-md-none">
249 @if (hasOtid)
250 {
251 <a href="#" data-productid="@productId" class="js-remove-from-favorite">
252 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-bottom bi bi-trash text-danger" viewBox="0 0 16 16">
253 <path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
254 <path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
255 </svg>
256 <div class="d-inline-block">@Translate("CustomerFavoriteRemove.Text", "Remove")</div>
257 </a>
258 }
259 else
260 {
261 int inTemplatesCount = Inox.Website.CustomCode.Helper.OrderTemplates.GetProductInOrderTemplatesCount(productId);
262 bool inTemplates = inTemplatesCount > 0;
263
264 if (inTemplates)
265 {
266 <a href="#" data-productid="@productId" data-tooltip="@message" class="js-add-to-favorite pe-2">
267 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-bottom bi bi-star-fill" viewBox="0 0 16 16">
268 <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z" />
269 </svg>
270 <div class="d-inline-block">@Translate("CustomerFavoriteRemove.Text", "Remove")</div>
271 </a>
272 }
273 else
274 {
275 <a href="#" data-productid="@productId" data-tooltip="@message" class="js-add-to-favorite pe-2">
276 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-bottom bi bi-star" viewBox="0 0 16 16">
277 <path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/>
278 </svg>
279 <div class="d-inline-block">@Translate("CustomerFavoriteSave.Text", "Save")</div>
280
281 </a>
282 }
283 }
284 </div>
285 @if (!string.IsNullOrEmpty(userName))
286 {
287 if (customerProductNumber.Any())
288 {
289 <a href="#" data-productid="@productId" data-customerproductnumber="@customerProductNumber" class="products-list__customer-number js-customer-product-number added"><i class="bi bi-pencil-square me-1"></i> @customerProductNumber</a>
290 }
291 else
292 {
293 <a href="#" data-productid="@productId" class="products-list__customer-number js-customer-product-number"><i class="bi bi-plus-square me-1"></i> @Translate("CustomerProductNumber.AddOwnNumber", "Add own number")</a>
294 }
295 }
296
297 </div>
298 <div class="product-list-row-item product-list-row-item--description" itemprop="description" id="product-description-@productId">
299 <a href="@product.GetString("Ecom:Product.LinkGroup.Clean")" itemprop="description" class="product-link">
300 @product.GetString("Ecom:Product.ShortDescription")
301 @if (stockLevel <= 0 && !string.IsNullOrEmpty(userName))
302 {
303 <div class="stock-message color-primary">
304 @product.GetString("Ecom:Product:Field.StockStatusText.Value")
305 </div>
306 }
307 </a>
308 <div class="product-price d-md-none">
309 @if (product.GetString("Ecom:Product.Price.Price") != "0,00")
310 {
311 string currencyCode = product.GetString("Ecom:Product.Price.Currency.Code");
312 string unitId = product.GetString("Ecom:Product.DefaultUnitID").ToLower();
313 string price = String.Format(new System.Globalization.CultureInfo("da-DK"), "{0:#,##0.00}", product.GetDouble("Ecom:Product.Price.PricePIP") / 100);
314
315 <div class="mb-2">
316 <strong>@price</strong> @currencyCode/@Translate(unitId, unitId).ToUpper()
317 </div>
318 }
319 </div>
320 </div>
321
322 <div class="product-list-row-item product-list-row-item--dimension d-none d-sm-block">
323 <a href="@product.GetString("Ecom:Product.LinkGroup.Clean")">
324 @dimensionsText.Replace("_", "/").Replace("£", "\"")
325 </a>
326 </div>
327
328 <div class="product-list-row-item product-list-row-item--price d-none d-sm-block">
329 @if (product.GetString("Ecom:Product.Price.Price") != "0,00")
330 {
331 string currencyCode = product.GetString("Ecom:Product.Price.Currency.Code");
332 string unitId = product.GetString("Ecom:Product.DefaultUnitID").ToLower();
333 string price = String.Format(new System.Globalization.CultureInfo("da-DK"), "{0:#,##0.00}", product.GetDouble("Ecom:Product.Price.PricePIP") / 100);
334
335 <div class="mb-2">
336 <strong>@price</strong> @currencyCode/@Translate(unitId, unitId).ToUpper()
337 </div>
338 }
339 @if (stockLevel > 0)
340 {
341 <link itemprop="availability" href="http://schema.org/InStock"/>
342 <span>@(string.IsNullOrEmpty(userName) ? Translate("InStock", "På lager") : stockLevel + " " + Translate("InStockLoggedIn", "på lager"))</span>
343 }
344 else
345 {
346 <span class="product-stock-indicator out-of-stock">Ikke på lager</span>
347 }
348 </div>
349 <div class="product-list-row-item product-list-row-item--favorite d-none d-md-flex">
350 @if (hasOtid)
351 {
352 <a href="#" data-productid="@productId" class="js-remove-from-favorite">
353 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash text-danger" viewBox="0 0 16 16">
354 <path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
355 <path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
356 </svg>
357 </a>
358 }
359 else
360 {
361 int inTemplatesCount = Inox.Website.CustomCode.Helper.OrderTemplates.GetProductInOrderTemplatesCount(productId);
362 bool inTemplates = inTemplatesCount > 0;
363
364 if (inTemplates)
365 {
366 <a href="#" data-productid="@productId" data-tooltip="@message" class="js-add-to-favorite pe-2">
367 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
368 <path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z" />
369 </svg>
370 </a>
371 }
372 else
373 {
374 <a href="#" data-productid="@productId" data-tooltip="@message" class="js-add-to-favorite pe-2">
375 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star" viewBox="0 0 16 16">
376 <path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/>
377 </svg>
378 </a>
379 }
380
381
382 }
383 </div>
384 <div class="product-list-row-item product-list-row-item--quantity">
385 <div class="d-flex inner-quantity p-3 p-sm-0 w-100">
386 <div class="product-stock d-block d-sm-none">
387 @if (stockLevel > 0)
388 {
389 <link itemprop="availability" href="http://schema.org/InStock"/>
390 <span class="product-stock-indicator in-stock">
391 <span>@(string.IsNullOrEmpty(userName) ? Translate("InStock", "På lager") : stockLevel + " " + Translate("InStockLoggedIn", "på lager"))</span>
392 </span>
393 }
394 else
395 {
396 <span class="product-stock-indicator out-of-stock">Ikke på lager</span>
397 }
398 </div>
399
400 <div class="d-flex justify-content-end ms-auto">
401 <input type="hidden" name="@productLoopCounter" id="@productLoopCounter" value="@ecomProductLoopCounter" />
402 <input type="hidden" name="@productIdCounter" id="@productIdCounter" value="@product.GetString("Ecom:Product.ID")" />
403 @if (!hasOtid)
404 {
405 <div class="products-list__buy__amount">
406 <div class="products-list__buy__amount__unit">
407 @(showUnitOptions ? product.GetString("Ecom:Product:Field.ProductUnitConvertFromUnit.Value") : product.GetString("Ecom:Product.DefaultUnitID"))
408 </div>
409 <input name="quantity" id="quantity_@product.GetValue("Ecom:Product.ID")" type="number" value="@(showUnitOptions ? Math.Round(convertFactor) : 1)" required min="1" step="any">
410 </div>
411
412 if (showUnitOptions)
413 {
414 <div class="products-list__buy__converted">
415 <div class="products-list__buy__converted__unit">
416 @product.GetString("Ecom:Product:Field.ProductUnitConvertToUnit.Value")
417 </div>
418 <input id="quantity_@product.GetValue("Ecom:Product.ID")-convert" type="number" min="0" step="any" step="1" data-convert-factor="@convertFactor">
419 </div>
420 }
421 }
422 else
423 {
424
425 double otQty = OrderTemplates.Instance().GetTemplateLineQuantity(otid, productId);
426
427 <div class="products-list__buy__amount">
428 <div class="products-list__buy__amount__unit">
429 @(showUnitOptions ? product.GetString("Ecom:Product:Field.ProductUnitConvertFromUnit.Value") : product.GetString("Ecom:Product.DefaultUnitID"))
430 </div>
431 <input name="@quantityCounter" id="quantity_@product.GetValue("Ecom:Product.ID")" type="number" value="@otQty" required min="1" step="any">
432 </div>
433
434 if (showUnitOptions)
435 {
436 <div class="products-list__buy__converted">
437 <div class="products-list__buy__converted__unit">
438 @product.GetString("Ecom:Product:Field.ProductUnitConvertToUnit.Value")
439 </div>
440 <input id="quantity_@product.GetValue("Ecom:Product.ID")-convert" type="number" min="0" step="any" step="1" data-convert-factor="@convertFactor">
441 </div>
442 }
443 }
444
445 @if (string.IsNullOrEmpty(userName))
446 {
447 <div class="btn btn--secondary-color btn-productlist-add-to-cart js-add-to-favorite" data-tooltip="@message">
448 <svg data-tooltip="@message" role="img"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/Templates/Designs/Inox/static/dist/icons.svg#basket"></use></svg>
449 </div>
450 }
451 else
452 {
453 <div class="btn btn--secondary-color btn-productlist-add-to-cart" onclick="AddToCart(event, '@product.GetValue("Ecom:Product.ID")', '@product.GetValue("Ecom:Product.VariantID")', '', '@product.GetString("Ecom:Product.LanguageID")');">
454 <svg role="img"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/Templates/Designs/Inox/static/dist/icons.svg#basket"></use></svg>
455 </div>
456 }
457
458
459 </div>
460 </div>
461 </div>
462 </div>
463 }
464
465
466 @helper ProductList()
467 {
468 bool isLastGroup = false;
469 if (string.IsNullOrEmpty(GetString("Ecom:Group.ID")) == false)
470 {
471 isLastGroup = Inox.Logic.Helpers.Product.GetLastGroupId(GetString("Ecom:Group.ID")) == GetString("Ecom:Group.ID");
472 }
473
474
475
476 string otid = Dynamicweb.Context.Current.Request.GetString("otid");
477 bool hasOtid = otid != null;
478 if (GetLoop("Products").Any())
479 {
480 <div class="products-list">
481
482 @*
483 <ul class="products-list__table__row products-list__table__header small-headline">
484 <li class="products-list__table__cell" itemprop="mpn"></li>
485 <li class="products-list__table__cell number" itemprop="mpn">@Translate("No", "Nr")</li>
486 <li class="products-list__table__cell description" itemprop="description">@Translate("Description", "Beskrivelse")</li>
487
488 <li class="products-list__table__cell">Enhedpris og lager</li>
489 <li class="products-list__table__cell"></li>
490 <li class="products-list__table__cell"></li>
491 <li class="products-list__table__cell"></li>
492 </ul>
493 *@
494
495 <div class="product-list-container">
496 <div class="product-list-row product-list-row-header small-headline">
497 <div class="product-list-row-item product-list-row-item--image"> </div>
498 <div class="product-list-row-item product-list-row-item--number" itemprop="mpn">@Translate("No", "Nr")</div>
499 <div class="product-list-row-item product-list-row-item--description" itemprop="description">@Translate("Description", "Beskrivelse")</div>
500 <div class="product-list-row-item product-list-row-item--dimension">
501 @Translate("Dimension", "Dimension")
502 </div>
503 <div class="product-list-row-item product-list-row-item--price">
504 @Translate("Unit and Price", "Enhedpris og lager")
505
506 </div>
507 <div class="product-list-row-item product-list-row-item--favorite"> </div>
508 <div class="product-list-row-item product-list-row-item--quantity"> </div>
509 </div>
510 @foreach (LoopItem product in GetLoop("Products"))
511 {
512 @RenderProduct(product)
513 }
514 </div>
515
516
517 <div class="products-list__more">
518 @{
519 string productListNextPage = GetString("Ecom:ProductList.NextPage.Clean");
520 string productListPrevPage = GetString("Ecom:ProductList.PrevPage.Clean");
521 }
522 @if (productListPrevPage != string.Empty)
523 {
524 <a href="@productListPrevPage" class="btn btn--icon-left">
525 <svg role="img"><use xlink:href="/Files/Templates/Designs/Inox/static/dist/icons.svg#arrow-left"></use></svg>
526 @Translate("Previous", "Forrige")
527 </a>
528 }
529
530 @{
531 int anyPaginering = GetLoop("Ecom:ProductList.Pages").Count;
532 }
533
534 @if (anyPaginering > 1)
535 {
536 foreach (LoopItem page in GetLoop("Ecom:ProductList.Pages"))
537 {
538 string productListPageNumber = page.GetString("Ecom:ProductList.Pages.Page.Number");
539 string productListPageUrl = page.GetString("Ecom:ProductList.Pages.Page.Url");
540
541 if (page.GetBoolean("Ecom:ProductList.Pages.Page.IsCurrent"))
542 {
543 <span class="products-list__more__page products-list__more__page--active">
544 @productListPageNumber
545 </span>
546 }
547 else
548 {
549 <a class="products-list__more__page" href="@productListPageUrl">
550 @productListPageNumber
551 </a>
552 }
553 }
554 }
555
556 @if (productListNextPage != string.Empty)
557 {
558 <a href="@productListNextPage" class="btn btn--icon-right">
559 @Translate("Next", "Næste")
560 <svg role="img"><use xlink:href="/Files/Templates/Designs/Inox/static/dist/icons.svg#arrow-right"></use></svg>
561 </a>
562 }
563
564 </div>
565 </div>
566 }
567 else
568 {
569 @Translate("OrderTemplate:NoProductInOrderTemplate", "Der er ingen produkter i den valgte favoritliste")
570 }
571 }
572
573 <input type="hidden" id="groupid" value="@GetString("Ecom:Group.ID")" />
574
575 <!--<section class="text-row">
576 <div class="wrap wrap-padding">
577 <div class="text-row__background">
578 <img src="data:image/svg+xml;base64,PHN2ZyBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pbiIgdmlld0JveD0iMCAwIDgyMCA1NDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGc+PHBhdGggZD0iTSA0NTEuOTA0MyA1Mi4yMTEyIEwgNDkwLjU2NDEgLTAuOTIyOSBMIDQwOS44NzI5IC0wLjI3NyBMIDQ1MS45MDQzIDUyLjIxMTIgWiIgZmlsbD0iIzMzMzMzMyIvPjxwYXRoIGQ9Ik0gLTEwLjAzMTcgNjgyLjA2NzQgTCA0MDkuODcyOSAxMTAuMDI5OCBMIDgyMS43Nzk4IDY4Mi4wNjc0IEwgODc5LjU5OTEgNjQyLjcwMTMgTCA0NTEuOTA0MyA1Mi4yMTEyIEwgNDA5Ljg3MjkgLTAuMjc3IEwgMzI4Ljg1MDggLTEuMDQ1NSBMIDM2Ny44NDE0IDUyLjIxMTIgTCAtNjIuNTE5NSA2NDIuNzAxMyBMIC0xMC4wMzE3IDY4Mi4wNjc0IFoiIGZpbGw9InJnYmEoMCwwLDAsLjEpIi8+PC9nPjwvc3ZnPg==" alt="">
579 </div>
580 <div class="text-row__content">
581 <h1>@GetString("Ecom:Group.Name")</h1>
582 @GetString("Ecom:Group.Description")
583 </div>
584 </div>
585 </section>-->
586
587 <section class="content-wrapper">
588 <div class="wrap wrap-padding">
589 @RenderSnippet("sidebarparents")
590 <h1 class="hidden-md hidden-lg">@GetString("Ecom:Group.Name")</h1>
591 </div>
592 </section>
593
594 <div class="content-wrapper products-list-wrapper">
595 <div class="wrap wrap-padding">
596 <div class="row">
597 <div class="col-12">
598 @Filters()
599 </div>
600 </div>
601 <div class="row hidden-xs hidden-sm">
602 <div class="col-12">
603 <div class="d-flex">
604 <button class="btn filters-collapse-toggle" type="button" data-bs-toggle="collapse" data-bs-target="#hiddenFacets" aria-expanded="false">
605 <span class="collapse-open-text">
606 @Translate("Filter Toggle Btn - Expand - Text", "Flere filtre")
607 </span>
608 <span class="collapse-close-text">
609 @Translate("Filter Toggle Btn - Collapse - Text", "Færre filtre")
610 </span>
611 </button>
612 <div class="filters-reset">
613 @Translate("Reset", "Nulstil")
614 </div>
615 </div>
616 </div>
617 </div>
618 </div>
619 </div>
620 <section class="bg-light">
621 <div class="content-wrapper products-list-wrapper">
622 <div class="wrap wrap-padding">
623 <div class="row">
624 <div class="col-12">
625 <div class="content">
626 @ProductList()
627 </div>
628 </div>
629 </div>
630 </div>
631 </div>
632 </section>