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

Dynamic check disabled #51

Open
ishanloya opened this issue Jul 26, 2020 · 1 comment
Open

Dynamic check disabled #51

ishanloya opened this issue Jul 26, 2020 · 1 comment

Comments

@ishanloya
Copy link

Hi,
If I'm not mistaken, in the product form, the option disabled check happens at build time.
Wouldn't this be better done in real time instead since the inventory can keep changing based on sales?
Thanks

@AlexanderProd
Copy link
Owner

AlexanderProd commented Jul 28, 2020

You're talking about the option disabled in the variant selection right? Since the add to cart button is checked using the checkAvailability function. But you're right, if the individual variants are disabled only happens at build time. But I figured since a rebuild should happen anyways when product inventory changes its not worth the extra code to handle this case. But of course it would be better if it were handled, especially with stores of high traffic. I'm happily merging any PR's ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants