Pagination Enhancement


https://forum.kartris.com/Topic6854.aspx
Print Topic | Close Window

By shulemj - Tue 14 Feb 2017
Two common features I'd like to implement and was wondering if anyone has any experience and tips.

Both are on the frontend pagination bar (Prev 1 2 3 Next)

1) A little dropdown menu to choose how many items (products or product-types) they want displayed per page

2) A "view all" option

Also, a client asked if it's possible to implement a "load more products" button (like Twitter, Facebook) as an alternative to pagination. Any ideas, samples?
By Supermac - Fri 24 Feb 2017
I didnt' realized the thing you ask for but items-per-page are defined in configuration settings depending on the product's template selected.

Here is the code portion in CategoryProductView.aspx.vb where items-per-page is loaded as variable:
' Gets No. of Products/Page from the CONFIG Setting, depending on the viewName(viewType)
_RowsPerPage = GetKartConfig("frontend.products.display." & strViewName & ".pagesize")

You'll see that _RowsPerPage is passed as parameter to functions that follow that row.
I think you should redefine that variable's value with the value user selects from dropdown.

A "view all" option in dropdown could simply have 9999 or bigger value...

A "load more" button could work increasing _RowsPerPage by a fixed value every time it's clicked but I think it's not so simple, that's a matter a bit more articulated.

Wish that's useful.