Hi guys,
I've used Garci de Maria code... and it awesome...
For now...i need to know how can I put a trim for the results.
E.g. Custom valeu is (11) Região de São Paulo, I need to show only number 11.
TKS.
Fernando
See the code:
<?php
$cf_extra_description = Field::newInstance()->findBySlug('cf_extra_description');
$dao = new DAO();
$dao->dao->select('*');
$dao->dao->from(DB_TABLE_PREFIX.'t_item_meta');
$dao->dao->where('fk_i_field_id', $cf_extra_description['pk_i_id'] );
$dao->dao->where('fk_i_item_id', osc_item_id() );
$result = $dao->dao->get();
if( $result == false ) {
return array();
}
$custom_data = $result->result();
$cf_extra_description['s_value'] = $custom_data[0]['s_value'];
View::newInstance()->_exportVariableToView('metafields', array($cf_extra_description));
?>
<p>
<strong><?php echo osc_item_meta_name(); ?>:</strong> <?php echo osc_item_meta_value(); ?>
</p>