Home Forums WoodMart support forum Woocommerce archive view, query params removed on scroll

Woocommerce archive view, query params removed on scroll

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #328918

    Diipno
    Participant

    Hello,
    I am having some issues on my site with how the infinity scroll and pagination works.

    I have a “News” page that links to the shop with the query params https://diip.no/shop/?orderby=date&order=ASC to sort by date and show the newest products first.
    This works fine, however when I scroll down the page the url changes to https://diip.no/shop/page/3 for example and that means I loose the sorting made by the params. This causes issues when a customer enters the “News” page and clicks on a product, then decide to go back to the “News” view (by clicking the back button in their browser)they are redirected back to the url https://diip.no/shop/page/3 and not to https://diip.no/shop/page/3/orderby=date&order=ASC

    #328925

    Hello,

    This is happening because you have set the pagination to infinite scrolling.

    So when you scroll down and the next page is loaded that’s why the url changes.

    This is how infinite scrolling works. And the back button takes you back to the url where you came.

    Best Regards

    #329093

    Diipno
    Participant

    Hello, thanks for your reply.

    That is all working nice and well but I don’t think you fully understand my problem.
    If you look at the video I sent, you would see that when I scroll the ?orderby=date&order=ASC query params are removed when scrolling bellow the “first” page. What I would assume would happen is that yes the url should change to /page/2/ but it should also preserve the query params so it should look like this /page/2/?orderby=date&order=ASC

    What happens now that query params are removed is that when the user clicks back from a single product in the browser they are redirected to /page/2/ instead of /page/2/?orderby=date&order=ASC so they are being shown the default product listing and not sorted by the “newest” product listing.

    #329203

    Artem Temos
    Keymaster

    Hello,

    Yes, you are right and it works incorrectly. We don’t have a quick fix for this but we will investigate this function and try to find some workaround in our 6.3 update.

    Kind Regards

    #329427

    Diipno
    Participant

    I understand, thanks for letting me know.
    I will keep a eye out for the 6.3 update 🙂

    Have a great day Artem!

    #329435

    Artem Temos
    Keymaster

    Thank you have a nice day too! Let me know if you have any extra questions.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Woocommerce archive view, query params removed on scroll’ is closed to new replies.