1

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?

2 Answers 2

5

Did you try removing the htmlEscape

So:

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.