asp.net - NopCommerce - Category Images not displaying -


i can't category images display in nopcommerce theme. code i'm using, on categorytemplate.productsingridorlines.cshtml page.

@if (model.picturemodel != null && !string.isnullorwhitespace(model.picturemodel.imageurl)) {     <div class="category-picture">         <img alt="@model.picturemodel.alternatetext" src="@model.picturemodel.imageurl" title="@model.picturemodel.title" />     </div> } 

i've tried removing if statement, , generates <img>.

as far aware, category images should accessed this..

 @foreach (var item in model.subcategories)             {                 count3++;                 <div class="sub-category-item col-4 aligncenter">                     <h2 class="title">                         <a href="@url.routeurl("category", new { sename = item.sename })" title="@item.picturemodel.title" class="green">                             @item.name</a>                     </h2>                     <div class="picture">                         <a href="@url.routeurl("category", new { sename = item.sename })" title="@item.picturemodel.title">                             <img alt="@item.picturemodel.alternatetext" src="@item.picturemodel.imageurl"                                     title="@item.picturemodel.title" /></a>                     </div>                 </div>                  if (count3 %3 == 0)                 {                      @html.raw("</div><div class='row'>")                 }             } 

this modified version of original nopcommerce code in site i'm working on , code works. note images taken item.picturemodel rather model.picturemodel.

this assuming have not moved code separate file.

hope helps


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -