Pagination URLS

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #145886

-- url of the page with the problem -- : fabribles.com/downloads
-- HikaShop version -- : HikaShop Business: 2.2.3
-- Joomla version -- : Joomla! 3.2.2 Stable

I have written a plugin for hikashop that uses the infinite scroll method of displaying products (you can view it at URL above). Everything is working fine but I need find a workaround for the pagination behavior that remembers the last page browsed. I'm aware that this is normal functionality but would like to add a link to allow the user to return to the first page.

My issue is that I cannot seem to figure out what the URL is for this.

Appending ?view=0 to the url does not work and I have not been able to identify any query vars that work.

Any ideas?

BTW how is the pagination actually remembered?

TIA

DM/

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #145890

Possibly a better question is how can I reset the view?

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #145897

So I have discovered that if I have filters enabled using ?filter_Name=0 will do the job but it does not work without filters enabled.

Please Log in or Create an account to join the conversation.

  • Posts: 81478
  • Thank you received: 13060
  • MODERATOR
10 years 1 month ago #146005

Hi,

You can reset the pagination to the first page of a products listing
$app = JFactory::getApplication();
$app->setUserState('com_hikashop.product_hikashop_category_information_menu_IDMENU_IDCATEGORY.limitstart',0);

or
$app = JFactory::getApplication();
$app->setUserState('com_hikashop.product_hikashop_category_information_module_IDMODULE_IDCATEGORY.limitstart',0);

based on whether your products listing is a menu or a module.
The IDMODULE and IDMENU should be replaced by the id of the module/menu of the pagination and the IDCATEGORY should be replaced by the id of the current category.

The following user(s) said Thank You: DeeEmm

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #146012

Thanks Nicolas, will give that a try later on this evening

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 1 month ago #146372

DeeEmm wrote: I have written a plugin for hikashop that uses the infinite scroll method of displaying products (...)


Whoa - very nice!

I've come across your site deeemm.com and the helpful tutorials there before. Just checked, but the infinite scroll thingy is not (yet?) there. Any way to get somehow, somewhere hold of it?

Thanks,
LF


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #146406

lousyfool wrote: Whoa - very nice!


Thanks. :)

lousyfool wrote: Just checked, but the infinite scroll thingy is not (yet?) there. Any way to get somehow, somewhere hold of it?


I'm planning to package it up and add it to the store once I'm 100% happy with it. There are a couple of things that I need to address before I would be happy enough to offer it for public consumption. Hopefully it should be ready some time this week.

DM

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 1 month ago #146408

That'd be great! Keep the good news coming... when ready, one more brief post here would be much appreciated! Thanks again!


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #146411

lousyfool wrote: That'd be great! Keep the good news coming... when ready, one more brief post here would be much appreciated! Thanks again!


For sure, will let you know when it's done.

DM

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #146829

lousyfool,

I've updated the plugin, tested it on a stock Joomla (3.2.2) Install and packaged it up. It's now available via my webstore.

deeemm.com/store/product/37-hikashop-infinite-scroll

Example as per site below

fabribles.com/downloads

The following user(s) said Thank You: Eliot, lousyfool

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
10 years 1 month ago #146832

Fantastic - that was quick!

Just bought and downloaded it, can't wait to install and play with it...

Thanks & cheers!


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
10 years 1 month ago #146838

You're welcome.

Let me know how you get on.

Any issues just create a support ticket and I will get right on to it.

Please Log in or Create an account to join the conversation.

  • Posts: 278
  • Thank you received: 14
  • Hikashop Business
8 years 10 months ago #202941

It looks great.
Its still ok for latest Joomla and Hika?

Please Log in or Create an account to join the conversation.

  • Posts: 278
  • Thank you received: 14
  • Hikashop Business
8 years 10 months ago #203059

Instaled, works great.
Have problem with pagination memory and DeeEmm support is fast and great. Solved problem in few days.
And it cost less then beer ;)

Recomended

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
8 years 10 months ago #203819

Thanks for the feedback Mojweb :D

The pagination issue does require a hack to the Hikashop component. it is simply a change to one line of code a follows:

To disable only the pagination memory change in the file components/com_hikashop/views/product/view.html.php

$pageInfo->limit->start = $app->getUserStateFromRequest( $this->paramBase.'.limitstart', 'limitstart_'.$this->params->get('main_div_name').$category_selected, 0, 'int' );

to:
$pageInfo->limit->start = JRequest::getInt('limitstart_'.$this->params->get('main_div_name').$category_selected, 0 );

Nicolas, is there any chance of adding a core option to hikashop to enable / disable the pagination memory? e.g. when a user navigates to a category they are always taken to the first page. I know that this can be forced using the ?limitstart=1 query string but many users dislike adding the query string to their menu URLs for aesthetic reasons.

DM

Please Log in or Create an account to join the conversation.

  • Posts: 81478
  • Thank you received: 13060
  • MODERATOR
8 years 10 months ago #203860

Hi,

We don't plan on doing that change as it only solves the problem for the pagination page number, not for filters, not for the number of elements per page, etc. While the solution we provided with the "redirect post mode" setting of the HikaShop configuration solves the issue for all of that and doesn't require you to add any parameter to the links of your menus.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
8 years 10 months ago #204070

DeeEmm has been trying to help me with the same problem and if his sollution does not work and the sollution you have provided doesn't fix it either, then please do help DeeEmm to get his infinit scroll plugin to work, as i have a client that really wants this to work on their site.

The following user(s) said Thank You: DeeEmm

Please Log in or Create an account to join the conversation.

  • Posts: 81478
  • Thank you received: 13060
  • MODERATOR
8 years 10 months ago #204079

Hi,

So far all the people who turned on the "redirect post mode" setting of the HikaShop configuration had that issue (the pagination remembered when going back to the page) "fixed".
If that's not the case on your website, then please provide information on what is your problem so that we can analyze it.

Moreoever, DeeEmm already has his infinite scroll plugin working and can be found here: deeemm.com/store/product/37-hikashop-infinite-scroll
So I don't see what you're talking about.

The following user(s) said Thank You: DeeEmm

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 14
8 years 10 months ago #204874

Hi Nicolas,

Looks like you already have a solution with the "redirect post mode" setting. :)

I could have saved myself some hours of head scratching.

DM.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
8 years 10 months ago #204964

hi Nicolas,

on jupiter-cykler.dk/herre i have turned off the "Redirect POST mode" and it doesn't work.... if i scroll to the bottom and reloads the page it says i'm on page 7

running hikashop 2.4.0 and infinit scroll 1.0.10 from DeeEmm

Please Log in or Create an account to join the conversation.

Time to create page: 0.124 seconds
Powered by Kunena Forum