Representation of cart block,

Created on 16 July 2013, almost 11 years ago
Updated 23 May 2024, about 1 month ago

Hello,

perhaps it is of interest to represent the block so?
From line # 187 in uc_cart.theme.inc

// Build the basic table with the number of items in the cart and total.
  $output = '<table class="cart-block-summary"><tbody><tr>'
           . '<td class="cart-block-summary-items">' . $item_text . '</td></tr>'
           . '<tr><td class="cart-block-summary-total"><label>' . t('Total:')
           . '</label> ' . theme('uc_price', array('price' => $total)) . '</td></tr>';

  // If there are products in the cart...
  if ($item_count > 0) {
    // Add a view cart link.
   <em> $output .= '<tr class="cart-block-summary-links"><td>'</em>
             . theme('links', array('links' => $summary_links)) . '</td></tr>';
  }

  $output .= '</tbody></table>';

  return $output;
}

your code:

 // Build the basic table with the number of items in the cart and total.
  $output = '<table class="cart-block-summary"><tbody><tr>'
           . '<td class="cart-block-summary-items">' . $item_text . '</td>'
           . '<td class="cart-block-summary-total"><label>' . t('Total:')
           . '</label> ' . theme('uc_price', array('price' => $total)) . '</td></tr>';

  // If there are products in the cart...
  if ($item_count > 0) {
    // Add a view cart link.
   <em> $output .= '<tr class="cart-block-summary-links"><td colspan="2">'</em>
             . theme('links', array('links' => $summary_links)) . '</td></tr>';
  }

  $output .= '</tbody></table>';

  return $output;
}

greetings
twuli

πŸ’¬ Support request
Status

Fixed

Version

3.5

Component

Cart/checkout

Created by

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.

No activities found.

Production build 0.69.0 2024