0
Kurven er tom
Error compiling template "Designs/55nord/eCom/Productlist/NoProductFound.cshtml"
Line 17: The name 'GetPartnerFieldValues' does not exist in the current context
Line 245: The variable 'active' is assigned but its value is never used

1 @using System 2 @using Dynamicweb; 3 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4 @using System.Web 5 @using Dynamicweb 6 @using Dynamicweb.eCommerce.Discounts 7 @using Dynamicweb.eCommerce.Products 8 @using Dynamicweb.Rendering 9 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 10 11 @helper RenderPartnerStyles() 12 { 13 /*Getting the partnerspeciffic fieldvalues*/ 14 string partnerColor = ""; 15 string partnerBackground = ""; 16 string partnerLogo = ""; 17 GetPartnerFieldValues(Group.GetGroupByID(Input.Request("groupid")), ref partnerColor, ref partnerBackground, ref partnerLogo); 18 19 string partnerStyles = ""; 20 if (!String.IsNullOrWhiteSpace(partnerColor)) 21 { 22 partnerStyles += ".button {background: #" + partnerColor + ";} "; //TODO: Use correct css 23 } 24 if (!String.IsNullOrWhiteSpace(partnerBackground)) 25 { 26 /*productgroup field looks in /images - Uses, from off-canvas nav .st-content instead of wrapper */ 27 partnerStyles += ".st-content { background: url('/Files/Images/" + partnerBackground + "'); }"; //TODO: Use correct css 28 } 29 30 @SnippetStart("Stylesheet") 31 if (!String.IsNullOrWhiteSpace(partnerStyles)) 32 { 33 <style type="text/css">@partnerStyles</style> 34 } 35 @SnippetEnd("Stylesheet") 36 @SnippetStart("Partnerlogo") 37 if (!String.IsNullOrWhiteSpace(partnerLogo)) 38 { 39 <img class="img-responsive partner-logo" alt="" src="/Files/@partnerLogo"> //TODO: Use correct path 40 } 41 @SnippetEnd("Partnerlogo") 42 } 43 44 @helper RenderAreaPartnerStyles(Dynamicweb.Content.Items.Item areaItem) 45 { 46 if (areaItem != null) 47 { 48 /*Getting the partnerspeciffic fieldvalues*/ 49 string partnerColor = Base.ChkString(areaItem["PartnerColor"]); 50 string partnerColorSecondary = Base.ChkString(areaItem["PartnerSecondaryColor"]); 51 string partnerBackground = Base.ChkString(areaItem["PartnerBackground"]); 52 53 54 <style type="text/css"> 55 @if(!string.IsNullOrWhiteSpace(partnerColor)) { 56 <text> 57 .button { 58 background: @partnerColor; 59 } 60 61 /* slider */ 62 .rsNavSelected::before { 63 border-color: transparent @partnerColor transparent transparent; 64 } 65 .rsDefault .rsThumb:hover { 66 background: @partnerColor; 67 } 68 .rsDefault .rsThumb:hover::before { 69 display: block; 70 position: absolute; 71 left: -25px; 72 content: " "; 73 width: 0; 74 height: 0; 75 border-style: solid; 76 border-width: 38.5px 25px 38.5px 0; 77 border-color: transparent @partnerColor transparent transparent; 78 } 79 .rsDefault .rsThumb.rsNavSelected { 80 background-color: @partnerColor; 81 border-bottom: 1px solid @partnerColor; 82 } 83 .rsDefault .rsTmb a::before { 84 color: @partnerColor; 85 } 86 .rsNavSelected .rsTmb a::before { 87 color: #ffffff; 88 } 89 90 header .mobilefixed .cart .basket-text { 91 color: @partnerColor; 92 } 93 header .mobilefixed .cart .basket-icon i { 94 color: @partnerColor; 95 } 96 97 #facets { 98 .remove-filters{ 99 color:@partnerColor; 100 } 101 } 102 .product-list-link{ 103 color:@partnerColor; 104 } 105 .product-price .price { 106 color: @partnerColor; 107 } 108 .btn.btn-primary { 109 background-color: @partnerColorSecondary; 110 } 111 .select-primary { 112 background-color: @partnerColorSecondary; 113 } 114 </text> 115 } 116 @if (!string.IsNullOrWhiteSpace(partnerBackground)) 117 { 118 <text> 119 @@media only screen and (min-width : 768px) { 120 .st-content { 121 background: #252525 url(@partnerBackground) bottom center no-repeat; 122 background-size: cover; 123 } 124 } 125 </text> 126 } 127 </style> 128 129 @*string partnerStyles = ""; 130 if (!string.IsNullOrWhiteSpace(partnerColor)) 131 { 132 partnerStyles += ".button { background: " + partnerColor + "; } \n"; //TODO: Use correct css 133 } 134 if (!string.IsNullOrWhiteSpace(partnerBackground)) 135 { 136 partnerStyles += ".st-content { background: none; } \n"; //TODO: Use correct css 137 partnerStyles += @"@media only screen and (min-width : 768px) { 138 .st-content { 139 background: #252525 url('" + partnerBackground + @"') bottom center no-repeat; 140 background-size: cover; 141 } 142 }"; 143 } 144 145 @SnippetStart("Stylesheet") 146 if (!String.IsNullOrWhiteSpace(partnerStyles)) 147 { 148 <style type="text/css">@partnerStyles</style> 149 } 150 @SnippetEnd("Stylesheet") 151 *@ 152 } 153 } 154 155 @helper RenderStyles(Dynamicweb.Content.Items.Item areaItem) 156 { 157 string ribbonNew = Base.ChkString(areaItem["RibbonNew"]); 158 159 <style type="text/css"> 160 161 .content .productimage .ribbons ul li.new { 162 background: @ribbonNew; 163 } 164 .content .productlist ul li .item a .ribbons li.new { 165 background: @ribbonNew; 166 } 167 168 </style> 169 170 } 171 172 <div class="row"> 173 <div class="col-xs-12 col-sm-3 col-md-3"> 174 <div class="visible-xs"> 175 <h1>@GetValue("Ecom:Group.Name")</h1> 176 </div> 177 <div class="pointer js-show-facets show-facets visible-xs"> 178 <i class="fa fa-caret-down"></i> @Translate("Smartpage:ShowFilters", "Vis filtre") 179 </div> 180 <div id="facets"> 181 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 182 @using System.Linq 183 @using Dynamicweb 184 185 <form name="EcomSearch" class="form-filters js-form-filters" method="get" action="/Default.aspx"> 186 <input type="hidden" name="ID" value='@Pageview.Page.ID' /> 187 @if (!string.IsNullOrEmpty(Input.Request("SortBy"))) 188 { 189 <input type="hidden" name="SortBy" value='@Input.Request("SortBy")' /> 190 } 191 @if (!string.IsNullOrEmpty(Input.Request("SortOrder"))) 192 { 193 <input type="hidden" name="SortOrder" value='@Input.Request("SortOrder")' /> 194 } 195 @if (!string.IsNullOrEmpty(Input.Request("GroupID"))) 196 { 197 <input type="hidden" name="GroupID" value='@Input.Request("GroupID")' /> 198 } 199 @if (!string.IsNullOrEmpty(Input.Request("q"))) 200 { 201 <input type="hidden" name="q" value='@Input.Request("q")' /> 202 } 203 <input type="submit" class="sr-only"> 204 @{ 205 var facetGroups = GetLoop("FacetGroups"); 206 } 207 @if (facetGroups.Any()) 208 { 209 210 <div class="row hidden-for-mobile text-left js-filter-headline"> 211 <div class="col-xs-12"> 212 <h4 class="filter-headline"> 213 @Translate("Smartpage:Facets.Headline", "Filtrering") 214 <span class="pull-right pointer js-remove-all-cat remove-filters">@Translate("Smartpage:Facets.ShowMore", "Fjern alle")</span> 215 </h4> 216 </div> 217 </div> 218 219 foreach (LoopItem i in GetLoop("FacetGroups")) 220 { 221 foreach (LoopItem j in i.GetLoop("Facets").OrderBy(g => g.GetString("Facet.QueryParameter") != "group")) 222 { 223 if (j.GetInteger("Facet.OptionWithResultCount") > 0) 224 { 225 var facetOptions = j.GetLoop("FacetOptions").Where(f => f.GetInteger("FacetOption.Count") > 0); 226 if (facetOptions.Any()) 227 { 228 int counter = 0; 229 230 <div class="variant-groups js-foldable-filters"> 231 <div class="row"> 232 <div class="col-sm-12 facet-header"> 233 <strong>@j.GetValue("Facet.Name")</strong> 234 235 <span class="js-remove-cat remove-filters pointer">@Translate("Smartpage:Facets.ShowMore", "Fjern")</span> 236 </div> 237 </div> 238 239 <div class="row hidden-for-mobile js-foldable-section text-left border-top-xs"> 240 241 @foreach (LoopItem k in facetOptions.OrderBy(f => f.GetInteger("FacetOption.Sort"))) 242 { 243 counter++; 244 string hiddenClass = ""; 245 bool active = false; 246 247 if (counter > 5 && !k.GetBoolean("FacetOption.Selected")) 248 { 249 hiddenClass = "hidden"; 250 } 251 252 var inputId = j.GetString("Facet.QueryParameter") + "_" + k.GetString("FacetOption.Value"); 253 254 <div class="col-sm-12 js-facet-container @hiddenClass"> 255 <div class="checkbox"> 256 <label class="menu-item-label" for="@inputId"> 257 <input id="@inputId" class="js-select-filter-option" type="checkbox" value='@k.GetString("FacetOption.Value")' name='@j.GetString("Facet.QueryParameter")' checked='@k.GetBoolean("FacetOption.Selected")'> 258 <span class=" menu-item">@k.GetValue("FacetOption.Label")</span> 259 </label> 260 <span class="results">(@k.GetValue("FacetOption.Count"))</span> 261 </div> 262 </div> 263 264 } 265 @if (counter > 5) 266 { 267 <div class="col-sm-12 js-facet-view"><span class="js-facet-view-text pointer">@Translate("Smartpage:Facets.ShowMore", "+ Vis flere")</span></div> 268 } 269 </div> 270 271 </div> 272 } 273 } 274 } 275 } 276 277 } 278 </form> 279 280 </div> 281 </div> 282 <div class="col-xs-12 col-sm-9 col-md-9"> 283 <h3>@GetValue("Ecom:ProductList:Page.GroupName") - @Translate("SmartPage:NoProductFound.Header", "Gruppen er tom")</h3> 284 <p>@Translate("SmartPage:NoProductFound.Content", "Ingen produkter fundet.")</p> 285 </div> 286 </div> 287 @*@RenderPartnerStyles()*@