I've been looking online for solutions, but everything I find either seems to be outdated or doesn't work at all. The only variable my website seems to recognise is @item.PictureModel.ImageUrl, but for some reason it won't show the actual image.
One of my colleagues told me that I'll have to edit the Model to insert this function, but he is currently on vacation for a week, leaving me unable to continue on my project. So, I'm currently trying to find alternative ways to create a similar function.
Could anybody help me? This is what my code currently looks like:
@model IList<ManufacturerModel>
@using Nop.Web.Models.Catalog;
@if (Model.Count > 0)
{
<div class="manufacturers">
@if (Model.Count == 1)
{
<span class="label">@T("Products.Manufacturer"):</span>
}
else
{
<span class="label">@T("Products.Manufacturers"):</span>
}
<span class="value">
@for (int i = 0; i < Model.Count; i++)
{
var item = Model[i];
<a href="@Url.RouteUrl("Manufacturer", new { SeName = item.SeName })">
<img alt="@item.PictureModel.AlternateText" src="@item.PictureModel.ImageUrl" title="@item.PictureModel.Title" />
</a>
if (i != Model.Count - 1)
{
<span class="separator">,</span>
}
}
</span>
</div>
}