Jump to content

Add a "View All" link to pagination?


jiadehu

Recommended Posts

Hi,

Does anyone know how I can add a "View All" link on the pagination of my product pages? I have searched through lots of posts including here and here, although could not find my exact solution. Please see attached image of how I would like it to appear. Thank you in advance!

33576_zcPi6k081yQbJKZLJgCC_t

Link to comment
Share on other sites

  • 3 weeks later...

If you know the total number of the entire product to be shown at that page, is good
but, it would be forgotten and when view all is used with the product number moves
1000, how slow it would be to some other countries. So, if you start adding there is option pop out,
with pull-down combo box, 10 per page, 20 per page, 30 per page, and so on. User can set it.
There is a setting in BO side. I think it is by far better way of implementation, although I didn't answer
your question.

Link to comment
Share on other sites

The brute force approach would be as follows:

Find your theme's pagination.tpl. In there, you'll most likely find a one form tag only. That's the form responsible to create the drop down menu out of which the user is supposed to pick the number of items to be displayed.

In between the select tags, disable what is there and add your new "all"-option which simply is any large number (larger than the number of product in you store) like this

{l s='All'}



Then go ahead and assign the submit button an "all" tag and use css to hide the selection form. done.

Link to comment
Share on other sites

  • 7 months later...

Go to themes->pagination.tpl
Change following code

{if $pages_nb > 1 AND $p != $pages_nb}
           {assign var='p_next' value=$p+1}
goPage($requestPage, $p_next)}">{l s='Next'} »
       {else}
{l s='Next'} »
       {/if}








Replace with

{if $pages_nb > 1 AND $p != $pages_nb}
           {assign var='p_next' value=$p+1}
goPage($requestPage, $p_next)}">{l s='Next'} »
       {else}
{l s='Next'} »
       {/if}

{assign var='all' value=$link->getPaginationLink('category', $category, true, false, true, false)}
goPage($all)}&n;={$nb_products}">Viewall


   {/if}



play with css to moderate look and feel

49188_erNtr5sVZyG2ivAZJeWg_t

  • Like 2
Link to comment
Share on other sites

  • 8 months later...

I'm using only text links for pagination in v1.4.7 and added the suggested code which definitely works and gives the "View All" link but when you select "View All" all the pagination links disappear.

 

Maybe someone can update the code so when you select the "View All" link all the pagination links stay put. Best example I can give is the way it works on any Victoria's Secret category page.

Link to comment
Share on other sites

An other good solution would be to keep pagination for search engine bots but to use an infinite scrolling solution for "real" people (detection based on javascript support).

There are modules for this, such as infinite endless scroll http://addons.prestashop.com/en/merchandizing/4899-Infinite-Endless-Scroll.html

 

But... can you explain why you want to keep pagination on a listing that doesn't need it ?

Link to comment
Share on other sites

I'd like to keep the pagination links even when they've selected "view all" so they still have the option of clicking page 1, or 2, next, etc. rather than clicking the browsers back button. Secondly, on my site when the pagination links disappear all products shift upwards which I don't care for design wise and I haven't figured out in the css how to stop that.

 

I actually discovered something on the old navy website which I kind of like. Instead of keeping all the pagination links when you select View All (in their case See All) it creates a link to revert back to the default number of products per page. Here's an example link:

http://oldnavy.gap.com/browse/category.do?cid=60492&pageID=-1&actFltr=false

 

However, I can't figure out in Pagination.tpl how to add code to keep any link still visible when selecting View All.

Link to comment
Share on other sites

  • 3 weeks later...
  • 7 months later...
  • 1 year later...
  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...