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

[BUG] Availability status of the product variant is not displayed correctly on product page #2395

Open
Golchenko opened this issue Dec 13, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Golchenko
Copy link

When changing the availability of a product variant to "in stock", the product page displays "out of stock"

Steps to reproduce:

  • install Hydrogen by npm init @shopify/hydrogen
  • Choose a template: demo store
  • Choose a language: TypeScript
  • Create env file and connect store
  • create a product with multiple variants, all variants are out of stock
  • check product in Hydrogen
  • set one of the variant option "Continue selling when out of stock" to true or change quantity
  • update this product's page in Hydrogen

Expected result:
For a product variant with positive availability, an "add to cart" button will be displayed

Actual result:
After refreshing the page, the correct information is displayed at first, but then the status of the variant changes to "out of stock".

Video demonstration of the bug:
https://www.loom.com/share/05f0d32b17c8437b888ce3f8ddc49ac0

Additional context:
Apparently, the ProductForm component is mounted twice, and the second time it displays the state of the first variant, despite the fact that another varianr is selected. https://i.imgur.com/9InrT4a.png

  • Hydrogen version: 1.6.4
  • Node version: 18.12.1
  • Device details: the problem is observed on different devices
@Golchenko Golchenko added the bug Something isn't working label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant