Tags/topics: 
1
Answers
Vote up!
0
Vote down!

Where is place $content in node--product--type.tpl.php be generated and manipulated?

I am a beginner of drupal commerce, I know Drupal Commerce display product with node--product--type.tpl.php, "render($content)" does this work.

I need to add a property "monthly sales" to each node(product display) so that I can display it in node page.

With drupal core, I can use hook_load and hook_view to display custom properties, but it seems Drupal Commerce doesn't work by this way.

Where is place the array $content be generated and manipulated in Drupal Commerce? Which hook can I use?

Appreciate for any help or comments.

atec zhou
Asked by: atec zhou
on December 14, 2014

1 Answer

Vote up!
0
Vote down!

I got it, It's hook_entity_view.

atec zhou
Answer by: atec zhou
Posted: Dec 14, 2014

Comments

We can read profiles\commerce_kickstart\modules\contrib\commerce\modules\product_reference\commerce_product_reference.module for reference.

- atec zhou on December 14, 2014