Slider test 1

Error executing template "Designs/Swift/Paragraph/Swift_ProductListGroupImage.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_53c3f5be3e4446229b9c9ef45f912f5b.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) in /_/src/Application/Providers/Dynamicweb.Rendering.Providers.NetCore/Razor/RazorTemplateRenderingProvider.cs:line 68
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\TemplateRenderingService.cs:line 14
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\Template.cs:line 805

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Frontend.Navigation 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Environment 5 @using Dynamicweb.Frontend 6 7 @{ 8 ProductListViewModel productList = null; 9 if (Dynamicweb.Context.Current.Items.Contains("ProductList")) 10 { 11 productList = (ProductListViewModel)Dynamicweb.Context.Current.Items["ProductList"]; 12 } 13 else if (Pageview.Page.Item["DummyProductGroup"] != null && Pageview.IsVisualEditorMode) 14 { 15 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 16 ProductListViewModel groupList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 17 18 if (groupList?.Products is object) 19 { 20 productList = groupList; 21 } 22 } 23 } 24 25 @if (productList is object) { 26 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : string.Empty; 27 if (groupImage.StartsWith("/") && !groupImage.StartsWith("/Files", StringComparison.OrdinalIgnoreCase)) 28 { 29 groupImage = $"/Files{groupImage}"; 30 } 31 32 string groupName = productList?.Group?.Name != null ? productList.Group.Name : string.Empty; 33 34 string ratio = Model.Item.GetRawValueString("ImageAspectRatio", string.Empty); 35 ratio = ratio != "0" ? ratio : string.Empty; 36 string ratioCssClass = ratio != string.Empty && ratio != "fill" ? " ratio" : string.Empty; 37 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 38 string fillClass = ratio == "fill" ? " h-100" : ""; 39 40 var parms = new Dictionary<string, object>(); 41 parms.Add("loading", "lazy"); 42 parms.Add("columns", Model.GridRowColumnCount); 43 44 if (ratio == "fill") { 45 parms.Add("cssClass", "w-100 h-100"); 46 } 47 else 48 { 49 parms.Add("cssClass", "mw-100 mh-100"); 50 } 51 52 parms.Add("style", string.Empty); 53 parms.Add("alt", groupName); 54 55 if (!string.IsNullOrEmpty(groupImage)) { 56 <div class="item_@Model.Item.SystemName.ToLower()"> 57 <figure class="m-0@(ratioCssClass)@(fillClass)" @ratioVariable> 58 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 59 </figure> 60 </div> 61 } else if (Pageview.IsVisualEditorMode) { 62 <div class="alert alert-dark m-0" role="alert"> 63 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 64 </div> 65 } 66 } else if (Pageview.IsVisualEditorMode) 67 { 68 <div class="alert alert-dark m-0" role="alert"> 69 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 70 </div> 71 } 72 73

Gender

Color

Size

Populære produkter

Product 1
Product 1

Product 1

Product 1, Orange

Variant Name

Product 1, Orange

Variant Price

£6.84

Product 1, Red

Variant Name

Product 1, Red

Variant Price

£6.84

S

Variant Name

Product 1, S

Variant Price

£6.84

M

Variant Name

Product 1, M

Variant Price

£6.84

L

Variant Name

Product 1, L

Variant Price

£6.84

£6.84 InStock
3658 Many in stock. 2-3 days delivery.
Product 2
Product 2

Product 2

£136.78 InStock
494 Many in stock. 2-3 days delivery.
Product 3
Product 3

Product 3

£304.34 InStock
989 Many in stock. 2-3 days delivery.
Product 4
Product 4

Product 4

Product 4, Black

Variant Name

Product 4, Black

Variant Price

£136.78

Product 4, Red

Variant Name

Product 4, Red

Variant Price

£136.78

£136.78 InStock
Product 5
Product 5

Product 5

Product 5, Black

Variant Name

Product 5, Black

Variant Price

£136.78

Product 5, Blue

Variant Name

Product 5, Blue

Variant Price

£136.78

Product 5, Green

Variant Name

Product 5, Green

Variant Price

£136.78

+1
£136.78 InStock
3967 Many in stock. 2-3 days delivery.
Product 6
Product 6

Product 6

£13.68 InStock
1000 In stock
Product 7
Product 7

Product 7

£13.68 InStock
100 In stock
Product 8
Product 8

Product 8

£13.68 InStock
100 In stock
Product 9
Product 9

Product 9

£13.68 InStock
100 In stock
Product 10
Product 10

Product 10

£13.68 InStock
100 In stock
Product 11
Product 11

Product 11

£13.68 InStock
100 In stock
Product 12
Product 12

Product 12

£13.68 InStock
100 In stock
Product 13
Product 13

Product 13

£13.68 InStock
100 In stock
Product 14
Product 14

Product 14

£13.68 InStock
100 In stock
Product 15
Product 15

Product 15

£13.68 InStock
100 In stock
Product 16
Product 16

Product 16

£13.68 InStock
100 In stock
Product 17
Product 17

Product 17

£13.68 InStock
99 In stock
Product 18
Product 18

Product 18

£13.68 InStock
98 In stock
Product 19
Product 19

Product 19

£13.68 InStock
99 In stock
Product 20
Product 20

Product 20

£13.68 InStock
99 In stock
20 out of 20 products
Product 1

Product 1

3658 Many in stock.

£6.84

3658 Many in stock.

£6.84
Product 2

Product 2

494 Many in stock.

£136.78

494 Many in stock.

£136.78
Product 3

Product 3

989 Many in stock.

£304.34

989 Many in stock.

£304.34
Product 4

Product 4

345 Many in stock.

£136.78

345 Many in stock.

£136.78
Product 5

Product 5

3967 Many in stock.

£136.78

3967 Many in stock.

£136.78
Product 6

Product 6

1000 In stock

£13.68

1000 In stock

£13.68
Product 7

Product 7

100 In stock

£13.68

100 In stock

£13.68
Product 8

Product 8

100 In stock

£13.68

100 In stock

£13.68
Product 9

Product 9

100 In stock

£13.68

100 In stock

£13.68
Product 10

Product 10

100 In stock

£13.68

100 In stock

£13.68
Product 11

Product 11

100 In stock

£13.68

100 In stock

£13.68
Product 12

Product 12

100 In stock

£13.68

100 In stock

£13.68
Product 13

Product 13

100 In stock

£13.68

100 In stock

£13.68
Product 14

Product 14

100 In stock

£13.68

100 In stock

£13.68
Product 15

Product 15

100 In stock

£13.68

100 In stock

£13.68
Product 16

Product 16

100 In stock

£13.68

100 In stock

£13.68
Product 17

Product 17

99 In stock

£13.68

99 In stock

£13.68
Product 18

Product 18

98 In stock

£13.68

98 In stock

£13.68
Product 19

Product 19

99 In stock

£13.68

99 In stock

£13.68
Product 20

Product 20

99 In stock

£13.68

99 In stock

£13.68
20 out of 20 products
Product 1

Product 1

3658 Many in stock.

3658 Many in stock.

£6.84
Product 2

Product 2

494 Many in stock.

494 Many in stock.

£136.78
Product 3

Product 3

989 Many in stock.

989 Many in stock.

£304.34
Product 4

Product 4

345 Many in stock.

345 Many in stock.

£136.78
Product 5

Product 5

3967 Many in stock.

3967 Many in stock.

£136.78
Product 6

Product 6

1000 In stock

1000 In stock

£13.68
Product 7

Product 7

100 In stock

100 In stock

£13.68
Product 8

Product 8

100 In stock

100 In stock

£13.68
Product 9

Product 9

100 In stock

100 In stock

£13.68
Product 10

Product 10

100 In stock

100 In stock

£13.68
Product 11

Product 11

100 In stock

100 In stock

£13.68
Product 12

Product 12

100 In stock

100 In stock

£13.68
Product 13

Product 13

100 In stock

100 In stock

£13.68
Product 14

Product 14

100 In stock

100 In stock

£13.68
Product 15

Product 15

100 In stock

100 In stock

£13.68
Product 16

Product 16

100 In stock

100 In stock

£13.68
Product 17

Product 17

99 In stock

99 In stock

£13.68
Product 18

Product 18

98 In stock

98 In stock

£13.68
Product 19

Product 19

99 In stock

99 In stock

£13.68
Product 20

Product 20

99 In stock

99 In stock

£13.68
20 out of 20 products
20 out of 20 products
By clicking 'Accept All' you consent that we may collect information about you for various purposes, including: Statistics and Marketing