title: Apply map for a group product where all simple products have map enabled
body: <p>we have an issue with Magento where a group product (in search, catalog, etc) is showing it's price as "Starting at: $XX.XX" when all of it's simple products have MAP enabled.</p>
  
  <p>We'd like the price to display something like "add to cart to view price"</p>
  
  <p>I've track this down to two possible places in the code.</p>
  
  <p>First in app/code/core/Mage/Catalog/Block/Product/Abstract.php</p>
  
  <pre><code>public function getPriceHtml($product, $displayMinimalPrice = false, $idSuffix = '')
  {
      $type_id = $product-&gt;getTypeId();
      if (Mage::helper('catalog')-&gt;canApplyMsrp($product)) {
          $realPriceHtml = $this-&gt;_preparePriceRenderer($type_id)
              -&gt;setProduct($product)
              -&gt;setDisplayMinimalPrice($displayMinimalPrice)
              -&gt;setIdSuffix($idSuffix)
              -&gt;toHtml();
          $product-&gt;setAddToCartUrl($this-&gt;getAddToCartUrl($product));
          $product-&gt;setRealPriceHtml($realPriceHtml);
          $type_id = $this-&gt;_mapRenderer;
      }
  
      return $this-&gt;_preparePriceRenderer($type_id)
          -&gt;setProduct($product)
          -&gt;setDisplayMinimalPrice($displayMinimalPrice)
          -&gt;setIdSuffix($idSuffix)
          -&gt;toHtml();
  }
  </code></pre>
  
  <p>If I figured out if I comment out the if statement or just set $temp_id to msrp before I return, it will work (but for all products)</p>
  
  <p>So I need to either add some code in the above function to check if all associated products have MAP enabled or change the function canApplyMsrp to check for that.</p>
  
  <p>app/code/core/Mage/Catalog/Helper/Data.php</p>
  
  <pre><code>public function canApplyMsrp($product, $visibility = null, $checkAssociatedItems = true)
  {
      if (!$this-&gt;isMsrpEnabled()) {
          return false;
      }
  
      if (is_numeric($product)) {
          $product = Mage::getModel('catalog/product')
              -&gt;setStoreId(Mage::app()-&gt;getStore()-&gt;getId())
              -&gt;load($product);
      }
  
      if (!$this-&gt;canApplyMsrpToProductType($product)) {
          return false;
      }
  
      $result = $product-&gt;getMsrpEnabled();
      if ($result == Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type_Enabled::MSRP_ENABLE_USE_CONFIG) {
          $result = $this-&gt;isMsrpApplyToAll();
      }
  
      if (!$product-&gt;hasMsrpEnabled() &amp;&amp; $this-&gt;isMsrpApplyToAll()) {
          $result = true;
      }
  
      if ($result &amp;&amp; $visibility !== null) {
          $productVisibility = $product-&gt;getMsrpDisplayActualPriceType();
          if ($productVisibility == Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type_Price::TYPE_USE_CONFIG) {
              $productVisibility = $this-&gt;getMsrpDisplayActualPriceType();
          }
          $result = ($productVisibility == $visibility);
      }
  
      if ($product-&gt;getTypeInstance(true)-&gt;isComposite($product)
          &amp;&amp; $checkAssociatedItems
          &amp;&amp; (!$result || $visibility !== null)
      ) {
          $resultInOptions = $product-&gt;getTypeInstance(true)-&gt;isMapEnabledInOptions($product, $visibility);
          if ($resultInOptions !== null) {
              $result = $resultInOptions;
          }
      }
  
      return $result;
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks.</p>