I've a site developed with Drupal commerce.
I'm using the context filter to display a block with related products. I want to display 4 products, first ones I've selected with entity field, if there aren't (or not enough) ones that have the same category, even if these are not enough I want ones that have the category with the same parent of my product.
To do this I used a view and set the contextual filters with Views Module Contextual Filters OR. With my contextual filter I'm able to extract the related products, then the products of the same category, but can't extract products that have the same parent category. Also I can't order my products, first related ones, then the ones with the same categories, etc.
I am attaching a screenshot for clarity.
Any suggestions? Thank you