Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function THEME_commerce_price_formatted_components($variables) {
- // Add the CSS styling to the table.
- drupal_add_css(drupal_get_path('module', 'commerce_price') . '/theme/commerce_price.theme.css');
- // Build table rows out of the components.
- $rows = array();
- foreach ($variables['components'] as $name => $component) {
- $rows[] = array(
- 'data' => array(
- array(
- 'data' => $component['title'],
- 'class' => array('component-title'),
- ),
- array(
- 'data' => $component['formatted_price'],
- 'class' => array('component-total'),
- ),
- ),
- 'class' => array(drupal_html_class('component-type-' . $name)),
- );
- }
- $rows = array_splice($rows, 2);
- return theme('table', array('rows' => $rows, 'attributes' => array('class' => array('commerce-price-formatted-components'))));
- }
Add Comment
Please, Sign In to add comment