My experience with Drupal 8 is limited and I am stumbling with something that I would have thought would have been fairly easy.

Anyway, here is the situation.

I have a 'product' content type. There are 3 fields in this content type to select a 'related product' with an content entity reference field.

Now I am trying to create a block view that pulls in and displays a title, image and path of those select products into the product page that they were selected to. 

My issue is that I cannot seem to pull in the products that were selected in these fields.

Comments

pixelsweatshop’s picture

We are going to need more info on how you setup your view. Is your contextual filter in place for the content id?

candorem_andy’s picture

Ya, I did that and then set up a relationship with Content referenced from field_related_product_1.

pixelsweatshop’s picture

Can you post a screenshot of your contextual filter content:nid settings?

candorem_andy’s picture

pixelsweatshop’s picture

Take out the relationship in you contextual filter. It should only be in the relationships section and then added to your field settings.

candorem_andy’s picture

It is displaying the product that the related products are selected in, but not the related products.

Here are my settings, I apologize, I'm new to Drupal.
https://imgur.com/v7DdVDS

pixelsweatshop’s picture

I am not totally following you. Also, I am not sure of your setup and why you have 3 separate fields for adding related products. Usually this is done with one field with multivalue settings.

If your site is publicly available (and you feel comfortable doing so) send me a PM on my drupal.org account page with a URL and login info so I can see what you have going on in the backend.

candorem_andy’s picture

Product A has 3 fields that can be selected for related products. Products b,c,d are currently chosen as related products for Product A. (I can make it one field with multi-values, but at this point I'm just looking for the output I need).    With the setup you see from the previous image, the output is giving my product A instead of b,c,d.

pixelsweatshop’s picture

You need to actualy add the product b,c and d fields in your field settings in your view on the left hand side. Remove the exisiting field you have there as it will show only product a.

candorem_andy’s picture

Thank you so much.  I was thinking about the output wrong and it totally had me confused.  Again, thank you!