eCommerce - H1 for product name on actual page, not search results?

Permalink
Ok, so I can change the core_commerce display.php file to add an h1 tag to the product name which displays nicely on a product page. Unfortunately this also adds an h1 tag to all search results, really breaking it. How can I have the h1 just on the product page?

Code below

<div>
      <?php   if ($displayNameP) { ?>
         <h1 class="commercehead"><strong><?php  echo $link_before.$product->getProductName().$link_after?></strong> 
      <?php   } ?>
      <?php   if ($displayNameP && $displayPriceP) { ?>
      - 
      <?php   } ?>
      <?php   if ($displayPriceP) { ?>
         <?php  echo Loader::packageElement('product/price', 'core_commerce', array('product' => $product, 'displayDiscount' => $displayDiscountP)); ?>
      <?php   } ?></h1>
      </div>


Thanks!

RandomBrad
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.