For the title of an article, I am using HTML-code. Unfortunately, the HTML-code in the cart is not written as formatted in HTML – it is written with the HTML-tags, like:
"This is a title.<br>Yeah, really!"
The item is rendered with the following command in "details.html"
data-bind="html: full_view"
I would like to show it like this:
This is an title.
Yeah, really!
The template comes from here:
vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
and looks like this:
<dl class="item-options">
<?php foreach ($_options as $_option) : ?>
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<dt><?php echo $block->escapeHtml($_option['label']) ?></dt>
<dd>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<?php /* @escapeNotVerified */ echo $_formatedOptionValue['full_view'] ?>
<?php else: ?>
<?php /* @escapeNotVerified */ echo $_formatedOptionValue['value'] ?>
<?php endif; ?>
</dd>
<?php endforeach; ?>
</dl>
Does anybody know how to achieve this? Many thanks!
The problem seems to be "echo $_formatedOptionValue['full_view']" – but I do not understand where this value comes from. I really appreciate any hint!