How to display the variation of a custom display in Twig In my type of product variation, I have 4 different display :


Default
Panier (Cart)
Teaser
Teaser relation




I have created a template for product type and want to display the "Photo" field of the "Teaser" display of the product variation type.

Here is what I put in my template:

{{ product.variation_field_produit_image }}


The problem is that it displays the "Photo" field of the "Default" display.

How to get the "Photo" field of the "Teaser" display?
You can create another template for that specific view mode.

The naming of that template should be commerce-product-variation--product-type--view-mode.html.twig.

So you can create a template called commerce-product-variation--PRODUCTTYPE--teaser.html.twig, and then print the image field from there.