By default, Magento comes with product attribute functionality for the different product types.
While you creating product attributes from the Magento admin panel, Stores -> Attributes -> Product
You have to create a new attribute as per your product requirement and while you go to the Storefront Properties tab from the attribute page, you will able to see two different fields for the attribute called,
- Visible on Catalog Pages on Storefront
- Used in Product Listing.
It will be confused with a difference between two fields in the product attribute.
We will take an example of a product attribute called Material and their attribute code is the same (material).
I will give you a clear idea of the field in which case you have to keep the value Yes/No for the given field.
Let’s start with the attribute called,
Visible on Catalog Pages on Storefront Field used to show value in the frontend product detail page.
If the Value will be Yes from the attribute level, the Current Attribute will be displayed on the product detail page More Information Tabs. if you want to show details of the attribute on the product detail page you have to keep Yes from the dropdown field.
If the Value will be No, It will be not displayed in the product detail page tabs section.
Used in Product Listing:
This field is used to load a collection of products in category pages with the current attribute value as loaded.
You can load the product attribute value using $product->getMaterial() on the listing page.