Elkfox / Ajaxinate

🎡 Ajax pagination plugin for Shopify themes

Home Page:https://ajaxinate.elkfox.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Back button Help

lear2000 opened this issue · comments

I have scroll turned on, if I scroll down a few sections, click a shirt, click back I always end up in an random place. I noticed on the demo shop this never happens. Am I missing something or is it a (css) layout issue?

https://ed531a6jq89afhoi-17091169.shopifypreview.com

@lear2000 that behaviour would depend on a number of factors in your theme. On some stores we push a history state so that we can control where the user is returned to when hitting the back button. You can get quite creative with that 👌

Ok. Noob to history state, I have tried a few things and failing. Have any pointers.
I am thinking if I can initiate the ajax to be loaded when I arrive back on the collection page it might fix the issue, like preload the previous page

@lear2000 There are a few potential approaches...

You could store the location and reload the content using Ajax, then scroll to that location (or something similar).

You could do something like store the collection's products in local storage then reload that when returning.

One option I like it to store the 'page' that the customer was at when they clicked through. Then load that page first when returning to the collection. You could have a "previous" button at the top that loads pages that were before the new first page.