diff --git a/uc_ctools_example/plugins/ubercart/line_item/test_line_item.inc b/uc_ctools_example/plugins/ubercart/line_item/test_line_item.inc new file mode 100644 index 0000000000000000000000000000000000000000..ad072b1cd629f546c020828a9aa9d4fcf6104339 --- /dev/null +++ b/uc_ctools_example/plugins/ubercart/line_item/test_line_item.inc @@ -0,0 +1,34 @@ + 'test_line_item', + 'title' => t('Test line item'), + 'weight' => 2, + 'stored' => FALSE, + 'add_list' => FALSE, + 'calculated' => FALSE, + 'callback' => 'uc_ctools_example_line_item_test', +); + +/** + * Callback function of line item plugin. + */ +function uc_ctools_example_line_item_test($op, $order) { + switch ($op) { + case 'load': + $lines[] = array( + 'id' => 'test_line_item', + 'title' => t('Test line item'), + 'amount' => uc_order_get_total($order, TRUE), + ); + return $lines; + } +} \ No newline at end of file