Rank: Advanced Member
Groups: Authorized User, Developers Joined: 5/30/2020(UTC) Posts: 125
Thanks: 14 times Was thanked: 3 time(s) in 3 post(s)
|
When the search page has multiple pages of results, click on one of the page numbers (other than page 1). Click one one of the Product Finder categories or Brands on the left that has fewer results than the current page size. Those links carry forward the page parameter, so now the results page will have something like "Viewing 13 - 19 of 7 results for searchterm".
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 5/30/2020(UTC) Posts: 125
Thanks: 14 times Was thanked: 3 time(s) in 3 post(s)
|
So, this is how I ended up handling on our end... Created an extension method to strip querystring parameters from RouteValueDictionary: Code:public static class RouteValueDictionaryExtensions
{
public static RouteValueDictionary RemoveQueryStringParameter(this RouteValueDictionary dictionary, string key)
{
if (dictionary.ContainsKey(key))
{
dictionary.Remove(key);
}
return dictionary;
}
}
Updated the /Website/Views/Category/ProductFinder.cshtml file to use the new extension method to strip out the "page" parameter anywhere a route was being created. Doing so resets everything to Page=1 so the counts are correct. Example: Code:<li>
<a href="@Url.RouteUrl("AbleRoute", Url.AddUpdateQueryStringParameter("CategoryId", category.CategoryId).RemoveQueryStringParameter("page"))">
<span>@category.Name</span>
@if (Model.ShowProductCount)
{
<span class="badge">@category.ProductCount</span>
}
</a>
</li>
|
|
|
|
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)
|
I am able to reproduce the issue. I am going to register this as a bug.
Thanks for pointing this out!
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close