You are here

function commerce_email_order_items in Commerce Email 7.2

Same name and namespace in other branches
  1. 7 commerce_email.module \commerce_email_order_items()

Returns a rendered email of the commerce order or an array of the table details

Parameters

$order: The commerce order object

$theme: (optional) Defaults to TRUE Flag to return the contents of the order as a themed html table or an array suitable for theme('table' ...)

Return value

String containing the rendered order table or an array suitable for theme('table' ...)

1 call to commerce_email_order_items()
commerce_email_tokens in ./commerce_email.tokens.inc
Implements hook_tokens().

File

./commerce_email.module, line 85
Defines additional menu item and order html email functonality.

Code

function commerce_email_order_items($order, $theme = TRUE) {
  $wrapper = entity_metadata_wrapper('commerce_order', $order);
  if ($theme) {
    return theme('commerce_email_order_items', array(
      'commerce_order_wrapper' => $wrapper,
    ));
  }
  else {
    return commerce_email_prepare_table($wrapper);
  }
}