Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
To fix. 1- Please open file \Website\Views\Category\_ProductFinder.cshtml 2- Replace the whole content with the following. Code:@model ProductFinderModel
<aside class="sidebar">
<div class="widget widget-post-categories">
<h3><a role="button" data-toggle="collapse" href="#widget-product-finder-collapse" aria-expanded="true" aria-controls="widget-product-finder-collapse">@ViewBag.Caption</a></h3>
<div class="collapse in" id="widget-product-finder-collapse" aria-expanded="true" role="tabpanel">
<div class="widget-body">
@if (Model.ShowExpanOptions)
{
<h4>@GetResourceString("retail.productfinder.expand_your_result")</h4>
<ul class="list-unstyled">
@foreach (var node in Model.PathNodes)
{
<li>
<a href="@Url.RouteUrl("AbleRoute", Url.AddUpdateQueryStringParameter("CategoryId", node.CategoryId))">@string.Format("{0} (X)", node.Name)</a>
</li>
}
@if (Model.SelectedManufacturer != null)
{
<li>
<a href="@Url.RouteUrl("AbleRoute", Url.RemoveQueryStringParameter("ManufacturerId"))">@string.Format("{0} (X)", Model.SelectedManufacturer.Name)</a>
</li>
}
@if (!string.IsNullOrEmpty(Model.Keywords))
{
<li>
<ins><a href="@Url.RouteUrl("AbleRoute", Url.RemoveQueryStringParameter("Keywords"))">@GetResourceString("retail.productfinder.remove_keyword") @Model.Keywords</a></ins>
</li>
}
@if (Model.ShopByChoices.Count > 0)
{
foreach (var choice in Model.ShopByChoices)
{
<li>
<a href="@Url.RouteUrl("AbleRoute", Url.AddUpdateQueryStringParameter("ShopBy", String.Join(",", Model.ShopByChoices.Where(c => c.Id != choice.Id).Select(c=> c.Id.ToString()).ToArray())))">
@choice.FieldName : @choice.Text (X)
</a>
</li>
}
}
</ul>
}
<div>
@if (Model.Categories.Count > 0)
{
<ul class="list-unstyled">
@foreach (var category in Model.Categories)
{
<li>
<a href="@Url.RouteUrl("AbleRoute", Url.AddUpdateQueryStringParameter("CategoryId", category.CategoryId))">
<span>@category.Name</span>
@if (Model.ShowProductCount)
{
<span class="badge">@category.ProductCount</span>
}
</a>
</li>
}
</ul>
}
</div>
@if (Model.Manufacturers.Count > 0 && Model.SelectedManufacturer == null)
{
<h4 class="m-l">@GetResourceString("retail.productfinder.narrow_by_brand")</h4>
<div>
<ul class="list-unstyled">
@foreach (var manufacturer in Model.Manufacturers)
{
<li>
<a href="@Url.RouteUrl("AbleRoute", Url.AddUpdateQueryStringParameter("ManufacturerId", manufacturer.Id))">
<span>@manufacturer.Name</span>
@if (Model.ShowProductCount)
{
<span class="badge">@manufacturer.ProductCount</span>
}
</a>
</li>
}
@if (!Model.AllManufacturers)
{
<li><a href="@Url.RouteUrl("AbleRoute", Url.AddUpdateQueryStringParameter("AllManufacturers", true))">@GetResourceString("retail.productfinder.see_all_»")</a></li>
}
</ul>
</div>
}
<div>
@if (Model.ShopByFields.Count > 0)
{
foreach (var field in Model.ShopByFields)
{
<h4 class="m-l">@field.Name</h4>
<ul class="list-unstyled">
@foreach (var choice in field.Choices)
{
IList<string> choiceIds = Model.ShopByChoices.Select(c => c.Id.ToString()).ToList();
choiceIds.Add(choice.Id.ToString());
<li>
<a href="@Url.RouteUrl("AbleRoute", Url.AddUpdateQueryStringParameter("ShopBy", String.Join(",", choiceIds.ToArray())))">
<span>@choice.Text</span>
@if (Model.ShowProductCount)
{
<span class="badge">@choice.ProductCount</span>
}
</a>
</li>
}
</ul>
}
}
</div>
@if (string.IsNullOrEmpty(Model.Keywords))
{
<h4 class="m-l">@GetResourceString("retail.productfinder.narrow_by_keyword")</h4>
<div>
<ul class="list-unstyled">
@using (Html.BeginRouteForm("AbleRoute", FormMethod.Get))
{
var parameters = Url.GetQueryStringParameters();
foreach (var parameter in parameters)
{
@Html.Hidden(parameter.Key, parameter.Value);
}
<li>
<div class="input-group">
@Html.TextBoxFor(m => m.Keywords, new { @class = "form-control", @placeholder = GetResourceString("retail.productfinder.search_placeholder", false).ToString() })
<span class="input-group-btn">
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
</span>
</div>
</li>
@Html.ValidationMessageFor(m => m.Keywords)
}
</ul>
</div>
}
</div>
</div>
</div>
</aside>
|
1 user thanked shaharyar for this useful post.
|
|