Mr_Ridd Posted March 5, 2013 Share Posted March 5, 2013 Hi Got a bit of a strange issue. My shop version is 1.5.2.0. I go to a category and, say for example, 10 products are showing. I then click on Page 2, which displays correctly. Then I select 50 from the "products per page" drop-down box and it gives me a Page Not Found. Any ideas? Link to comment Share on other sites More sharing options...
vekia Posted March 5, 2013 Share Posted March 5, 2013 its probably because you are on second page, if you select "50 per page" on first page everything works fine? Link to comment Share on other sites More sharing options...
Mr_Ridd Posted March 5, 2013 Author Share Posted March 5, 2013 Yes it's only on pages after Page 1. On page 1 it works fine. Link to comment Share on other sites More sharing options...
Mr_Ridd Posted March 5, 2013 Author Share Posted March 5, 2013 I made a work around but I think there is some backend code that's isn't using the page number correctly. I added this to the tpl file... function ChangeProductsPerPage() { var elements = document.getElementsByName('p'); if( elements.length > 0 ) { elements[0].setAttribute('value','1'); } document.productsform.submit(); } And then I replaced the onclick of the Select box. Link to comment Share on other sites More sharing options...
PascalVG Posted March 5, 2013 Share Posted March 5, 2013 It goes wrong if you ARE on page 2, and then change to 50 items/page. It doesn't have a page 2 then, and prestashop isn't jumping to page 1 if this is the case, it stays at page 2 and complains... Link to comment Share on other sites More sharing options...
Mr_Ridd Posted March 6, 2013 Author Share Posted March 6, 2013 I understand what the issue is. But what is the fix? Link to comment Share on other sites More sharing options...
vekia Posted March 6, 2013 Share Posted March 6, 2013 I understand what the issue is. But what is the fix? you should add {if} condition, be this i mean something like this {if #counter_of_products>50} DISPLAY SELECTION FOR 50 ITEM PER PAGE {/if} Link to comment Share on other sites More sharing options...
PascalVG Posted March 7, 2013 Share Posted March 7, 2013 Vekia, that wouldn't guarantee it yet, as you may choose 10/page first, then go to page 3, then click 50/page or so. I would just move it to page 1 whenever you change amount... (Or really calculate : if nr of products*listvalue > current page*listvalue then stay on this page, else move to page 1 My 2 cents, Pascal 1 Link to comment Share on other sites More sharing options...
vekia Posted March 9, 2013 Share Posted March 9, 2013 Vekia, that wouldn't guarantee it yet, as you may choose 10/page first, then go to page 3, then click 50/page or so. I would just move it to page 1 whenever you change amount... (Or really calculate : if nr of products*listvalue > current page*listvalue then stay on this page, else move to page 1 My 2 cents, Pascal you are absolutely right, thanks for your attention Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now