I tried this code with a custom module to remove subtotal from order total preview pane in checkout page but it doesn't work. How can I remove "subtotal" and just show "total" ?

function uc_hide_subtotal_line_item_data_alter( &$items ) {
  foreach ( $items as &$item ) {
 if ($item['id'] == 'subtotal') {
     $item['callback'] = NULL; 
#2 1495704-order-total-preview-css-class.patch750 byteslongwave
PASSED: [[SimpleTest]]: [MySQL] 2,802 pass(es).
[ View ]


longwave’s picture

Title:How can I hide subtotal from order total preview?» Add CSS classes to order total preview line items
Version:6.x-2.7» 7.x-3.x-dev
Component:Code» Cart/checkout
Category:support» feature

Converting this to a feature request. We should mark each line item with a separate class, so they can be altered or hidden with CSS where needed.

longwave’s picture

Status:Active» Needs review
new750 bytes
PASSED: [[SimpleTest]]: [MySQL] 2,802 pass(es).
[ View ]
longwave’s picture

Version:7.x-3.x-dev» 6.x-2.x-dev
Status:Needs review» Patch (to be ported)

Committed to 7.x-3.x, this could be backported I guess.

longwave’s picture

Status:Patch (to be ported)» Fixed

Ported and committed.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.