I have a view with a custom template and I need to query my products using some conditions. I'm running a videogame store, so I have a Content Type and Production Variation called "Games", and those games have a plataform assigned (Content Type field). So now I'm creating a custom PS3 categorie view and I need to query only PS3 games.
This is what I have currently:
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'commerce_product')
->propertyCondition('status', 1)
->propertyCondition('type', 'games')
->fieldOrderBy('commerce_price', 'amount', 'ASC');
$result = $query->execute();
That query returns a list of "games", but I need to filter them by plataform.
PS: I don't know if any one can share information about querying products in Commerce. I have to say that Commerce API is very poorly explained.