0

The following text-area attribute has been configured (see screenshots)

enter image description here

enter image description here

The attribute has been included in an attribute set, and on the respective product a custom text has been added.

On the product view template, I have added the following test-code:

<div class="test">
<?php 
if ($_helper->productAttribute($_product, $_product->getSpecialShippingnInformation(), 'special_shipping_information')) {
    echo $_helper->productAttribute($_product, $_product->getSpecialShippingnInformation(), 'special_shipping_information');
}
?>
</div>

Unfortunately the text stored in the text-area attribute is not being shown. Is there anything else I should take into account/something I'm missing?

Thakns for your collaborations.

0
1

You have typo in your code, it should be:

You have an extra n

<div class="test">
<?php 
if ($_helper->productAttribute($_product, $_product->getSpecialShippingInformation(), 'special_shipping_information')) {
    echo $_helper->productAttribute($_product, $_product->getSpecialShippingInformation(), 'special_shipping_information');
}
?>
</div>

it should be: $_product->getSpecialShippingInformation() not $_product->getSpecialShippingnInformation().

3
  • Hi Pawan. Thanks for this. Is the rest of the code neat enough? – Julian Murillo Jun 5 '19 at 20:11
  • Hello @JulianMurillo, code and attribute settings are fine. I tried it and found working! – Pawan Jun 6 '19 at 2:55
  • Hello @JulianMurillo, did it worked for you ? – Pawan Jun 12 '19 at 3:35
1

You have "No" for the "Visible on Product View Page On Frontend" value. You should set "Yes".

If it still doesn't work, look if you have the flat catalog product feature enabled. If it is enabled, you should try to set the value of your attribute "Used in product list" to "yes" and reindex.

1
  • Hi Julien; thanks for your contribution; what do you think about the test-code? is that neat enough? – Julian Murillo Jun 5 '19 at 18:20
0

In Magento 1.9.2.2 or greater version, there is a security feature added where you have to explicitly set what blocks are allowed to render in WYSIWYG areas.

To use your block in WYSIWYG areas, you need to add it to the Magento permissions.

  1. Go to System > Permissions > Blocks
  2. Click Add New Block
  3. Set Block Name = core/template and Is Allowed = Yes and click save.
  4. Clear & flush all Magento caches under System > Cache Management

That's it!! you can check your block on Front end.

1
  • That's already configured; but what does that have to do with my question? – Julian Murillo Jun 5 '19 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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