Skip to content

Commit 26e8446

Browse files
ENGCOM-6282: M2C-21765 Output N/A if attribute has no value in Compare List #25585
- Merge Pull Request #25585 from ptylek/magento2:fix-issue_compare_page-M2C-21765 - Merged commits: 1. 9ea1d3f 2. 1f010f1
2 parents 3397b2b + 1f010f1 commit 26e8446

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)