Reputation: 15
I have read through the tier pricing but that is not what I am looking for. Currently Magento displays the lowest priced item in a group but our products in one group can range from $3,000 to $5.00. I would like to switch it so that the highest priced item in the group displays as opposed to the lowest price. Any help is greatly appreciated.
Thanks
Upvotes: 0
Views: 1210
Reputation: 701
Try this:
$groupedPrice = Mage::getModel('catalog/product_grouped_price');
echo $groupedPrice->getMaxPrice($_product->getId());
This is if you use grouped products on your site.
Upvotes: 1
Reputation: 83
You can try something like this
$selectionCollection = $product->getTypeInstance ( true )->getSelectionsCollection ( $product->getTypeInstance ( true )->getOptionsIds ( $product ), $product );
$grouped_items = array ();
foreach ( $selectionCollection as $option ) {
$grouped_items [] = $item;
}
foreach ( $grouped_items as $item) {
$arrayPrice [] = $item->getPrice;
}
maxPrice = max($arrayPrice);
Upvotes: 0