I'm currently building a nopCommerce site using v4.0, all going well, but have come across a small issue I can't figure out. When setting up my product categories you are able to add a separate category image for each one, I expected this to be viewed at the top of the category product listing page, but nothing shows, is there some setting I am missing somewhere to be able to show the category image?
Thanks for getting back to me, I want to display the parent category image, as the sub categories are displayed as links, see screenshot https://ibb.co/dd25re, do you know how I can display the parent image?
You can add below code snippet in -> Views\Catalog\CategoryTemplate.ProductsInGridOrLines.cshtml (if you are using theme than add at -> \Themes\<THEME_FOLDER>\Views\Catalog\CategoryTemplate.ProductsInGridOrLines.cshtml) view page whenever you want display current category picture.
@{ string categoryPictureURL = ""; var _pictureService = EngineContext.Current.Resolve<Nop.Services.Media.IPictureService>(); var category = EngineContext.Current.Resolve<Nop.Services.Catalog.ICategoryService>().GetCategoryById(Model.Id); categoryPictureURL = _pictureService.GetPictureUrl(_pictureService.GetPictureById(category.PictureId));