I have a shop with many SKU's. I've recently added the manufacturer name attribute (e.g. Nike) to the catalog/product/list.phtml. As a result I now have duplication as the manufacturer shows before the product name, which also contains the manufacturer name (e.g. Nike Nike Shoes).
I wonder if anyone can advise of a PHP function where by I can trim the 'name' attribute by the 'manufacturer' attribute.
For example, if 'manufacturer' attribute = 'Nike' then remove 'Nike ' from 'name' attribute.
Here's the current code I have in list.phtml:
<?php echo $_product->getAttributeText('manufacturer'); echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>