0

I would like to insert brand name above product name in product page in a Magento 2.2.1. I managed to do it with regards to product list. I modified file list.phtml in app/design/frontend/../../Magento_Catalog/templates/product.

However, I don't know how to display it on product page. Can you help me? Thank you in advance

2
  • is it Attribute (brand) ? Commented Jan 19, 2018 at 15:19
  • Yes, manufacture
    – juanmi22
    Commented Jan 19, 2018 at 16:03

1 Answer 1

0

Use this piece of code in list.phtml. You can display Brand anywhere in Product detail page.

  $_attributeValues = $block->getProduct()->getResource()
                              ->getAttribute('brand')->getFrontend()
                              ->getValue($block->getProduct());

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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