I want to display, let's say, three additional SKUs (e.g., skuredring3 and skuredring4) similar to the one of the displayed product (e.g., skuredring).
Is this even possible?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityRelated products in Drupal Commerce can be accomplished in a variety of ways:
As entity references, rendered in a related products view Using this approach, relationships are defined manually by Store/site managers (they curate/associate what specific products/skus to show as related) as they edit each product node. Then the view is setup with a contextual filter for the current node ID and a relationship to show all values assigned to the "related products" entity reference field. Refer to this "Related Products Guide using Views and Entity Reference" post that walks you through the approach.
As taxonomy tags, rendered in a related products views Using this approach, relationships are defined manually by Store/site managers (they tag products with specific classifications) as they edit each product node. Then the view is setup with a contextual filter for the taxonomy terms on the current node and a relationship for terms in the specific taxonomy on that node. See this similar post, "Related Articles - A Block View Of Nodes With Common Taxonomy Terms"
As a view that programmatically looks for skus of a particular pattern Using this approach, store/site managers don't have to tag products- they just need to ensure following a standard ruleset in defining skus for products. Then the site manager would setup a view of Commerce Products with a filter on the product sku field containing "skuredring" in your example. This approach locks the view into showing only those products with the sku.