Close

Profile: ifmobler

Avatar

User posts

7 years ago

I updated the TabSpecifications to allow grouping. In our website it's very useful.
File: views\product\_ProductSpecifications.cshtml

Before:
Color: NameofColor
Color: NameofColor
Color: NameofColor ....

After:
Color: NameofColor, NameofColor, NameofColor...

If I want to group for example color into a single line I changed these lines below.


   @{
                    var groupedList = Model.GroupBy(u => u.SpecificationAttributeName).Select(grp => grp.ToList()).ToList();
                    int a = -1;

                    foreach (var i in groupedList)
                    {  
                        a++;
                        var item = i.First();
                        <tr @(a % 2 == 0 ? Html.Raw(" class=\"odd\"") : Html.Raw(" class=\"even\""))>
                          
                            <td class="spec-name">
                                @item.SpecificationAttributeName
                            </td>
                            <td class="spec-value">

                                @if (String.IsNullOrEmpty(item.ColorSquaresRgb))
                                {
                                    if (i.Count() > 1)
                                    {
                                        foreach (var attr in i)
                                        {
                                            <div style="margin-right: 10px;">@Html.Raw(attr.ValueRaw)</div>
                                        }
                                    }
                                    else
                                    {
                                        @Html.Raw(item.ValueRaw)
                                    }
                                }
                                else
                                {
                                    foreach (var color in i)
                                    {
                                            <div class="color-squares">
                                                <span class="color-container" title="@Html.Raw(color.ValueRaw)" style="float:left;margin-right: 10px;border: 1px solid #d5d5d5">
                                                    <span class="color" style="background-color: @(color.ColorSquaresRgb);">&nbsp;</span>
                                                </span>
                                            </div>
                                        }
                                }
                            </td>
                        </tr>
                        }
                    }

7 years ago

Hi
One of the best things in Pavillion theme is the ajax filter, but, I would like to have the abillity to hide an attribute group, is that possible?

If not, guess I need to add this feature.

I believe it's easy by adding a published variable to Model.
@foreach (AttributeFilterGroup attributeFilterGroup in Model.AttributeFilterGroups)
{
     if(attributeFilterGroup.AllowInFilter){...}
}

7 years ago

Ah, I was looking in the wrong directory...
Found it in:
nopCommerce_3.80_Source\Presentation\Nop.Web\Plugins\SevenSpikes.Nop.Plugins.AjaxFilters\Themes\Pavilion\Views\AttributeFilter7Spikes

Work as expected now!

//Thanks for a really great extension and Theme ;-)

7 years ago

Hi
I've purchased the Ajax filter. Im satisfied with the filter except that the filter doesn't have a technical name and a display "Title" that will be shown as the title in the filter.
This is a problem when you have a lot of products with a lot of attibutes.

An easy solution could be to add a "T(ResouceName)" to the view AttributeFilter.cshtml, but nothing changes when a make that change?

//Rickard