I Allready made it via NOP-Templates Product Ribbon, but it takes a lot of time to load from base (base is around 400G, photos are going instantly but Ribbons take like 30s to load in /newproducts tab).
It looks like this:
I Tried to put it into Description section, but it wont work.
<div class="description-1">
<table>
@{ var grps = Model.SpecificationAttributeModels.ToList(); }
@foreach (var grp in grps)
{
<tr>
<td class="text-light bg-dark">
@grp.SpecificationAttributeName.ToString();
</td>
<td class="spec-value">
@Html.Raw(string.Join(@" / ", grp.ValueRaw.ToString()))
</td>
</tr>
}
</table>
</div>
Did i made something wrong ? (I Tried to use the code from _ProductSpecifications.cshtml)
@model IList<ProductSpecificationModel>
@* ADEMIR DODAO *@
@using Nop.Web.Models.Catalog;
@*
@if (Model.Count > 0)
{
Layout = "~/Themes/Pavilion/Views/Shared/_Root.Head.cshtml";
}
*@
@if (Model.Count > 0)
{
<div class="product-specs-box">
<div class="title">
<strong>@T("Products.Specs")</strong>
</div>
<div class="table-responsive table-hover">
<table class="table">
<colgroup>
<col width="25%" />
<col />
</colgroup>
<tbody>
@{
var grps = Model.GroupBy(x => x.SpecificationAttributeName).ToList();
for (var i = 0; i < grps.Count; i++)
{
var grp = grps[i];
<tr @(i % 2 == 0 ? Html.Raw(" class=\"odd\"") : Html.Raw(" class=\"even\""))>
<td class="text-light bg-dark">
@grp.FirstOrDefault().SpecificationAttributeName
</td>
<td class="spec-value">
@Html.Raw(string.Join(@" / ", grp.Select(x => x.ValueRaw)))
</td>
</tr>
}
}
</tbody>
</table>
</div>
</div>
}