function uc_discounts_uc_checkout_pane_cart in Ubercart Discounts (Alternative) 7.2
Callback that replaces the stock ubercart checkout cart pane.
Parameters
string $op:
Return value
array
See also
uc_discounts_uc_checkout_pane_alter()
1 string reference to 'uc_discounts_uc_checkout_pane_cart'
- uc_discounts_uc_checkout_pane_alter in uc_discounts/
uc_discounts.module - Implements hook_uc_checkout_pane_alter().
File
- uc_discounts/
uc_discounts.module, line 722
Code
function uc_discounts_uc_checkout_pane_cart($op, $order, $form = NULL, &$form_state = NULL) {
switch ($op) {
case 'view':
$contents['cart_review_table'] = array(
'#theme' => 'uc_discounts_uc_cart_review_table',
'#items' => $order->products,
'#discount' => uc_discounts_get_discount_amount_for_order($order),
'#weight' => variable_get('uc_pane_cart_field_cart_weight', 2),
);
return array(
'contents' => $contents,
'next-button' => FALSE,
);
case 'review':
$discount = uc_discounts_get_discount_amount_for_order($order);
$review[] = theme('uc_discounts_uc_cart_review_table', array(
'items' => $order->products,
'show_subtotal' => FALSE,
'discount' => $discount,
));
return $review;
}
}