Hi,
Building a Woocommerce single product page using layout builder, and using loopers to generate related products using the following query string:
`product_cat={{dc:term:slug}}&post_type=product&posts_per_page=4&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}&orderby=rand`
The results don’t seem quite on track with the standard WC Related Products widget, but it’s close enough!
Main issue is that ‘out of stock’ products are also being returned. I can set a condition on repeated elements so that {{dc:woocommerce:product_price}} > 0 doesn’t return that individual (out of stock) product, but that reduces the total number of products displayed and hence messes the layout up. Can also set a condition for Product (is) is In Stock which also works
just figured checking the price would be easier in the query string for testing.
Can’t seem to get the query string to ignore out of stocks. Any insights most welcome…! Just adding &{{dc:woocommerce:product_price}}>0 to the query string is obviously not working!

