Magento Forum

   
Display minimal price of grouped product in the product view -> the displayed price is wrong
 
Subsurf
Member
 
Total Posts:  58
Joined:  2011-05-09
 

Hi all,

I want to display the minimal price of a grouped product not only in the product list, but also in the product view above the table of grouped products.

I looked over the code of list.phtml to see which function is used to display the minimal price and then added the following to template/catalog/product/view.phtml:

<?php if($_product->isGrouped()) echo $this->getPriceHtml($_producttrue); ?>

Weird thing is that the displayed price differs from the price in the product list even though it’s the same function in both cases. I then var_dump’ed the $_product object in view.phtml and list.phtml to compare them and found out that the minimal_price attribute is wrong in view.phtml. I assume I need to load or calculate the product’s minimal price before I can display it, what is done automatically in list.phtml but not in view.phtml. So how do I load the minimal price?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top