File tree 1 file changed +7
-2
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ $_attributeLabel = $block->getAtLabel();
22
22
$ _attributeType = $ block ->getAtType ();
23
23
$ _attributeAddAttribute = $ block ->getAddAttribute ();
24
24
25
+ $ renderLabel = true ;
26
+ // if defined as 'none' in layout, do not render
27
+ if ($ _attributeLabel == 'none ' ) {
28
+ $ renderLabel = false ;
29
+ }
30
+
25
31
if ($ _attributeLabel && $ _attributeLabel == 'default ' ) {
26
32
$ _attributeLabel = $ _product ->getResource ()->getAttribute ($ _code )->getStoreLabel ();
27
33
}
@@ -31,10 +37,9 @@ if ($_attributeType && $_attributeType == 'text') {
31
37
$ _attributeValue = $ _helper ->productAttribute ($ _product , $ _product ->$ _call (), $ _code );
32
38
}
33
39
?>
34
-
35
40
<?php if ($ _attributeValue ): ?>
36
41
<div class="product attribute <?= /* @escapeNotVerified */ $ _className ?> ">
37
- <?php if ($ _attributeLabel != ' none ' ): ?> <strong class="type"><?= /* @escapeNotVerified */ $ _attributeLabel ?> </strong><?php endif ; ?>
42
+ <?php if ($ renderLabel ): ?> <strong class="type"><?= /* @escapeNotVerified */ $ _attributeLabel ?> </strong><?php endif ; ?>
38
43
<div class="value" <?= /* @escapeNotVerified */ $ _attributeAddAttribute ?> ><?= /* @escapeNotVerified */ $ _attributeValue ?> </div>
39
44
</div>
40
45
<?php endif ; ?>
You can’t perform that action at this time.
0 commit comments