Move filters to left sidebar in v2.1

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 年 前
Hi

Can someone help me with the changes I need to make in v2.1 to move the filters from the master center to the left side?
I have tried some methods suggested in other threads with some success but I lose the left side wrapper from the homepage. I am not great with .net but ok with HTML and CSS.
12 年 前
Hello,
please check solution here https://www.nopcommerce.com/boards/t/11055/category-page-product-filters-v20.aspx by PM.
You need modify two files, it`s easy.
12 年 前
nopworks wrote:
Hello,
please check solution here https://www.nopcommerce.com/boards/t/11055/category-page-product-filters-v20.aspx by PM.
You need modify two files, it`s easy.


I tried that method and it does work for the category pages but the left sidebar disappears completely from my homepage as a side effect and I cant work out why?
12 年 前
Check a code, i think you added filters and other controls in the "left block". So, if you don`t have a left block, it`s not display other controls (on homepage you not have a filters - only on Category page)

Place your code here.
12 年 前
Hi

this is my code. It all works as expected on the category page views but when  I go to the homepage and view the source the "<div class="master-wrapper-leftside-3"> </div>" div is empty and nothing is displayed.


In Category.cshtml


@section left {
    @*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>
    }
    }

In _ColumnsThree.cshtml

div class="master-wrapper-leftside-3">
    @if (IsSectionDefined("left"))
    {
        @RenderSection("left")
    
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.BeforeLeftSideColumn })
        <div class="clear">
        </div>
        @Html.Action("CategoryNavigation", "Catalog", new { currentCategoryId = currentCategoryId })
        <div class="clear">
        </div>
        @Html.Action("ManufacturerNavigation", "Catalog", new { currentManufacturerId = currentManufacturerId })
        <div class="clear">
        </div>
        @Html.Action("PopularProductTags", "Catalog")
        <div class="clear">
        </div>
        @Html.Action("InfoBlock", "Common")
        <div class="clear">
        </div>
        @Html.Action("PollBlock", "Poll", new { systemKeyword = "LeftColumnPoll" })
        <div class="clear">
        </div>
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.AfterLeftSideColumn })
    }
12 年 前
I use nop2.2
And I want to move filters from center to left. Can anybody help me?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.