0
I have a custom module with a field: "Enter your custom message".
I want to load this field into a block on the product page where it says "In Stock" (or In Stock, in Portuguese). 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 the ''
, but what I want is for this change to be made by my module, and for that I already have mine default in the module folder inside 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>
Fine, but I was researching ways to give load of that TEXT field in my frontend, and what I found was something like:
echo $_product->getAttributeText('campo_criado_na_system.xml')
However it does not work by giving error in product.php
of the core, I believe that the way to take the value of the text field in ADMIN to load in FRONTEND be otherwise, can anyone help me? Thank you.