0

How to show "size" attribute value on category page?

1

Please change attribute setting in below location.

Magento Admin > Store > Attributes > Product > Size > Store Front Properties Tab > Used in Product Listing > Yes

  • I have it turned on. – Ruslan Nov 9 '17 at 16:12
0

add list.phtml file at your custom theme

app/design/frontend/Vendor/Theme/Magento_Catalog/templates/product/list.phtml

add below code to above template

$attribute = $_product->getResource()->getAttribute('attribute_code');
$attributeValue = $attribute->getFrontend()->getValue($_product);

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.