You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, some products that do have stock, are not shown. I have absolutely no idea why and I cannot see anything those products have in common. If I go through all variants and get the stock for every variant with variant.stock, I get the corrects numbers. It just seems like the hasStock: true parameter doesn't work as it should.
Steps to reproduce
Run {% craft.products().hasVariant({hasStock: true}).all() %}
Expected behavior
Show products that have variants with stock
Actual behavior
Some products that have variants with stock, don't get shown.
Craft CMS version
5.4.2
Craft Commerce version
5.1.1
PHP version
8.3.8
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
I noticed this happens with products/variants that are imported with Feed Me. If stock was edited with Feed Me, you have to run craft resave/products to get the correct stock on the front-end.
What happened?
Description
I'm running
However, some products that do have stock, are not shown. I have absolutely no idea why and I cannot see anything those products have in common. If I go through all variants and get the stock for every variant with
variant.stock
, I get the corrects numbers. It just seems like thehasStock: true
parameter doesn't work as it should.Steps to reproduce
Expected behavior
Show products that have variants with stock
Actual behavior
Some products that have variants with stock, don't get shown.
Craft CMS version
5.4.2
Craft Commerce version
5.1.1
PHP version
8.3.8
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: