logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Wednesday, November 25, 2020 11:50:54 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I am upgrading a site from Gold that has a Manufacturer dropdown on the category page that shows only the manufacturers for the products in the category, like only two or three out of 15 manufacturers in the site. When a customer selects the manufacturer, it filters the page to show only products in the category for that manufacturer. That is working OK. The issue comes with paging. The ManufacturerId shows up in the querystring, but not in the pager links. I've added the manufacturerId to the paging links, in the view for the category, but it isn't showing up when I hover over the paging link.
<div class="pagination-wrapper">
@Html.PagedListPager(Model.Products, page => Url.RouteUrl("AbleRoute", new { page, Model.SortExpression,Model.ManufacturerId, Model.PageSize }), new PagedListRenderOptions { DisplayEllipsesWhenNotShowingAllPageNumbers = false })
</div>

I see that on the search page, it is
<div class="pagination-wrapper">
@Html.PagedListPager(Model.Products, page => Url.RouteUrl("AbleRoute", new { page, CategoryId = Model.CategoryId, Keywords = Model.Keywords, manufacturerId = Model.ManufacturerId, shopBy = Model.ShopBy, pageSize = Model.Products.PageSize, sortExpression = Model.SortExpression }), new PagedListRenderOptions { DisplayEllipsesWhenNotShowingAllPageNumbers = false })
</div>

Is there somewhere else I would need to change?
Thanks

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyartiwana25816656  
#2 Posted : Thursday, November 26, 2020 5:35:01 AM(UTC)
shaharyar

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)
You need to add a parameter in the controller action method and then assign the value of that parameter to the Model property that you are using in PagerLink on the view.
thanks 1 user thanked shaharyar for this useful post.
judy at Web2Market on 11/30/2020(UTC)
Users browsing this topic
Guest (2)
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.