cancel
Showing results for 
Search instead for 
Did you mean: 

How to write query to find out products which visibility is 4 for configurable product ?

How to write query to find out products which visibility is 4 for configurable product ?

How to write a query to find out products which visibility is 4 for a configurable product but his child product visibility is 1?


I need to help here to get products to display only configurable product, not his child products.

So here I have one configurable product name ==> Product 1

and his child products such as Product 1-White-20 Product 1-White-30 Product 1-Red-20 Product 1-Red-30

these all 4 child product visibility 1.

now ist particular size attribute Product 1-White-20(attribute size ==20) Product 1-White-30(attribute size ==30) Product 1-Red-20 (attribute size ==20) Product 1-Red-30 (attribute size ==30)

but my main product has not any size selected.

so when I want to filter by size then no products come in filter result.

So in my main product not a size but in child product, there is size attribute so I need to display only main product in filter result.

so please help me. Thanks in Advance.