You can also make a node-product.tpl.php file, if so this is the way to get prices:
<?php
$context = array(
'type' => 'product',
'revision' => 'altered', // using altered to get the bare price with no themeing
'field' => 'sell_price',
'subject' => array('node' => $node)
);
$dp = uc_price($node->sell_price, $context);
$context['field'] = 'list_price';
$lp = uc_price($node->list_price, $context);
?>
<div class="price clear-block <?php if($dp != $lp) print 'discounted'; ?>">
<?php print 'From: ' . $node->content['display_price']['#value']; ?>
<?php //print $node->content['list_price']['#value']; ?>
</div>
This became a bit more than it should be:
Use:
content['display_price']['#value']; ?>
Unless you want to theme discounted pricing :-)
Just copied out from one of my projects.
Last: you can probably use theme_uc_product_price:
you add a function in template.php (Pasting in default implementation from uc_product.module
function zen_uc_product_price($price, $context, $options = array()) {
$output = '<div class="product-info '. implode(' ', (array)$context['class']) .'">';
$output .= uc_price($price, $context, $options);
$output .= '</div>';
return $output;
}
Inspect the $context variable for when to add the "From" part.