protected function getRelatedFieldValues(array $product, array $ids)
    {
        $related = array();
        foreach ($product['combination'] as $combination) {
            if (array_intersect($ids, $combination['fields'])) {
                $related += $combination['fields'];
            }
        }

        return $related;
    }
protected function getRelatedFieldValues(array $product, array $ids)
    {
        $related = array();
        foreach ($product['combination'] as $combination) {
            if (array_intersect($ids, $combination['fields'])) {
                $related += $combination['fields'];
            }
        }

        return $related;
    }
protected function getRelatedFieldValues ( array $ product , array $ ids ) { $ related = array ( ) ; foreach ( $ product [ 'combination' ] as $ combination ) { if ( array_intersect ( $ ids , $ combination [ 'fields' ] ) ) { $ related += $ combination [ 'fields' ] ; } } return $ related ; }
Returns an array of related fields value IDs
@todo Rethink this. It should return all possible combinations
@param array $product
@param array $ids
@return array
Returns an array of related fields value IDs