Main categories at Agromek
At Agromek, you will see the exhibitors are divided by main categories to give you a better overview of what you can find and where.
For each main category there are a wide range of products. See more here:
Products at Agromek
Error executing template "Designs/exhibition_site/QueryPublisher/MCH365-products.cshtml"
System.Exception: _dynamicwebProduct is null. Settings are: {"Product":null,"Id":"PPdc7356d7c2413f91a0c5261d56cf","LanguageId":null,"VariantId":"","PrimaryVariantId":"","EmbeddedInModelList":true}
at Co3.Espresso.Website.Models.FrontEnd.Ecommerce.EspressoProduct.Populate(ProductSettings settings) in F:\TeamCity\BuildAgent 1\work\ea1444d680f7414e\Co3.Espresso.Website\Models\FrontEnd\Ecommerce\EspressoProduct.cs:line 749
at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProductProduct.Populate(ProductSettings settings) in C:\Data\Development\git\mch365mb-dev\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProductProduct.cs:line 137
at Co3.MCH.Website.Frontend.Services.Ecommerce.ProductService.GetEspressoProduct(ProductSettings settings, String key) in C:\Data\Development\git\mch365mb-dev\Co3.MCH.Website.Frontend\Services\Ecommerce\ProductService.cs:line 59
at CompiledRazorTemplates.Dynamic.RazorEngine_4cda0cd98b1e4613a32653800189211e.<>c__DisplayClass1_0.<Execute>b__0(LoopItem product) in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\MCH365-products.cshtml:line 84
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at CompiledRazorTemplates.Dynamic.RazorEngine_4cda0cd98b1e4613a32653800189211e.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\MCH365-products.cshtml:line 80
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 Co3.Espresso.Website.TemplateBases.Paragraphs.Module
2 @using System.Web
3 @using Co3.Espresso.Website.Services
4 @using Co3.Espresso.Website.Models.FrontEnd
5 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce
6 @using Co3.Espresso.Website.Models.FrontEnd.Settings
7 @using Co3.Espresso.Website.Models.FrontEnd.Handlebars
8 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce
9 @using Co3.MCH.Website.Frontend.Models.Frontend.Users
10 @using Dynamicweb.Ecommerce.ShippingProviders.GLS.GLSwsPakkeshop
11 @using Dynamicweb.Environment
12 @using Dynamicweb.Frontend
13 @using Dynamicweb.Modules
14 @using Cookie = Dynamicweb.Environment.Cookie
15 16 @{
17 bool showFilters = Espresso.Item.FiltersShow == "True";
18 EspressoSort sort = ProductListService.Instance.GetSort();
19 string assetType = Espresso.Item.Type;
20 string q = HttpUtility.HtmlAttributeEncode( HttpContext.Current.Request[ "q" ] );
21 22 HandlebarsProductListTemplate handlebarsProductListTemplate = HandlebarsService.Instance.GetProductListTemplate( new HandlebarsProductListTemplateSettings()
23 {
24 Classes = new ClassList( "e-productlist js-e-require" ),
25 HeaderClasses = new ClassList( "col-12 border-bottom" ),
26 MainClasses = new ClassList( showFilters ? "col-12 col-lg-9 col-xl-9" : "col-12" ),
27 AsideClasses = new ClassList( "col-12 col-lg-3 col-xl-3" ),
28 FooterClasses = new ClassList( "col-12 col-lg-3 col-xl-3" ),
29 PageSize = string.IsNullOrEmpty( HttpContext.Current.Request[ "PageSize" ] ) ? GetInteger( "DwPaging.PageSize" ).ToString() : HttpContext.Current.Request[ "PageSize" ],
30 PageNumber = string.IsNullOrEmpty( HttpContext.Current.Request[ "PageNum" ] ) ? GetInteger( "DwPaging.CurrentPage" ).ToString() : HttpContext.Current.Request[ "PageNum" ],
31 SortBy = string.IsNullOrEmpty( HttpContext.Current.Request[ "SortBy" ] ) ? sort.By : HttpContext.Current.Request[ "SortBy" ],
32 SortOrder = string.IsNullOrEmpty( HttpContext.Current.Request[ "SortOrder" ] ) ? sort.Order : HttpContext.Current.Request[ "SortOrder" ],
33 ShowFilters = showFilters,
34 ShowSorting = Espresso.Item.SortShow == "True",
35 Heading = Espresso.Item.HeadingShow == "True" ? Espresso.Item.Name : string.Empty
36 } );
37 38 List< EspressoPagingPage > productListPaging = new List< EspressoPagingPage >();
39 if ( GetLoop( "DwPaging.LoopAllPages" ).Count > 0 )
40 {
41 foreach ( LoopItem page in GetLoop( "DwPaging.LoopAllPages" ) )
42 {
43 productListPaging.Add( new EspressoPagingPage()
44 {
45 Url = page.GetString( "AllPages.PageLink" ),
46 Number = page.GetString( "AllPages.PageNumber" )
47 } );
48 }
49 }
50 51 string listKey = string.Empty;
52 switch ( assetType )
53 {
54 case "article":
55 listKey = nameof( ArticleMergeProduct );
56 break;
57 case "case":
58 listKey = nameof( ArticleMergeProduct );
59 break;
60 case "articlemerge":
61 listKey = nameof( ArticleMergeProduct );
62 break;
63 case "event":
64 listKey = nameof( EventProduct );
65 break;
66 case "contact":
67 listKey = nameof( ContactPersonProduct );
68 break;
69 case "product":
70 listKey = nameof( ProductProduct );
71 break;
72 case "profile":
73 listKey = nameof( ProfileProduct );
74 break;
75 default:
76 listKey = nameof( ProductProduct );
77 break;
78 }
79 80 EspressoProductList espressoProductList = Co3.MCH.Website.Frontend.Services.Ecommerce.ProductListService.Instance.GetProductList(
81 new ProductListSettings()
82 {
83 Products = GetLoop( "QueryResultItem" ).Select(
84 product => Co3.MCH.Website.Frontend.Services.Ecommerce.ProductService.Instance.GetEspressoProduct(
85 new ProductSettings()
86 {
87 Id = product.GetString( "ID" ),
88 VariantId = product.GetString( "VariantID" ),
89 PrimaryVariantId = product.GetString( "DefaultVariantComboID" ),
90 EmbeddedInModelList = true
91 }, listKey
92 )
93 ).ToList(),
94 Paging = productListPaging,
95 PageSize = Convert.ToInt32( handlebarsProductListTemplate.PageSize ),
96 CurrentPage = Convert.ToInt32( handlebarsProductListTemplate.PageNumber )
97 }, listKey );
98 }
99100 <div class="@handlebarsProductListTemplate.Classes" data-current-page="@GetInteger( "Ecom:ProductList.CurrentPage" )" data-page-count="@GetLoop( "Ecom:ProductList.Pages" ).Count" data-page-size="@handlebarsProductListTemplate.PageSize" data-products-url="@Espresso.Item.ProductsUrl" data-filters-url="@Espresso.Item.ProductsUrl" data-require="productlist">
101 <div class="row">
102 <div class="col-12">
103104 <form class="js-e-productlist-form js-e-require" data-require="selectMultiple">
105106 <input name="PageNum" type="hidden" value="@HttpUtility.HtmlAttributeEncode( handlebarsProductListTemplate.PageNumber )">
107 <input name="SortBy" type="hidden" value="@HttpUtility.HtmlAttributeEncode( handlebarsProductListTemplate.SortBy )">
108 <input name="SortOrder" type="hidden" value="@HttpUtility.HtmlAttributeEncode( handlebarsProductListTemplate.SortOrder )">
109 <input name="PageSize" type="hidden" value="@HttpUtility.HtmlAttributeEncode( handlebarsProductListTemplate.PageSize )">
110 <input name="ProductAssetType" type="hidden" value="@HttpUtility.HtmlAttributeEncode( assetType )">
111112 @if ( Espresso.Item.SearchShow != "True" )
113 {
114 <input name="q" type="hidden" class="e-productlist-filters-search-input e-search-input form-control-plaintext js-e-search-input" value="@q">
115 }
116117 @if ( handlebarsProductListTemplate.ShowFilters )
118 {
119 foreach ( LoopItem facetGroup in GetLoop( "FacetGroups" ) )
120 {
121 <input name="fg" type="hidden" value="@facetGroup.GetString( "FacetGroup.Name" )">
122 }
123 }
124125 @foreach ( LoopItem queryParameter in GetLoop( "Query.Parameters" ) )
126 {
127 if ( string.IsNullOrEmpty( queryParameter.GetString( "Parameter.Value" ) ) == false )
128 {
129 if ( queryParameter.GetBoolean( "Parameter.IsHandledAsFacet" ) == false && queryParameter.GetString( "Parameter.Name" ) != "q" )
130 {
131 <input name="@queryParameter.GetString( "Parameter.Name" )" type="hidden" value="@HttpUtility.HtmlAttributeEncode( queryParameter.GetString( "Parameter.Value" ) )">
132 }
133 }
134 }
135136 @RenderingService.Instance.PartialView( "querypublisher/partials/mch365-filters.cshtml", Espresso )
137 </form>
138139 @RenderingService.Instance.PartialView( "querypublisher/partials/mch365-header.cshtml", handlebarsProductListTemplate )
140141 </div>
142143 <div class="col-12">
144 @RenderingService.Instance.PartialView( "querypublisher/partials/mch365-products.cshtml", espressoProductList )
145 @RenderingService.Instance.PartialView( "querypublisher/partials/mch365-paging.cshtml", espressoProductList )
146 </div>
147 </div>
148 </div>
149





