=== modified file 'uc_cart/uc_cart.module' --- uc_cart/uc_cart.module 2009-04-01 16:39:58 +0000 +++ uc_cart/uc_cart.module 2009-04-09 18:15:32 +0000 @@ -857,6 +857,11 @@ '#tree' => TRUE, ); + $context = array( + 'location' => 'cart', + 'subject' => array(), + ); + $i = 0; foreach ($items as $item) { $display_item = module_invoke($item->module, 'cart_display', $item); @@ -870,14 +875,18 @@ $form['items'][$i]['title']['#type'] = 'value'; $form['items'][$i]['description']['#type'] = 'value'; + $price_info = array('value' => $item->price, 'qty' => $item->qty); + $context['subject']['cart_item'] = $item; + $context['subject']['node'] = node_load($display_item['nid']['#value']); + if (empty($display_item['qty'])) { $form['items'][$i]['qty'] = array( '#value' => '', ); } + $form['items'][$i]['total'] = array( - '#value' => $display_item['#total'], - '#theme' => 'uc_cart_view_price', + '#value' => uc_price($price_info, $context), ); $i++; } === modified file 'uc_product/uc_product.css' --- uc_product/uc_product.css 2009-01-07 15:08:16 +0000 +++ uc_product/uc_product.css 2009-04-09 16:55:50 +0000 @@ -9,6 +9,17 @@ margin-left: 4px; } +.uc-price-display { + float: right; + clear: right; + width: 100px; + text-align: center; + font-size: 1.3em; + font-weight: bold; + padding-bottom: 4px; + padding-left: 4px; +} + .display-price { float: right; clear: right; === modified file 'uc_product/uc_product.module' --- uc_product/uc_product.module 2009-04-07 18:50:58 +0000 +++ uc_product/uc_product.module 2009-04-09 17:35:54 +0000 @@ -695,27 +695,44 @@ 'add_to_cart' => 10, )); + $context = array( + 'location' => 'product-view', + 'class' => array( + 'product', + ), + 'subject' => array( + 'node' => $node, + ), + ); + if (module_exists('imagecache') && ($field = variable_get('uc_image_'. $node->type, '')) && isset($node->$field) && file_exists($node->{$field}[0]['filepath'])) { $node->content['image'] = array('#value' => theme('uc_product_image', $node->$field, $teaser, $page), '#access' => $enabled['image'], '#weight' => $weight['image'], ); } - $node->content['display_price'] = array('#value' => theme('uc_product_price', $node->sell_price, 'display-price', TRUE), + + $context['class'][1] = 'display'; + $node->content['display_price'] = array('#value' => uc_price($node->sell_price, $context), '#access' => $enabled['display_price'], '#weight' => $weight['display_price'], ); + if (!$teaser) { $node->content['model'] = array('#value' => theme('uc_product_model', $node->model, $teaser, $page), '#access' => $enabled['model'], '#weight' => $weight['model'], ); $node->content['body']['#weight'] = 1; - $node->content['list_price'] = array('#value' => theme('uc_product_price', $node->list_price, 'list-price'), + + $context['class'][1] = 'list'; + $node->content['list_price'] = array('#value' => uc_price($node->list_price, $context), '#access' => $enabled['list_price'], '#weight' => $weight['list_price'], ); - $node->content['cost'] = array('#value' => theme('uc_product_price', $node->cost, 'cost'), + + $context['class'][1] = 'cost'; + $node->content['cost'] = array('#value' => uc_price($node->cost, $context), '#access' => $enabled['cost'] && user_access('administer products'), '#weight' => $weight['cost'], ); @@ -724,7 +741,8 @@ $node->content['#attributes'] = array('style' => 'display: inline'); } - $node->content['sell_price'] = array('#value' => theme('uc_product_price', $node->sell_price, 'sell-price', $teaser), + $context['class'][1] = 'sell'; + $node->content['sell_price'] = array('#value' => uc_price($node->sell_price, $context, array('label' => !$teaser)), '#access' => $enabled['sell_price'], '#weight' => $weight['sell_price'], );