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.