Im trying to figure out how to show a certain html block when certain conditions are true.
However i get the following error:
Compiler Error Message: CS1061: 'Nop.Web.Models.Catalog.ProductDetailsModel' does not contain a definition for 'RelatedProducts' and no extension method 'RelatedProducts' accepting a first argument of type 'Nop.Web.Models.Catalog.ProductDetailsModel' could be found (are you missing a using directive or an assembly reference?)
@if (Model.RelatedProducts.Count > 0)
{
<div class="combinations">
<div class="wrapper">
<h2>Combinations</h2>
@Html.Action("RelatedProducts", "Product", new { productId = Model.Id })
</div>
</div>
}
Above code is placed in ProductTemplate.Simple.html (and it is working without the if statement only then it will show the title even if there are no products.