--- uc_discounts.module 2008-10-21 21:34:43.000000000 +0200 +++ uc_discounts.module.new 2008-10-22 00:05:59.000000000 +0200 @@ -189,9 +189,12 @@ function uc_discounts_menu($may_cache) { function uc_discounts_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { if (variable_get('uc_discounts_product_discount_price', 0) && $op=='view' && in_array($node->type, array_keys(uc_product_node_info()))) { - $product = node_load(array('nid' => $node->nid)); - $discount_price = uc_discounts_product_discount_price($product); + $discount_price = uc_discounts_product_discount_price($node); $node->content['display_price']['#value'] = '
'. uc_currency_format($discount_price) .'
'; - if (variable_get('uc_discounts_product_full_price', 0) && $discount_price != $product->sell_price) { - $node->content['sell_price']['#value'] = '
'. uc_currency_format($discount_price) .' (discounted from '. uc_currency_format($product->sell_price) .')
'; + if ($discount_price != $node->sell_price) { + $node->content['sell_price']['#value'] = '
' . + t('@discountPrice (discounted from @price)', + array('@discountPrice' => uc_currency_format($discount_price), + '@price' => uc_currency_format($node->sell_price))) + . '
'; } else {