-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: Don't render PDP with no price #2142
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ecefaad:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I test it? Do you have a faulty product?
Sorry! I was still deploying, updated the description! |
@@ -214,9 +214,13 @@ export const getStaticProps: GetStaticProps< | |||
|
|||
const { data, errors = [] } = searchResult | |||
|
|||
const hasPrice = data?.product?.offers.offers.some( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should move this logic to the faststore/api
, throwing an isNotFoundError
from there.
@Gmantiqueira do we still need this PR? |
Hey people! Just a quick update - I'm closing this PR as it seems the problem was actually due to an indexing issue. 👍 |
What's the purpose of this pull request?
Related to #2085, we were rendering PDPs with no associated price. They doesn't show in PLPs, but we can access the URL.
How it works?
This PR fixes that triggering the 404 page when we have no price associated.
How to test it?
Check those products, they're without price:
https://sfj-da92366--starter.preview.vtex.app/awesome-granite-cheese/p
https://sfj-da92366--starter.preview.vtex.app/sleek-wooden-chair-16834618/p
Starters Deploy Preview
References