How to load value of TEXT field of the module typed in admin to the frontend?

0

I have a custom module with a field: "Enter your custom message."
I want to load this field in a block on the product page where it says "In Stock". So far so good, I could simply modify the message from the app / design / frontend / rwd / default / template / catalog / product / view / type / availability / default.phtml file:

<p class="availability in-stock">
   <span class="label"><?php echo $this->helper('catalog')->__('Availability:') ?></span>
   <span class="value"><?php echo $this->helper('catalog')->__('In stock') ?></span>
</p>

Where I would change the field within '' , but what I want is that this change is done by my module, and for this I already have my default in the module folder inside of the template , the import via LAYOUT.xml :

<reference name="product.info.availability">
    <action method="setTemplate"><template>stockmessages/catalog/product/view/type/availability/default.phtml</template></action>
</reference>

echo $_product->getAttributeText('campo_criado_na_system.xml')  

But it does not work giving error in product.php of the core, I believe that the way to get the text value of the field in ADMIN to load in FRONTEND is otherwise, can someone help me? Thank you.

    
asked by anonymous 18.02.2015 / 07:37

1 answer

0

The answer was simple, here it is, I managed to correct my doubt.

Mage::getStoreConfig('primeiraopçaonosystemXML/segunda/terceira....')

This causes you to get the result of the value of your pre-determined field in the settings of your module and display in .Phtml

    
19.02.2015 / 05:56