Displaying Price Ranges on Views Let's say I have 3 products in a product display that cost $5.00, $3.00, $7.00.

Right now in Commerce Kickstart 2, the view displays the first product's price which happens to be $5.00.

I would like the View to display the price range, $3.00 - $7.00, but only if there is a variance in prices (if all the products are $3.00 - just display $3.00).
I've done it using Display Suite code field like that:

&lt;?php
$max['amount'] = 0;
$min['amount'] = 0;
$products = field_get_items('node', $entity, 'field_products');
foreach($products as $product) {
  $product = commerce_product_load($product['product_id']);
  $commerce_price = array_shift(field_get_items('commerce_product', $product, 'commerce_price'));
  if($commerce_price['amount'] &gt; $max['amount']) {
    $max = $commerce_price;
  }
  if($commerce_price['amount'] &lt; $min['amount'] || $min['amount'] == 0) {
    $min = $commerce_price;
  }
}
return $min['amount'] &lt; $max['amount'] ? commerce_currency_format($min['amount'], $min['currency_code']) . ' - ' . commerce_currency_format($max['amount'], $max['currency_code']) : commerce_currency_format($min['amount'], $min['currency_code']);
?&gt;