Error executing template "Designs/Swift/eCom/ProductCatalog/ALLM_ProfilesProducts_new.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_7d344294b47b43ae9a893c0eabb80bd4.Execute() in C:\inetpub\wwwroot\AllMedia\Production\Files\Templates\Designs\Swift\eCom\ProductCatalog\ALLM_ProfilesProducts_new.cshtml:line 510
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 ViewModelTemplate<ProductListViewModel>
2 @using Dynamicweb.Rendering
3 @using Dynamicweb.Ecommerce.ProductCatalog
4 @using System.Text.RegularExpressions
5 @using BrandFusion.Dw.AllMedia.Ecommerce
6 @using Dynamicweb.Ecommerce.Prices
7 @using Dynamicweb.Core
8 @using Dynamicweb.Frontend
9
10
11 @{
12 var paramMaterial = Dynamicweb.Context.Current.Request.QueryString.Get("Material");
13 var paramManufacturer = Dynamicweb.Context.Current.Request.QueryString.Get("Manufacturer");
14 var doNotShowVariantsAsSingleProducts = Dynamicweb.Context.Current.Request.QueryString.Get("DoNotShowVariantsAsSingleProducts");
15 var paramProductName = Dynamicweb.Context.Current.Request.QueryString.Get("ProductName");
16 var paramProductID = Dynamicweb.Context.Current.Request.QueryString.Get("paramProductID");
17 var paramVariantID = Dynamicweb.Context.Current.Request.QueryString.Get("paramVariantID");
18 var productImagePath = "/Images/missing_image.jpg&Format=WebP&Quality=100";
19 var paramProductParentNumber = Dynamicweb.Context.Current.Request.QueryString.Get("ProductNumber"); //Dynamicweb.Context.Current.Request.QueryString.Get("ParentProductNumber");
20 string iconPath = "/Files/Icons/";
21
22 var parms = new Dictionary<string, object>();
23 parms.Add("cssClass", "d-block mw-100 mh-100 m-auto");
24 parms.Add("fullwidth", true);
25 parms.Add("columns", "12");
26
27
28 var materialClass = string.IsNullOrEmpty(paramMaterial) ? "d-none" : "";
29 var manufacturerClass = string.IsNullOrEmpty(paramManufacturer) ? "d-none" : "";
30 var productNameClass = string.IsNullOrEmpty(paramProductName) ? "d-none" : "";
31 var productIDClass = string.IsNullOrEmpty(paramProductID) ? "d-none" : "";
32 var variantIDClass = string.IsNullOrEmpty(paramVariantID) ? "d-none" : "";
33
34
35 }
36
37 <div class="profile-service grid grid-1 grid-lg-2">
38 @if (Model.FacetGroups.Any())
39 {
40 foreach (var facetGroup in Model.FacetGroups)
41 {
42 foreach (var facetItem in facetGroup.Facets)
43 {
44 var dataOrderlineFieldContext = facetItem.Name.ToLower() == "material" ? $"data-orderline-field='EcomOrderLineFieldInput_Material1'" : $"data-orderline-field='EcomOrderLineFieldInput_Manufacturer1'";
45 var translateContext = facetItem.Name.ToLower() == "material" ? Translate("Material info tooltip") : Translate("Manufacturer info tooltip");
46
47 <div class="profile-select-wrapper">
48 <h6 class="fw-bold d-flex align-items-center">
49
50 @Translate(facetItem.Name)
51 <span class="is-required">*</span>
52 <div class="ms-2 fs-8" data-bs-toggle="tooltip" data-bs-placement="top" title="@translateContext">
53 @ReadFile(iconPath + "info.svg")
54 </div>
55
56 </h6>
57 <div class="selection-wrapper d-flex align-items-center">
58 <select id="@facetItem.Name" class="form-select @facetItem.Name text-capitalize" required @dataOrderlineFieldContext>
59 <option value="-1">@Translate("nothing selected")</option>
60 @foreach (FacetOptionViewModel facetOption in facetItem.Options)
61 {
62 var selected = facetOption.Name == paramMaterial || facetOption.Name == paramManufacturer ? "selected" : "";
63 <option @selected data-facet-queryParameter="@facetItem.QueryParameter">@facetOption.Name</option>
64 }
65 </select>
66 <button title="@Translate("remove selection")" class="remove-profile-selection @(facetItem.Name.ToLower() == "material" ? materialClass : manufacturerClass)" onclick="resetSelect(this)"><span>@ReadFile(iconPath + "x-circle.svg")</span></button>
67 </div>
68 </div>
69 }
70 }
71 }
72
73
74 @if(paramMaterial == null) {
75 <div class="profile-select-wrapper">
76 <h6 class="fw-bold d-flex align-items-center">@Translate("Manufacturer")<span class="is-required">*</span>
77 <div class="ms-2 fs-8" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Manufacturer info tooltip")">
78 @ReadFile(iconPath + "info.svg")
79 </div>
80 </h6>
81 <div class="selection-wrapper d-flex align-items-center">
82 <select class="form-select fake-manufacturer-select text-capitalize" disabled required data-orderline-field="EcomOrderLineFieldInput_Manufacturer1">
83 <option value="-1">@Translate("nothing selected")</option>
84 </select>
85 <button title="@Translate("remove selection")" class="remove-profile-selection @manufacturerClass" onclick="resetSelect(this)"><span>@ReadFile(iconPath + "x-circle.svg")</span></button>
86 </div>
87 </div>
88 }
89
90 <div class="profile-select-wrapper">
91 <h6 class="fw-bold d-flex align-items-center">@Translate("Profile")<span class="is-required">*</span>
92 <div class="ms-2 fs-8" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Profile info tooltip")">
93 @ReadFile(iconPath + "info.svg")
94 </div>
95 </h6>
96 @if(Model.Products.Any())
97 {
98 var distinctProducts = Model.Products.Where(x => x.ProductFields["ParentProductNumber"]?.Value == "").ToList();
99 @* .Where(p => !string.IsNullOrEmpty(p.VariantId))
100 .GroupBy(p => p.Id)
101 .Select(g => g.First())
102 *@
103 <div class="selection-wrapper d-flex align-items-center">
104 <select id="Profile" class="form-select Profile-select text-capitalize" @(string.IsNullOrEmpty(paramManufacturer) ? "disabled" : "") required data-orderline-field="EcomOrderLineFieldInput_Profil1" id="variant">
105 <option value="-1">@Translate("nothing selected")</option>
106 @foreach(var product in distinctProducts) {
107 var productNumber = product.Number;
108 var selected = product.Name == paramProductName ? "selected" : "";
109 <option @selected data-productNumber="@productNumber" data-variant-id="@product.VariantId" data-product-id="@product.Id">@product.Name</option>
110 }
111 </select>
112 <button title="@Translate("remove selection")" class="remove-profile-selection @productNameClass" onclick="resetSelect(this)"><span>@ReadFile(iconPath + "x-circle.svg")</span></button>
113 </div>
114 }
115 </div>
116
117 @* <div class="profile-select-wrapper">
118 <h6 class="fw-bold">@Translate("Profile Height")<span class="is-required">*</span></h6>
119 @if(Model.Products.Any())
120 {
121 <select id="ProfileHeight" class="form-select ProfileHeight-select" @(string.IsNullOrEmpty(paramProductName) ? "disabled" : "") required>
122 <option value="-1">@Translate("nothing selected")</option>
123 @foreach(var product in Model.Products) {
124 var variantList = product.VariantInfo.VariantInfo;
125 //var variantName = Dynamicweb.Ecommerce.Services.Variants.GetVariantName(product.VariantId);
126
127 var productId = product.Id;
128 if(variantList != null) {
129 foreach(var variant in variantList) {
130 var selected = variant.VariantID == paramVariantID ? "selected" : "";
131 <option @selected data-variant-id="@variant.VariantID" data-product-id="@productId">@variant.ProductName @product.Id</option>
132 }
133 }
134 }
135 </select>
136 }
137 </div> *@
138
139 <div class="profile-select-wrapper">
140 <h6 class="fw-bold d-flex align-items-center">@Translate("Profile Height")<span class="is-required">*</span>
141 <div class="ms-2 fs-8" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Profile height info tooltip")">
142 @ReadFile(iconPath + "info.svg")
143 </div>
144 </h6>
145 @if(Model.Products.Any())
146 {
147 <div class="selection-wrapper d-flex align-items-center">
148 <select id="ProfileHeight" class="form-select ProfileHeight-select text-capitalize" @(string.IsNullOrEmpty(paramProductName) ? "disabled" : "") required>
149 <option value="-1">@Translate("nothing selected")</option>
150 @{
151 var seenVariants = new HashSet<string>(); @*Lista de valori unice*@
152 }
153 @foreach(var product in Model.Products) {
154 var variantList = product.VariantInfo.VariantInfo;
155 var productId = product.Id;
156 if(variantList != null) {
157 foreach(var variant in variantList) {
158 @*Creare identificator unic*@
159 var variantIdentifier = $"{variant.VariantID}-{variant.ProductName}";
160
161 if (!seenVariants.Contains(variantIdentifier)) {
162 seenVariants.Add(variantIdentifier);
163 var selected = variant.VariantID == paramVariantID ? "selected" : "";
164 <option @selected data-variant-id="@variant.VariantID" data-product-id="@productId">@variant.ProductName</option>
165 }
166 }
167 }
168 }
169 </select>
170 <button title="@Translate("remove selection")" class="remove-profile-selection @productIDClass" onclick="resetSelect(this)"><span>@ReadFile(iconPath + "x-circle.svg")</span></button>
171 </div>
172 }
173 </div>
174
175 @foreach(var product in Model.Products.Where(x => x.Id == paramProductID)) {
176 productImagePath = $"/Files/Images/Products/Profiles/{paramProductParentNumber}.jpg"; //product.DefaultImage.Value;
177 @*foreach(var variant in product.VariantInfo.VariantInfo.Where(x => x.VariantID == paramVariantID)) {
178 productImagePath = variant.Image.Value;
179 <img src="@variant.Image.Value" alt="product image" style="width: 200px;"/>
180 }*@
181 }
182
183 @if(productImagePath != "") {
184 <div id="SmallScreenImages_9999" class="carousel border pointer-event carousel-profile-image" data-bs-ride="carousel">
185 <div class="carousel-inner h-100">
186 <div class="carousel-item active" data-bs-interval="99999">
187 <div class="h-100 ">
188 <a href="@productImagePath" class="d-block ratio" style="--bs-aspect-ratio: 75%" data-bs-toggle="modal" data-bs-target="#modal_9999">
189 <div class="d-flex align-items-center justify-content-center overflow-hidden h-100" data-bs-target="#ModalCarousel_9999" data-bs-slide-to="4">
190 <img srcset="/Admin/Public/GetImage.ashx?image=@productImagePath&width=640&format=webp 640w,
191 /Admin/Public/GetImage.ashx?image=@productImagePath&width=960&format=webp 960w,
192 /Admin/Public/GetImage.ashx?image=@productImagePath&width=1280&format=webp 1280w,
193 /Admin/Public/GetImage.ashx?image=@productImagePath&width=1920&format=webp 1920w"
194 src="/Admin/Public/GetImage.ashx?image=@productImagePath&width=640&format=webp"
195 sizes="(max-width: 992px) 100vw, 100vw"
196 loading="lazy"
197 decoding="async"
198 class="mw-100 mh-100"
199 style="object-fit: cover;object-position: 50% 50%;"
200 alt="profile image product" itemprop="image" data-image-number=""
201 />
202 </div>
203 </a>
204 </div>
205 </div>
206 </div>
207 </div>
208 }
209
210
211 <div class="modal fade swift_products-details-images-modal" id="modal_9999" tabindex="-1" aria-labelledby="productDetailsGalleryModalTitle_9999" aria-hidden="true">
212 <div class="modal-dialog modal-dialog-centered modal-xl">
213 <div class="modal-content">
214 <div class="modal-header visually-hidden">
215 <h5 class="modal-title" id="productDetailsGalleryModalTitle_9999">title test</h5>
216 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
217 </div>
218 <div class="modal-body p-2 p-lg-3 h-100">
219 <div id="ModalCarousel_9999" class="carousel h-100" data-bs-ride="carousel">
220 <div class="carousel-inner h-100">
221 <div class="carousel-item active h-100" data-bs-interval="99999">
222 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = productImagePath }, parms)
223 </div>
224 @*<button class="carousel-control-prev" type="button" data-bs-target="#ModalCarousel_9999" data-bs-slide="prev">
225 <span class="carousel-control-prev-icon" aria-hidden="true"></span>
226 <span class="visually-hidden">@Translate("Previous")</span>
227 </button>
228 <button class="carousel-control-next" type="button" data-bs-target="#ModalCarousel_9999" data-bs-slide="next">
229 <span class="carousel-control-next-icon" aria-hidden="true"></span>
230 <span class="visually-hidden">@Translate("Next")</span>
231 </button>*@
232 </div>
233 </div>
234 </div>
235 </div>
236 </div>
237 </div>
238
239
240 @* Product Width *@
241 @{
242 var cutterWidth = "";
243 var cutterHeight = "";
244 var profileLength = "";
245 var drillingProductNumber = "";
246 var getDrillingProductId = "";
247 }
248
249 @if(paramProductID != null && paramVariantID != null)
250 {
251 var productId = paramProductID;
252 var variantId = paramVariantID;
253 var getProduct = Dynamicweb.Ecommerce.Products.Product.GetProductById(productId);
254 ProductViewModelSettings productSetting = new ProductViewModelSettings
255 {
256 LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID,
257 CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code,
258 CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2,
259 ShopId = ""
260 };
261 ProductViewModel productObject = ViewModelFactory.CreateView(productSetting, productId, variantId);
262
263 foreach (var group in productObject.ProductCategories)
264 {
265 CategoryFieldViewModel category = group.Value;
266 foreach (var field in category.Fields)
267 {
268 if (field.Key == "Cutter_Width")
269 {
270 cutterWidth = field.Value.Value.ToString();
271 }
272 if (field.Key == "Cutter_Height")
273 {
274 cutterHeight = field.Value.Value.ToString();
275 }
276 if (field.Key == "Maximum_Length") {
277 profileLength = field.Value.Value.ToString();
278 }
279 if (field.Key == "Drilling_product")
280 {
281 drillingProductNumber = field.Value.Value.ToString();
282 }
283 }
284 }
285
286 var getDrillingProduct = Dynamicweb.Ecommerce.Products.Product.GetProductByNumber(drillingProductNumber);
287 getDrillingProductId = getDrillingProduct.Id;
288 }
289
290
291 <div class="product-custom-fields" data-product-height="@cutterHeight" data-product-width="@cutterWidth" data-product-length="@profileLength" data-drilling-productid="@getDrillingProductId"></div>
292
293 </div>
294
295
296
297 <script>
298 document.addEventListener('keydown', function(event) {
299 const carousel = document.querySelector('[id^="ModalCarousel_"]');
300
301 if (carousel) {
302 if (event.key === 'ArrowRight') {
303 carousel.querySelector('.carousel-control-next').click();
304 } else if (event.key === 'ArrowLeft') {
305 carousel.querySelector('.carousel-control-prev').click();
306 }
307 }
308 });
309 </script>
310
311
312
313 @{
314 var profileServicePageId = GetPageIdByNavigationTag("ProfilesService");
315 var profileServcePageUrl = $"/Default.aspx?ID={profileServicePageId}";
316 var cartPageId = GetPageIdByNavigationTag("CartPageProfile");
317 var cartPageUrl = $"/Default.aspx?ID={cartPageId}";
318 var uniqueId = Guid.NewGuid().ToString();
319
320 var profilesOrderlineServicePageId = GetPageIdByNavigationTag("CartProfilesOrderLines");
321 var profilesOrderlineServiceUrl = $"/Default.aspx?ID={profilesOrderlineServicePageId}";
322 }
323
324
325 <div class="profiles-selects_wrapper mb-3" data-profile-page="@profileServcePageUrl" data-profile-orderlines-page="@profilesOrderlineServiceUrl">
326 </div>
327
328 <div
329 class="profiles-fields_wrapper grid d-none"
330 data-translation-length-empty="@Translate("Length is empty")"
331 data-translation-width-empty="@Translate("Width is empty")"
332 data-translation-numberofpieces-empty="@Translate("Number of pieces is empty")"
333 data-translation-warning="@Translate("Warning")"
334 data-translation-invalidlength="@Translate("Invalid length")"
335 >
336 <div class="g-col-12 grid gap-3">
337 <div class="g-col-3">
338 <div class="form-floating">
339 <input
340 type="number"
341 id="Length"
342 data-orderline-field="EcomOrderLineFieldInput_Length1"
343 class="form-control pe-4" name="Length"
344 placeholder="@Translate("Length")"
345 required
346 data-exceeds-translate="@Translate("The entered amount exceeds {amount}. Would you like to add a connection method?")"
347 data-error-invalid-length="@Translate("Invalid length value")"
348 required
349 data-connection-method1-translate="@Translate("Don't add anything")"
350 data-connection-method2-translate="@Translate("Add conectors")"
351 data-connection-method3-translate="@Translate("Add adhesive")"
352 />
353 <label class="form-label fw-bold" for="Length">@Translate("Length")<span class="is-required">*</span></label>
354 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Length info tooltip")">
355 @ReadFile(iconPath + "info.svg")
356 </div>
357 </div>
358 </div>
359 <div class="g-col-3">
360 <div class="form-floating">
361 <input name="NoOfPieces" class="form-control pe-4" placeholder="@Translate("Number of pieces")" id="NoOfPieces" type="number" min="0" data-orderline-field="EcomOrderLineFieldInput_NumberOfPieces1" data-error-invalid-length="Invalid NoOfPieces value" required/>
362 <label class="form-label fw-bold" for="NoOfPieces">@Translate("Number of pieces")<span class="is-required">*</span></label>
363 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Number of pieces info tooltip")">
364 @ReadFile(iconPath + "info.svg")
365 </div>
366 </div>
367 </div>
368 <div class="g-col-3">
369 <div class="form-floating">
370 <input name="Width" class="form-control pe-4" placeholder="@Translate("Width")" id="Width" type="number" data-orderline-field="EcomOrderLineFieldInput_Width1" onchange="ChangeProfileWidth(event)" required readonly/>
371 <label class="form-label fw-bold" for="Width">@Translate("Width")</label>
372 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Width info tooltip")">
373 @ReadFile(iconPath + "info.svg")
374 </div>
375 </div>
376 </div>
377 <div class="g-col-3">
378 <div class="form-floating">
379 <input name="Position" class="form-control pe-4" placeholder="@Translate("Position")" id="Position" type="text" data-orderline-field="EcomOrderLineFieldInput_ProfilePosition1"/>
380 <label class="form-label fw-bold" for="Position">@Translate("Position")</label>
381 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Position info tooltip")">
382 @ReadFile(iconPath + "info.svg")
383 </div>
384 </div>
385 </div>
386 </div>
387
388 <div class="g-col-12 grid gap-3">
389 <div class="g-col-3">
390 <div class="form-floating">
391 <input name="ProjectName" class="form-control pe-4" placeholder="@Translate("Project name")" id="ProjectName" type="text" data-orderline-field="EcomOrderLineFieldInput_ProjectName1"/>
392 <label class="form-label fw-bold" for="ProjectName">@Translate("Project name")</label>
393 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Project name info tooltip")">
394 @ReadFile(iconPath + "info.svg")
395 </div>
396 </div>
397 </div>
398 <div class="g-col-3">
399 <div class="form-floating">
400 <input name="Contract" class="form-control pe-4" placeholder="@Translate("Contract")" id="Contract" type="text" data-orderline-field="EcomOrderLineFieldInput_Contract1"/>
401 <label class="form-label fw-bold" for="Contract">@Translate("Contract")</label>
402 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Contract name info tooltip")">
403 @ReadFile(iconPath + "info.svg")
404 </div>
405 </div>
406 </div>
407 <div class="g-col-3">
408 <div class="form-floating">
409 <input name="PurchaseOrderNumber" class="form-control pe-4" placeholder="@Translate("Purchase order number")" id="PurchaseOrderNumber" type="text" data-orderline-field="EcomOrderLineFieldInput_PurchaseOrderNumber1"/>
410 <label class="form-label fw-bold" for="PurchaseOrderNumber">@Translate("Purchase order number")</label>
411 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Purchase order number info tooltip")">
412 @ReadFile(iconPath + "info.svg")
413 </div>
414 </div>
415 </div>
416 <div class="g-col-3">
417 <div class="form-group d-flex flex-column">
418 <label class="form-label fw-bold" style="line-height:1; margin-bottom: 3px;" for="FilterFromDate">Requested delivery date</label>
419 <input type="date" class="form-control" id="RequestedDeliveryDate" min="2024-06-26" name="RequestedDeliveryDate" data-past-date-translate="Cannot select a past date" data-orderline-field="EcomOrderLineFieldInput_RequestedDeliveryDate1"/>
420 <div class="ms-2 fs-8 tooltip_inside-input" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Contract name info tooltip")">
421 @ReadFile(iconPath + "info.svg")
422 </div>
423 </div>
424 </div>
425 </div>
426 <div class="g-col-6 grid gap-3">
427 @* <div class="g-col-12">
428 <div class="form-floating">
429 <input name="NoOfHoles" class="form-control" placeholder="@Translate("Number of holes")" id="NoOfHoles" type="number" data-orderline-field="EcomOrderLineFieldInput_NumberOfHoles1"/>
430 <label class="form-label fw-bold" for="NoOfHoles">@Translate("Number of holes")</label>
431 </div>
432 </div> *@
433
434
435 </div>
436
437 <div class="product-vouchers-containers g-col-12 gap-1">
438 <div class="d-none">
439 <input type="checkbox" name="ToMill" id="ToMill" checked="" data-orderline-field="EcomOrderLineFieldInput_ToMill1" data-message-width="Please select a Profile before using this option" data-message-pieces="Please select a Length before using this option" style="margin: 0 5px 0 0;">
440 <label class="form-label fw-bold" for="ToMill">To Mill</label>
441 </div>
442
443 <div class="form-check g-col-6 d-flex align-items-center">
444 <input class="form-check-input me-2" type="checkbox" name="DrillHole" value="" id="DrillHole" data-orderline-field="EcomOrderLineFieldInput_Drill1" data-message-width="Please select a Profile before using this option" data-message-pieces="Please select a Length before using this option"/>
445 <label class="form-check-label" for="DrillHole">
446 @Translate("Drill a hole for the washers")
447 </label>
448 <div class="ms-2 fs-8" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Drill info tooltip")">
449 @ReadFile(iconPath + "info.svg")
450 </div>
451 </div>
452
453 @*<div class="form-check g-col-6">
454 <input class="form-check-input" type="checkbox" name="AddAdhesiveOne" value="" id="AddAdhesiveOne" data-orderline-field="EcomOrderLineFieldInput_Drill1" data-message-width="Please select a Profile before using this option" data-message-length="Please select a Length before using this option" data-error-invalid-length="Please fill in a valid Length value before using this option" checked />
455 <label class="form-check-label" for="AddAdhesiveOne">
456 @Translate("Adhesive One")
457 </label>
458 </div>*@
459
460 <div class="form-check g-col-6">
461 <div class="d-flex align-items-center">
462 <input class="form-check-input me-2" type="checkbox" name="AddAdhesiveWithQuantityInputCheckbox" value="" id="AddAdhesiveWithQuantityInputCheckbox"/>
463 <label class="form-check-label" for="AddAdhesiveWithQuantityInputCheckbox">
464 @Translate("Add adhesive with quantity")
465 </label>
466 <div class="ms-2 fs-8" data-bs-toggle="tooltip" data-bs-placement="top" title="@Translate("Adhesive with quantity info tooltip")">
467 @ReadFile(iconPath + "info.svg")
468 </div>
469 </div>
470 <div class="d-none" data-ref="adhesive-quantity-wrapper">
471 <input type="number" id="AddAdhesiveWithQuantityInput" min="0" value="0"/>
472 </div>
473 </div>
474 </div>
475
476 <div class="comment-container g-col-12">
477 <h3 class="h6 mb-1 fw-bold">@Translate("Poznámka")</h3>
478 <textarea style="height: 58px;" placeholder="Enter your comment here" class="w-100 p-3" id="OrderlineAdditionalInfo" name="OrderlineAdditionalInfo" rows="10" cols="10" data-orderline-field="EcomOrderLineFieldInput_OrderlineAdditionalInfo1" spellcheck="false"></textarea>
479 </div>
480
481 <div class="d-none">
482 <input name="ProfileWidthWasChanged" id="ProfileWidthWasChanged" type="text" data-orderline-field="EcomOrderLineFieldInput_ProfileWidthWasChanged1" value="false">
483 <input name="NumberOfConnectors" id="NumberOfConnectors" type="number" data-orderline-field="EcomOrderLineFieldInput_NumberOfConnectors1" value="0">
484 <input name="ProfileHeight" id="ProfileHeightHiddenField" type="number" data-orderline-field="EcomOrderLineFieldInput_Height1">
485 <input type="text" id="AddhesiveOneQuantity" name="AddhesiveOneQuantity" data-orderline-field="EcomOrderLineFieldInput_AddhesiveOneQuantity1" value="">
486 <input type="text" id="AddhesiveTwoQuantity" name="AddhesiveTwoQuantity" data-orderline-field="EcomOrderLineFieldInput_AddhesiveTwoQuantity1" value="">
487 </div>
488
489 <div class="submit-button_container g-col-12 text-end mb-5">
490 <button class="btn btn-primary submit_profiles" type="button" data-add-to-list-translate="@Translate("Add to List")" data-fill-all-fields-translate="@Translate("Please fill in all empty fields")" data-product-was-added-translate="@Translate("Product was added to the list")" data-role="submitProfile">@Translate("Add to List")</button>
491 </div>
492 </div>
493
494
495 <div class="profiles_orderlines-wrapper"></div>
496
497
498 @*de adaugat conectorii in formular cu id-uri 100 101 - quantity default 0*@
499 @* toate orderline-urile trebuie sa aiba aceeasi valoare pe custom ord field uniqueid*@
500
501 @{
502 //adhesive
503 var getproductByNumberTT73840 = Dynamicweb.Ecommerce.Products.Product.GetProductByNumber("TT73840");
504 var getproductIdTT73840 = getproductByNumberTT73840.Id;
505 var getproductByNumberTT65502 = Dynamicweb.Ecommerce.Products.Product.GetProductByNumber("TT65502");
506 var getproductIdTT65502 = getproductByNumberTT65502.Id;
507
508 //connectors
509 var getproductByNumberPF95600 = Dynamicweb.Ecommerce.Products.Product.GetProductByNumber("PF95600");
510 var getproductIdPF95600 = getproductByNumberPF95600.Id;
511 var getproductByNumberPF95610 = Dynamicweb.Ecommerce.Products.Product.GetProductByNumber("PF95610");
512 var getproductIdPF95610 = getproductByNumberPF95610.Id;
513
514 }
515
516 <form name="addToCartProfiles" id="addToCartProfiles" method="post">
517 <input type="hidden" name="CartCmd" id="CartCmd" value="addMulti" />
518 <input type="hidden" name="ORDERCONTEXT" id="ORDERCONTEXT" value="ORDERCONTEXT4" />
519 <input type="hidden" name="ProductID1" id="ProductID" value="" />
520 <input type="hidden" name="VariantID1" id="VariantID" value="" />
521 <input type="hidden" name="Quantity1" id="Quantity" value="1" />
522 <input type="hidden" name="ProductLoopCounter1" value="1" />
523 <input type="hidden" name="ProductID2" value="@getproductIdTT73840" />
524 <input type="hidden" name="VariantID2" value="" />
525 <input type="hidden" name="Quantity2" data-ref="TT73840Quantity" value="0" />
526 <input type="hidden" name="ProductLoopCounter2" value="2" />
527 <input type="hidden" name="ProductID3" value="@getproductIdTT65502" />
528 <input type="hidden" name="VariantID3" value="" />
529 <input type="hidden" name="Quantity3" data-ref="TT65502Quantity" value="0" />
530 <input type="hidden" name="ProductLoopCounter3" value="3" />
531 <input type="hidden" name="UnitID1" value="KS">
532
533 @* drilling product *@
534
535 <input type="hidden" name="ProductID4" id="ProductID4" value="" />
536 <input type="hidden" name="VariantID4" id="VariantID4" value="" />
537 <input type="hidden" name="Quantity4" id="Quantity4" value="" />
538 <input type="hidden" name="ProductLoopCounter4" value="4" />
539
540
541
542 @*connectors*@
543 <input type="hidden" name="ProductLoopCounter100" value="100" />
544 <input type="hidden" id="Connector1" name="ProductID100" value="@getproductIdPF95600">
545 <input type="hidden" id="ConnectorQuantity1" name="Quantity100" value="0" /> @*0 by default for preventing add it to the cart*@
546 <input type="hidden" name="ProductLoopCounter101" value="101" />
547 <input type="hidden" id="Connector2" name="ProductID101" value="@getproductIdPF95610">
548 <input type="hidden" id="ConnectorQuantity2" name="Quantity101" value="0" /> @* 0 by default for preventing add it to the cart*@
549
550 @*unique_id for each orderline field*@
551 <input type="hidden" id="UniqueId1" name="EcomOrderLineFieldInput_UniqueId1" value="@uniqueId">
552 <input type="hidden" id="UniqueId2" name="EcomOrderLineFieldInput_UniqueId2" value="@uniqueId">
553 <input type="hidden" id="UniqueId3" name="EcomOrderLineFieldInput_UniqueId3" value="@uniqueId">
554 <input type="hidden" id="UniqueId4" name="EcomOrderLineFieldInput_UniqueId4" value="@uniqueId"> @*unique id for drilling product*@
555 <input type="hidden" id="UniqueId100" name="EcomOrderLineFieldInput_UniqueId100" value="@uniqueId"> @* unique id for connector 1*@
556 <input type="hidden" id="UniqueId101" name="EcomOrderLineFieldInput_UniqueId101" value="@uniqueId"> @* unique id for connector 2*@
557 <input type="hidden" name="EcomOrderVoucherCode" id="EcomOrderVoucherCode" value="" />
558 </form>