how to populate Filtered Items in dropdownlist instead of table

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Does anyone has done something similar to the question , Currently the filter specifications is populated in table with the items using for each , below is the code :
@model CatalogPagingFilteringModel.SpecificationFilterModel
           @{
         var renderedAttributeNames = new List<string>();
          }  
       <div class="product-spec-filter">
       @* <div class="title">
            @T("Filtering.SpecificationFilter")
        </div>*@
        @*<div class="clear">
        </div>*@
        @if (Model.NotFilteredItems.Count > 0)
        {
            <div>
                <table class="filter">
                    @foreach (var item in Model.NotFilteredItems)
                    {
                        if (!renderedAttributeNames.Contains(item.SpecificationAttributeName))
                        {
                            renderedAttributeNames.Add(item.SpecificationAttributeName);
                            <tr class="group">
                                <td>
                                    @item.SpecificationAttributeName
                                </td>
                            </tr>
                        }
                        <tr class="item">
                            <td>
                                **<a href="@item.FilterUrl">@item.SpecificationAttributeOptionName</a>**
                            </td>
                        </tr>
                    }
                </table>
            </div>
        }
        @if (Model.AlreadyFilteredItems.Count > 0)
        {
            <div>
                <div class="title">
                    @T("Filtering.SpecificationFilter.CurrentlyFilteredBy")
                </div>
                <table class="filter">
                    @foreach (var item in Model.AlreadyFilteredItems)
                    {
                        <tr class="filtereditem">
                            <td>
                                <b>@(item.SpecificationAttributeName):</b> @item.SpecificationAttributeOptionName
                            </td>
                        </tr>
                    }
                </table>
            </div>
            <div class="remove-filter">
                <a href="@Model.RemoveFilterUrl" class="remove-product-spec-filter">@T("Filtering.SpecificationFilter.Remove")</a>
            </div>
        }
    </div>
How can we get a populated dropdownlist of filtered attributes instead of a list as i have got too many specification attributes. any ideas?
12 years ago
Have a look at Nop Ajax Filters
12 years ago
a.m. wrote:
Have a look at Nop Ajax Filters


The Ajax filter product is great but I am not willing to pay 80 quid for one license as my client is not looking for too much filtration its just one specification he wants to filter with. I have tried this :
@if (Model.NotFilteredItems.Count > 0)
    {
        <div>
            @Html.DropDownList("NotFilteredItem", new SelectList(Model.NotFilteredItems, "SpecificationAttributeName", "SpecificationAttributeName"))
        </div>
    }

Which actually populates the dropdown list with the attributes but the filteration does not works , you can see live example on http://www.teamlemon.co.uk/c/14/cholera-toxins

Any suggestions ...
12 years ago
We need this too.
We purchased the filters but found that the core engine was locked into a dll and we need more access.
We limit searches at a category level so we control what attributes are used as we have too many.
We can't make it work.

Multiple attribute level searching is much needed or at least a guide to how to do it in 2.3.
We have burnt days on this and are no closer.

HELP !

Any chance of a guide that states ..

If you have a list of filter attributes on the left and what to refresh the partialview (not the whole page), this is how you do it..
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.