Jump to content

Show (count) products by page - doesn't work


Recommended Posts

Hi there, just having a problem with a Prestashop that I have just created for a client - The only thing that doesn't appear to be working properly is at the bottom of the Category View page, where it says:

 

Show: (10/20/50) products by page.

 

Selecting a number from this dropdown list causes the page to refresh, but nothing else happens. The number of products shown on the page remain the same as before.

 

It only occurs on the bottom of pages, not at the top.

 

Any thoughts as to how this can be fixed?

 

Using 1.4.8.2 and the New Default Theme (with substantial CSS skinning).

Link to comment
Share on other sites

This is a problem with the template.

 

Both select boxes use the same id attribute; nb_item. When an option is selected code is run to retrieve the selected option's value for the element with that id. The value from the first element with that id is found and returned; always the top one.

 

When you use the top select this works correctly, but when you use the bottom one still the value from the top one is returned; 10 since it did not change. Hence the number of items displayed does not change.

 

If this is a premium theme contact the theme developer to get it fixed, if not post again .

post-103572-0-36529200-1345434227_thumb.png

Link to comment
Share on other sites

The theme is actually the Prestashop new default theme

 

Ah, I did not notice. OK, I will give you temporary solution but please report this in the tracker so it is fixed for everyone. The original developer is likely to provide a superior fix.

 

I don't have copy of that theme so the following solution is not tested (I am just guessing it should fix).

 

Locate the relevant template in the theme folder and change onchange attribute content for the select element:

 

from

 

onchange="document.getElementById('nbrItemPage').submit();"

 

to

 

onchange="$(this).parent('form').submit();"

 

This is not a good solution as you will still have two of each element with identical ids on the page but now the select should behave properly.

 

Post again if this does not solve and attach the theme zip to the post.

Edited by phrasespot (see edit history)
Link to comment
Share on other sites

Hi there, thanks very much for that! However, it didn't work. It made both instances of the "show [] per page" thing stop working.

 

I have done as you suggested and posted in the tracker. No response yet, but hopefully there will be something soon!

 

Here is the zip of the original theme:

 

 

Link to comment
Share on other sites

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...