We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
File in reference
It should check if product?.stock_status is 'IN_STOCK' or 'OUT_OF_STOCK'
product?.stock_status
The const inStock = product?.stock_status || ''; will return true regardless.
const inStock = product?.stock_status || '';
Instead: const inStock = product.stock_status === 'IN_STOCK' ? true : false;
const inStock = product.stock_status === 'IN_STOCK' ? true : false;
Set a product out of stock. Navigate to it.
1.1.0
16.18
Chrome. Safari
macOS
No response
The text was updated successfully, but these errors were encountered:
Fix(useCart): canAddToCart not working correctly
5c87d85
Check if `stock_status` is 'IN_STOCK' or 'OUT_OF_STOCK'. vuestorefront#1416
No branches or pull requests
Expected Behavior
File in reference
It should check if
product?.stock_status
is 'IN_STOCK' or 'OUT_OF_STOCK'Actual Behavior
The
const inStock = product?.stock_status || '';
will return true regardless.Possible Solution
Instead:
const inStock = product.stock_status === 'IN_STOCK' ? true : false;
Steps to reproduce
Set a product out of stock.
Navigate to it.
What version of Magento 2 integration are you using?
1.1.0
What version of Node.js are you using?
16.18
What browser (and version) are you using?
Chrome. Safari
What operating system (and version) are you using?
macOS
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: