Author Topic: Reset pagination?  (Read 12094 times)

Wallboy

  • Beginner
  • *
  • Posts: 33
Reset pagination?
« on: July 04, 2008, 08:13:17 am »
Is it possible to reset the pagination results to page 1 when a user changes to a different category?

For example, if a user goes to a category and then goes through multiple pages and say stops at page 9 and decides to go elsewhere on the site, then decides to come back to that category at a later time it puts him right back on page 9. I'd like it to be back at page 1.

How can I get pagination to work this way?

Thanks.

loiseau

  • Beginner
  • *
  • Posts: 31
Re: Reset pagination?
« Reply #1 on: November 28, 2008, 19:12:31 pm »
Same issue.
How to make a reset pagination ?

Thanks for the guy who got the solution !


ugriecu

  • Beginner
  • *
  • Posts: 27
Re: Reset pagination?
« Reply #2 on: January 28, 2009, 13:18:59 pm »
same problem, and you can notice that if you go to another category wich has only two page, you don't see any products

hellodave

  • Jr. Member
  • **
  • Posts: 100
Re: Reset pagination?
« Reply #3 on: January 29, 2009, 01:37:16 am »
Ive got the same problem.
I cant get back to page 1, the link points to the right page, but it keeps loading page 2. It seems only by closing and reopening the browser can I get back to the proper page 1. This has really got me stumped, Ive looked through all the pagination stuff I can find and couldnt work it out.

Im wondering if maybe one of the components I have installed is causing a conflict or something? My setup -

Joomla 1.5.9
VirtueMart 1.1.3
Chrono Contact 3.0 STABLE
guardxt 0.09.06
JoomlaPack 2.1.b1
sh404sef 1.0.16_Beta

Any help gratefully received
currently working with -
Joomla 2.5.8
VM 2.0.18a

hellodave

  • Jr. Member
  • **
  • Posts: 100
Re: Reset pagination?
« Reply #4 on: January 29, 2009, 02:13:07 am »
Oh man, I just worked it out, I did a similar thing on the chronoforms forum earlier, posted a question and then answered it myself  ::)

It was a problem with my sh404sef setup, I was trying to keep it nice and clean and disabled as much as I could. Well, VM needs some of that info for the pagination.

In sh404SEF Configuration - Plugins - Virtuemart,
I set "Insert categories" to "All nested categories" and
"Using Items per page drop-down list" to "yes."
That fixed the problem for me :) Happy days

edit: I should add, I dont have any nested categories and I have edited out the items per page drop down, I dont need it. So....I dont know which of those 2 changes fixed it, you might only need to do one. Ill shut up and go and test :)

edit2: yep, only the nested categories setting was not needed. I set it back to "Only last one" and it still works.
currently working with -
Joomla 2.5.8
VM 2.0.18a

basvanberkel222

  • Beginner
  • *
  • Posts: 16
Re: Reset pagination?
« Reply #5 on: January 29, 2009, 21:36:42 pm »
Hello Dave,

Can you ecplain this futher?
I am having the same problem, and I think you know the solution.
thnx, Bas

edit: I should add, I dont have any nested categories and I have edited out the items per page drop down, I dont need it.

hellodave

  • Jr. Member
  • **
  • Posts: 100
Re: Reset pagination?
« Reply #6 on: January 29, 2009, 22:05:34 pm »
Erm,I can try :)
All of my categories are on the same level, there is no nesting, so the first of the 2 settings I changed makes no difference. I confirmed that by setting it back to "Only last one" and it still works.
So I conclude that the change that did make the difference is the "Using Items per page drop-down list" setting. Even though I have removed the items per page drop down from my site, sh404SEF still needs it set to yes to give you the correct pagination links.
Any better?
currently working with -
Joomla 2.5.8
VM 2.0.18a

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Re: Reset pagination?
« Reply #7 on: January 30, 2009, 02:32:32 am »
Thanks for the solution hellodave! :) Glad you figured it out.

hellodave

  • Jr. Member
  • **
  • Posts: 100
Re: Reset pagination?
« Reply #8 on: January 30, 2009, 02:51:54 am »
Well, I fixed that one problem I was having, but I dont think I solved the original posters problem, I have the same problem.

If you browse to page 2 of a category, then click on another page (any other), then go back to that category, it takes you back to page 2. I would prefer if the menu links always take you to page 1 of that category. Still looking for a solution...
currently working with -
Joomla 2.5.8
VM 2.0.18a

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Re: Reset pagination?
« Reply #9 on: January 30, 2009, 03:01:37 am »
Spoke too soon then...? :(

Ah well. At least you figured out the solution to one problem. I've not yet experienced this behaviour, will try to replicate it on my end, but from your description, it sounds like the paginaton has a "memory"? It can remember the page you were on when you last accessed that particular category? If that's the case, that memory must be controlled by a cookie that saves the state information for that particular category.

You might want to take a look into that and let us know what you'd find. :)

ugriecu

  • Beginner
  • *
  • Posts: 27
Re: Reset pagination?
« Reply #10 on: January 30, 2009, 08:38:54 am »
hi to everybody.

I check for few days this problem...and i discover a big bug wich afflict all version of vm and joomla....this problem is present also in backend an d in all kind of lists....if you use the nagigation pathway (prev....next end) to go to a specific page of a list and then go to another list (other content) you are sent to the number page of the previous list, not to first page of the new list....
all cache are disabled...
it's a bug of pagenavigation...
files interested pagenavigation.php---->vm
pagenavigation.class.php------>joomla

ps: the problem is present with or without sh404sef
ps2: see my next post (important)

ugriecu

  • Beginner
  • *
  • Posts: 27
Re: Reset pagination?
« Reply #11 on: January 30, 2009, 09:12:41 am »
the answer is in the session.....get the limit of previous session page.
If you activate debugmode you can notice '[vieworder.order_list00limitstart] => 30
' in a new opened list page (this is the case of second page of order list in confirmed status with a # limitbox of 30, the first page start with a limit start of 30 and not of '0').

ps: my session path is writable and all cache are disabled, i'm using vm and joomla 1.0.15 with many hacks, but this problem is present in all version of joomla and virtuemart...

hellodave

  • Jr. Member
  • **
  • Posts: 100
Re: Reset pagination?
« Reply #12 on: January 30, 2009, 18:30:18 pm »
Thanks for the info ugriecu.
I did a quick search on the Joomla forums for pagination issues.
It seems more often than not the problem does not end up being with Joomla core.
It always seems to be an addon component that has the problem.
So I kind of still think it is a VM problem.

I enabled debug mode and although I didnt find the string you mentioned I did find something.
A bit of background info -
Ive done the tweak from post 3 in this thread to ensure 15 products per page -
http://forum.virtuemart.net/index.php?topic=29230.0
This category has 16 products, so 2 pages in total.

On page 1 I found this -
Code: [Select]
viewlistlimitshop.browse\";s:2:\"15\";s:21:\"view1browselimitstart\";s:2:\"15\";
On page 2 I found this -
Code: [Select]
viewlistlimitshop.browse\";s:2:\"15\";s:21:\"view1browselimitstart\";i:0;
Now if I go to a different category and then go back to this one via the menu, I get page 2 where I found this -
Code: [Select]
viewlistlimitshop.browse\";s:2:\"15\";s:21:\"view1browselimitstart\";s:2:\"15\";
Which is the same as page 1 the first time round.
Now I dont really know what those bits of code mean,
I know they are session variables being stored in the database,
but I dont know what they mean :)
So in my limited-by-lack-of-knowledge way, this is making me think that the sessions are fine, there is something else going wrong.

Something else that cropped up while searching on the joomla forum -
http://forum.joomla.org/viewtopic.php?p=1549933
This is showing a different way for a component to do pagination than VM does.
So Im studying this solution and comparing it with pageNavigation.class.php in VM to see if I can find the problem.
As you may be able to tell, I feel slightly out of my depth with this one :)
Any help gratefully appreciated.

currently working with -
Joomla 2.5.8
VM 2.0.18a

ugriecu

  • Beginner
  • *
  • Posts: 27
Re: Reset pagination?
« Reply #13 on: January 30, 2009, 20:53:44 pm »
i'm work to resolve this...i'll be happy to tell you good news...

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Re: Reset pagination?
« Reply #14 on: January 31, 2009, 15:59:11 pm »
Thank you very much for all your research hellodave, it's certainly going a long way to helping us find out how to fix this problem. And about that feeling of being slightly out of your depth, I'll admit I feel the same way. :) I am determined to figure my problems out though, which is why even if I don't know, I'll learn.

Unfortunately I don't have Internet at home, my telephone line died yesterday so I have no Net until Monday (using a friend's for a short bit at the moment). I hope that this problem has made some head-way in that time, but if not, I'll join in the hunt. :D

Have a great weekend guys.