Add a line item total Views field

Created on 14 December 2010, over 14 years ago
Updated 4 July 2025, 4 days ago

If you want an order field in your view, representing the total price of the order?
Do the following:

Extract the attachment into the same folder as commerce_order_handler_field_order_type.inc

Complement commerce_order.views.inc with

  // Expose the order total price.
  $data['commerce_order']['order_total'] = array(
    'field' => array(
      'title' => t('Order total price'),
      'help' => t('The sum of all line items totals.'),
      'handler' => 'commerce_order_handler_field_order_total',
    ),
  );

And commerce_order.info with

files[] = includes/views/handlers/commerce_order_handler_field_order_total.inc
Feature request
Status

Closed: outdated

Version

1.0

Component

Views integration

Created by

🇧🇪Belgium PieterDC Ghent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024