Infinity scroll with history back

  • Posts: 1119
  • Thank you received: 114
6 years 2 weeks ago #300238

Hi,

As we see some increase in mobile users past few years from 55% to almost 80% we would like to use infinity scroll feature. This would feel much better as users on mobile are more intend to scroll. So this would increase overall user experiance.

However as we know, our infinity scroll has no history back, those after each new item appear and clicking on it, then going back you will be on the top of the page. Those it's useless if u have a lot of products...

So would be great if hikashop could consider to add something like this: goo.gl/2prwBk

As you can see on each click/load it will add some kinda parameter to url "page=1, page=2" and so on... Those going back from product to category page you are on same level as you was before.

Any chance hikashop could improve infinity scroll?

If not, we would like to get some hints how it could be done.

I don't think its a lot of work if you know hikashop code well.

Kind Regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 2 weeks ago #300248

Hi,

There is basically three parts to do that:
1. You need to add some javascript to the current infinite scroll to update the URL and potentially the browser history.
2. You need to add some more javascript to the current infinite scroll so that when you arrive on a products listing with that "page" parameter you load the products of the page and scroll down to it.
3. The biggest problem with point 2 is if you arrive on a products listing with a page number like 10 for example. You can have it load the products of page 10 and scroll to it but then what if the customer scrolls back up ? You have to load also all the 8 previous pages of products OR you need to put a system to handle the scroll up and insert the products "in between". The current system isn't really made to handle the "inbetween" insert. And loading 9 pages of products before scrolling down to the place where the customer was will potentially take a lot of time, especially on mobile where you don't have as much download speed as you would have on a computer. So to do that well, it might require some extensive changes to the current infinite scroll system.

Anyways, to do all these, you'll mainly want to edit the code in the listing_div view file of the product view where the whole infinite scroll system is handled.

We do want to work on these points in the future, but didn't get round to it yet.

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

  • Posts: 1119
  • Thank you received: 114
6 years 2 weeks ago #300276

Hi,

Thanks for replay Nicolas.

1. This isn't big issue and could be done easily i think.
2. and 3. As you can see in my link provided. If you are, as example, on page 4 and going back from product page to product listing page, you are on same page 4. The difference is that it loads only products from that page and "view previous products" button appears on the top of the listing.
So there is no need to load previous items because user may do it by him self if needed. Infinity scroll works in both directions. This is there my knowledge stops and i am not sure how can this be done.

I hope you can add such feature in your todo list.

Thanks

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 1 week ago #300281

Hi,

As I said previously, we do want to work on these points in the future, but didn't get round to it yet. So that feature is already on our todo list.

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

  • Posts: 64
  • Thank you received: 1
  • Hikashop Business
4 years 2 weeks ago #325547

Hello,

I was also looking for this feature. It is essential for mobile users that "hit back" and loose all their scroll history :dry:

(there is a dev js framework for infinity scroll out there that may help pave the way)

Thank you!
Yannis

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 2 weeks ago #325568

Hi,

Well, it's still on our todo list. We worked on other things
so we didn't more forward with this yet.
We did improve the infinite scroll mechanism so that the elements can be properly referenced but we didn't work yet on the history mechanism.

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

  • Posts: 2143
  • Thank you received: 747
4 years 2 weeks ago #325575

yanliom wrote: It is essential for mobile users that "hit back"


...and not only for mobile users.

So: +1


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" )
Last edit: 4 years 2 weeks ago by lousyfool.

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

  • Posts: 26
  • Thank you received: 3
  • Hikashop Business
3 years 7 months ago #331537

This may not work for everybody, but I circumvented this history problem by creating no history and opening the product in a different browser tab.
This while waiting for a better solution from the hika team. :)

I added this line right after the first IF-statement in file "product/listing_img_title.php".
$link = $link.'" target="_blank';

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

Time to create page: 0.099 seconds
Powered by Kunena Forum