Skip to content

Commit b8f66c7

Browse files
ENGCOM-6282: M2C-21765 Output N/A if attribute has no value in Compare List #25585
2 parents 14188dc + 26e8446 commit b8f66c7

File tree

1 file changed

+2
-0
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/compare

1 file changed

+2
-0
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
default :?>
131131
<?php if (is_string($block->getProductAttributeValue($item, $attribute))) :?>
132132
<?= /* @noEscape */ $helper->productAttribute($item, $block->getProductAttributeValue($item, $attribute), $attribute->getAttributeCode()) ?>
133+
<?php else : ?>
134+
<?= $block->escapeHtml($helper->productAttribute($item, $block->getProductAttributeValue($item, $attribute), $attribute->getAttributeCode())) ?>
133135
<?php endif; ?>
134136
<?php break;
135137
} ?>

0 commit comments

Comments
 (0)