Question

I created an text field attribute and allowed HTML on frontend and also tried enabling WYSIWYG.

I load the attribute on productpage with this line:

<?php if($_product->getData('standaard_meegeleverd')) : ?>
<h2 class="productbox-titles-reviews">Standaard meegeleverd</h2>
<div><?php echo $this->htmlEscape($_product->getData('standaard_meegeleverd')); ?></div>
<?php endif; ?>

But on frontend the data is loaded without HTML. I see text on the product page like this:

<p>AC-adapter</p> <p>4 cell Li-ion-accu</p>

How can I fix this?

Was it helpful?

Solution

Did you try removing the htmlEscape

So:

 <div><?php echo $_product->getData('standaard_meegeleverd'); ?></div>

OTHER TIPS

Its Working for me. please try this.

<?php $_product = $this->getProduct();?>
<?php echo $_product->getData('system_requirement'); ?>

here system_requirement is attribute code. please replace with your attribute code.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top