Close

Place Filters below "Description" in category page

JonJJ
12 years ago
#528 Quote
Avatar
  • 30
Hi Support,


Is there any way that I can place the Nop AJAX filters below the "Description" in the category page?

This is would be the same place as the stock filters are placed in the file:
CategoryTemplate.ProductsInGridOrLines.cshtml under


    @*filtering*@
    @if (Model.PagingFilteringContext.PriceRangeFilter.Enabled ||  Model.PagingFilteringContext.SpecificationFilter.Enabled)
    {        
         <div class="product-filters">
        
            <div class="filter-title">
                <span>@T("Filtering.FilterResults")</span>
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterPriceBox", Model.PagingFilteringContext.PriceRangeFilter, new ViewDataDictionary())
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterSpecsBox", Model.PagingFilteringContext.SpecificationFilter, new ViewDataDictionary())
            </div>
        </div>
        <div class="clear">
        </div>



     @*
     Instead of the stock filter above, I wish to insert Nop AJAX Filters here
     *@

    }
    




I tried to use the same code as provided in the documentation but that is code for _ColumnsThree.cshtml file and it does not work in CategoryTemplate.ProductsInGridOrLines.cshtml


Thanks,
Jon



Support
12 years ago
#532 Quote
Avatar
  • Moderator
  • 1044
JonJJ wrote:
Hi Support,


Is there any way that I can place the Nop AJAX filters below the "Description" in the category page?

This is would be the same place as the stock filters are placed in the file:
CategoryTemplate.ProductsInGridOrLines.cshtml under


    @*filtering*@
    @if (Model.PagingFilteringContext.PriceRangeFilter.Enabled ||  Model.PagingFilteringContext.SpecificationFilter.Enabled)
    {        
         <div class="product-filters">
        
            <div class="filter-title">
                <span>@T("Filtering.FilterResults")</span>
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterPriceBox", Model.PagingFilteringContext.PriceRangeFilter, new ViewDataDictionary())
            </div>
            <div class="filter-item">
                @Html.Partial("_FilterSpecsBox", Model.PagingFilteringContext.SpecificationFilter, new ViewDataDictionary())
            </div>
        </div>
        <div class="clear">
        </div>



     @*
     Instead of the stock filter above, I wish to insert Nop AJAX Filters here
     *@

    }
    




I tried to use the same code as provided in the documentation but that is code for _ColumnsThree.cshtml file and it does not work in CategoryTemplate.ProductsInGridOrLines.cshtml


Thanks,
Jon


Hi Jon,

You simply need to call the Ajax Filters.
@Html.Action("GetFilters", "NopAjaxFilters")

There is no need to wrap them in a section. We use a section in order to have the Filters appear on the left column where the section is defined.

Hope this helps!

Best Regards,
Nop-Templates Support Team
JonJJ
12 years ago
#536 Quote
Avatar
  • 30
Ah yes, thanks support! :-)