Question

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.

Was it helpful?

Solution

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().

OTHER TIPS

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.

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.

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