In Magento 2.1, I need to add manufacturer's logo in product detail page. Now, I added an attribute manufacturer
from the backend.
I did that by going to Stores -> Attribute set
then choosing Default. then there was two Unassigned Attributes, Color and Manufacturer. I dragged manufacturer into Product Details under Groups. Now I have a dropdown list at the backend's product catalog page (Product -> catalog -> edit/add the product ).
Now I need to implement when I choose a manufacturer from that dropdown, in that product's, product detail page manufacturer image should be displayed.
How do I accomplish that?
Best Answer
Create a module for this task.
Store all your Manufacturer images at path
Company/Module/view/frontend/web/images/
with the exact name of menufacturer.Then, you need to override template file for the product page and get Manufacturer Label in that template file:
Then, you can insert image like this: