Skip to main content
Tweeted twitter.com/StackMagento/status/909911617890062337
Improving the question
Source Link
Rafael Corrêa Gomes
  • 13.7k
  • 14
  • 91
  • 181

Magento 2: DisplayHow to display custom attribute in catalog?

I’ve created a new textfield attribute, with the following settings set to yes:

Visible on Catalog Pages on Storefront
Used in Product Listing

The attribute is assigned to an attribute set and it shows up in the product view as intended.

However it’s not visible in the catalog view, I’m using the default Luma themedefault Luma theme and I’ve cleared cache and re-indexed. If I view the template file magento-catalog/view/frontend/templates/product/list.phtml:

magento-catalog/view/frontend/templates/product/list.phtml

I can’t find any code getting custom attributes, so the Luma theme doesn’t seem to support this by default.

How can I get a products custom attribute label and value in list.phtmllist.phtml?

Magento 2: Display custom attribute in catalog

I’ve created a new textfield attribute, with the following settings set to yes:

Visible on Catalog Pages on Storefront
Used in Product Listing

The attribute is assigned to an attribute set and it shows up in the product view as intended.

However it’s not visible in the catalog view, I’m using the default Luma theme and I’ve cleared cache and re-indexed. If I view the template file magento-catalog/view/frontend/templates/product/list.phtml I can’t find any code getting custom attributes, so the Luma theme doesn’t seem to support this by default.

How can I get a products custom attribute label and value in list.phtml?

Magento 2: How to display custom attribute in catalog?

I’ve created a new textfield attribute, with the following settings set to yes:

Visible on Catalog Pages on Storefront
Used in Product Listing

The attribute is assigned to an attribute set and it shows up in the product view as intended.

However it’s not visible in the catalog view, I’m using the default Luma theme and I’ve cleared cache and re-indexed. If I view the template file:

magento-catalog/view/frontend/templates/product/list.phtml

I can’t find any code getting custom attributes, so the Luma theme doesn’t seem to support this by default.

How can I get a products custom attribute label and value in list.phtml?

Source Link
oscarpas
  • 920
  • 1
  • 5
  • 12

Magento 2: Display custom attribute in catalog

I’ve created a new textfield attribute, with the following settings set to yes:

Visible on Catalog Pages on Storefront
Used in Product Listing

The attribute is assigned to an attribute set and it shows up in the product view as intended.

However it’s not visible in the catalog view, I’m using the default Luma theme and I’ve cleared cache and re-indexed. If I view the template file magento-catalog/view/frontend/templates/product/list.phtml I can’t find any code getting custom attributes, so the Luma theme doesn’t seem to support this by default.

How can I get a products custom attribute label and value in list.phtml?