Din indkøbskurv er tom.
Men det behøver den ikke at være.
vores 2020 bestsellers
Error compiling template "Designs/kkwind/eCom/Productlist/espresso.cshtml" Line 51: The type or namespace name 'EspressoSort' could not be found (are you missing a using directive or an assembly reference?) Line 51: 'ProductListService' does not contain a definition for 'GetSort' and no accessible extension method 'GetSort' accepting a first argument of type 'ProductListService' could be found (are you missing a using directive or an assembly reference?)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 using System.Linq; 15 16 #line 2 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 17 using Co3.Espresso.Website.Services; 18 19 #line default 20 #line hidden 21 22 #line 3 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 23 using Co3.Espresso.Website.Models.FrontEnd.Ecommerce; 24 25 #line default 26 #line hidden 27 28 #line 4 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 29 using System.Web; 30 31 #line default 32 #line hidden 33 34 35 public class RazorEngine_133c70b1c8a34565b06a493e6634b0cb : Co3.Espresso.Website.TemplateBases.Paragraphs.Module { 36 37 #line hidden 38 39 public RazorEngine_133c70b1c8a34565b06a493e6634b0cb() { 40 } 41 42 public override void Execute() { 43 WriteLiteral("\r\n"); 44 45 46 #line 6 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 47 48 const string jsonSrc = "/system/data/products"; 49 string handlebarsTemplateName = string.Format( "jsonPublisher-pid{0}", Espresso.Id ); 50 51 EspressoSort sort = ProductListService.Instance.GetSort(); 52 53 Dictionary< string, string > jsonSrcGetParameters = new Dictionary< string, string > { 54 { 55 "SortBy", sort.By 56 57 }, 58 { 59 "SortOrder", sort.Order 60 61 }, 62 { 63 "PageSize", GetString( "Ecom:ProductList.PageSize" ) 64 } 65 }; 66 67 foreach ( LoopItem parameter in GetLoop( "Query.Parameters" ) ) 68 { 69 if ( !string.IsNullOrEmpty( parameter.GetString( "Parameter.Value" ) ) && !parameter.GetBoolean( "Parameter.IsHandledAsFacet" ) && parameter.GetString( "Parameter.Name" ) != "q" ) 70 { 71 jsonSrcGetParameters.Add( parameter.GetString( "Parameter.Name" ), parameter.GetString( "Parameter.Value" ) ); 72 } 73 } 74 75 76 #line default 77 #line hidden 78 WriteLiteral("\r\n<div"); 79 80 WriteLiteral(" class=\"e-productlist js-e-jsonpublisher\""); 81 82 WriteLiteral(" data-json-src=\""); 83 84 85 #line 34 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 86 Write(jsonSrc); 87 88 89 #line default 90 #line hidden 91 WriteLiteral("\""); 92 93 WriteLiteral(" data-json-src-get-params=\""); 94 95 96 #line 34 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 97 Write(HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( jsonSrcGetParameters ) )); 98 99100 #line default 101 #line hidden 102 WriteLiteral("\""); 103104 WriteLiteral(" data-json-src-prop=\"products\""); 105106 WriteLiteral(" data-json-template-prop=\"products\""); 107108 WriteLiteral(" data-target=\".js-e-jsonpublisher-target\""); 109110 WriteLiteral(" data-template=\".js-e-handlebars-tmpl-"); 111112113 #line 34 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 114 Write(handlebarsTemplateName); 115116117 #line default 118 #line hidden 119 WriteLiteral("\""); 120121 WriteLiteral(">\r\n\r\n <div"); 122123 WriteLiteral(" class=\"e-productlist-main\""); 124125 WriteLiteral(">\r\n <div"); 126127 WriteLiteral(" class=\"row\""); 128129 WriteLiteral(">\r\n <div"); 130131 WriteLiteral(" class=\"col-12\""); 132133 WriteLiteral(">\r\n <div"); 134135 WriteLiteral(" class=\"js-e-jsonpublisher-target\""); 136137 WriteLiteral(">\r\n\r\n <script"); 138139 WriteAttribute("class", Tuple.Create(" class=\"", 1560), Tuple.Create("\"", 1612) 140 , Tuple.Create(Tuple.Create("", 1568), Tuple.Create("js-e-handlebars-tmpl-", 1568), true) 141142 #line 41 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 143 , Tuple.Create(Tuple.Create("", 1589), Tuple.Create<System.Object, System.Int32>(handlebarsTemplateName 144145 #line default 146 #line hidden 147 , 1589), false) 148 ); 149150 WriteLiteral(" type=\"text/x-handlebars-template\""); 151152 WriteLiteral(">\r\n {{#if products}}\r\n <div class=\"row\">\r\n " + 153 " {{#each products}}\r\n <div class=\""); 154155156 #line 45 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 157 Write(ProductListService.Instance.GetItemClasses()); 158159160 #line default 161 #line hidden 162 WriteLiteral("\">\r\n {{{listItemHtml}}}\r\n </div>\r\n " + 163 " {{/each}}\r\n </div>\r\n {{else}}\r\n <p c" + 164 "lass=\"my-2\">"); 165166167 #line 51 "E:\Dynamicweb.NET\Solutions\Co3\kkwind-prod\Files\Templates\Designs\kkwind\eCom\Productlist\espresso.cshtml" 168 Write(Translate( "eCom Productlist - No Products - Text", "No products match your choices." )); 169170171 #line default 172 #line hidden 173 WriteLiteral("</p>\r\n {{/if}}\r\n </script>\r\n\r\n </div>\r\n </div>\r\n " + 174 " </div>\r\n </div>\r\n\r\n</div>\r\n\r\n\r\n"); 175176 } 177 } 178 } 1791 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.Module 2 @using Co3.Espresso.Website.Services 3 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce 4 @using System.Web 5 6 @{ 7 const string jsonSrc = "/system/data/products"; 8 string handlebarsTemplateName = string.Format( "jsonPublisher-pid{0}", Espresso.Id ); 9 10 EspressoSort sort = ProductListService.Instance.GetSort(); 11 12 Dictionary< string, string > jsonSrcGetParameters = new Dictionary< string, string > { 13 { 14 "SortBy", sort.By 15 16 }, 17 { 18 "SortOrder", sort.Order 19 20 }, 21 { 22 "PageSize", GetString( "Ecom:ProductList.PageSize" ) 23 } 24 }; 25 26 foreach ( LoopItem parameter in GetLoop( "Query.Parameters" ) ) 27 { 28 if ( !string.IsNullOrEmpty( parameter.GetString( "Parameter.Value" ) ) && !parameter.GetBoolean( "Parameter.IsHandledAsFacet" ) && parameter.GetString( "Parameter.Name" ) != "q" ) 29 { 30 jsonSrcGetParameters.Add( parameter.GetString( "Parameter.Name" ), parameter.GetString( "Parameter.Value" ) ); 31 } 32 } 33 } 34 <div class="e-productlist js-e-jsonpublisher" data-json-src="@jsonSrc" data-json-src-get-params="@HttpUtility.HtmlAttributeEncode( JsonService.Instance.ToJson( jsonSrcGetParameters ) )" data-json-src-prop="products" data-json-template-prop="products" data-target=".js-e-jsonpublisher-target" data-template=".js-e-handlebars-tmpl-@handlebarsTemplateName"> 35 36 <div class="e-productlist-main"> 37 <div class="row"> 38 <div class="col-12"> 39 <div class="js-e-jsonpublisher-target"> 40 41 <script class="js-e-handlebars-tmpl-@handlebarsTemplateName" type="text/x-handlebars-template"> 42 {{#if products}} 43 <div class="row"> 44 {{#each products}} 45 <div class="@ProductListService.Instance.GetItemClasses()"> 46 {{{listItemHtml}}} 47 </div> 48 {{/each}} 49 </div> 50 {{else}} 51 <p class="my-2">@Translate( "eCom Productlist - No Products - Text", "No products match your choices." )</p> 52 {{/if}} 53 </script> 54 55 </div> 56 </div> 57 </div> 58 </div> 59 60 </div> 61 62 63