I want to have separate twig templates for each product type in drupal 8 commerce to customize them.
is there any way to do that?
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 community
by default drupal 8 uses
commerce-product.html.twig. you can find it from
modules/contrib/commerce/modules/product/templates/ and copy and paste it to your
template folder in your theme.
and to create separate template file for each product type you can add
--product type at the end of file name. for example if you have
shoes product type then you should create a file
then drupal uses the new template for shoes product type only.