Vote up!
Vote down!

Commerce 2.x

Hello ,

M building project in drupal 8.x , commerce 2.x

I need to print commerce product fields in node.html.twig file .

How can i print that ? Any idea ?

Thank you in advance.

Asked by: Bhoomi
on July 8, 2016

2 Answers

Vote up!
Vote down!

Commerce 2.x does not use nodes in any way, so I'm unsure how you're getting the product linked to the node? And why? You'll need to provide more info.

Bojan Zivanovic
Answer by: Bojan Zivanovic
Posted: Jul 10, 2016
Vote up!
Vote down!

Hello ,

Thanx Bojan for your answer .

I have to design product details page ,

For that i need to print fields separately , without array in overrided file (node--content-type.html.twig).

In drupal 7 , print like "

print render($content['product:field_name']);

In case of drupal 8 , can i print product fields like this way?


Answer by: Bhoomi
Posted: Jul 11, 2016