i have an attribute named manufacturer which contains my products brands. Like: Apple Co and my brands images are stored in: media/wysiwyg/queldorei/shopper/brands. With names like: apple_co Now i want to show my brands images in the product pages. and i want theme to be clickable. and head me to a page with all of those brands products.

i will be thankful if you experts help me


You'll need to update template files to show the manufacturer(s) logo.

Open template/catalog/product/view.phtml


<?php $_product = $this->getProduct();
 $manufacturerName = $_product->getAttributeText('manufacturer');
 $manufacturerId = $_product->getManufacturer();
 echo '<a href="/catalogsearch/advanced/result/?manufacturer[]='.$manufacturerId.'">' ?>
 <img src="../media/catalog/brands/<?php echo str_replace(' ', '_',$manufacturerName); ?>.png" alt="<?php echo $manufacturerName; ?>" /></a>

Manufacturer images in this example are relative to /media/catalog/brands/

  • it gets the brand to the product page but when i click on it shows this error: The requested URL /catalogsearch/advanced/result/ was not found on this server. – Moh3n Feb 17 '15 at 16:38
  • Excellent! Then your initial question is answered. Please accept this answer for posterity. You're /catalogsearch/advanced/result/ doesn't exist, so you're getting that error. Simply change the href in the link to point to a more suitable location (Your manufacturers page). – DomainSoil Feb 18 '15 at 0:47

add bottom code in this file: template/catalog/product/view.phtml

<?php $_product = $this->getProduct(); $manufacturerName = $_product->getAttributeText('manufacturer'); $manufacturerId = $_product->getManufacturer(); echo '<a href="/catalogsearch/result/?manufacturer='.$manufacturerId.'&q='.$manufacturerName.'">' ?> <img src="../media/wysiwyg/queldorei/shopper/brands/<?php echo str_replace(' ', '_',$manufacturerName); ?>.png" alt="<?php echo $manufacturerName; ?>" title="<?php echo $this->__('to see more from') ?>&nbsp;<?php echo $manufacturerName; ?>&nbsp;<?php echo $this->__('click here') ?>" /></a>

brand logo images are stored in : /media/wysiwyg/queldorei/shopper/brands/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.