Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Shopify] Fix pagination loader PLP #894

Merged
merged 4 commits into from
Oct 16, 2024

Conversation

luanargolodev
Copy link
Contributor

What is this Contribution About?

This PR aims to fix pagination in the Shopify app's PLP loader.

What happens?

Technically, when we enter the PLP home page, we would be visiting the first page. The thing is, in the loader, it is inserting the page as 0 and ends up "messing up" the pagination, since the nextPage and previousPage are done from the current pagination.

Exemplifying

Considering that we enter the /accessories/clothes page and when entering the first page, we do not have the attribute ?page=1, the loader would automatically return that we were on page 0.

When pagination to the next page, it would be set to the url ?page=1 instead of ?page=2. When returning to the pagination, it would be set to the url ?page=0.

image

image

Copy link
Contributor

github-actions bot commented Oct 2, 2024

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.59.22 update
  • 🎉 for Minor 0.60.0 update
  • 🚀 for Major 1.0.0 update

@guitavano guitavano merged commit 75165bd into deco-cx:main Oct 16, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants