Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Attribute read function
 
Hadifarnoud
Sr. Member
 
Total Posts:  210
Joined:  2007-10-07
Guildford, Surrey, UK
 

where can i find attribute read function? i want to displaye Yes/No attribute with diffrent style (maybe with a red/green symbol)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hadifarnoud
Sr. Member
 
Total Posts:  210
Joined:  2007-10-07
Guildford, Surrey, UK
 

let me explain, when i add product which has a Yes/No attribute
ex: nokia N95
bluetooth: YES
(bluetooth is a YES/NO attribute here)
i want to show a green dot instead of Yes.
sorry for my bad english,i can’t explain better

 
Magento Community Magento Community
Magento Community
Magento Community
 
mzentrale1
Guru
 
Total Posts:  731
Joined:  2007-12-06
Stuttgart, Germany
 

Hi,

iam not well in magento, but you could add some code to the view where to
manage that. Go to folder app/design/frontend/default/default/template/catalog/product and
open list.php. At line168 theres the code you can change.

<?if($_additional $this->getAdditionalData()):?>
        
<div class="collateral-box attribute-specs">
            <
div class="head">
                <
h4><?=$this->__('Additional Information')?></h4>
            </
div>
            <
table cellspacing="0" class="data-table" id="product-attribute-specs-table">
            
<?foreach ($_additional as $_data):?>
            
<tr>
                <
td class="label"><?=$_data['label']?></td>
                <
td class="data"><?=$_data['value']?></td>
            </
tr>
            
<?endforeach;?>
            
</table>
            <
script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
        
</div>
        
<?endif;?>

$_additional is the array with the datas, take a look at it and than manipulate
$_data[’value’] or other index for logic.

or you have to create a helper function witch does that logic and use it in that
template?!??!!

Hope you undertood me, coz my english grammer is ver funny and bad.

KR

Stefan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hadifarnoud
Sr. Member
 
Total Posts:  210
Joined:  2007-10-07
Guildford, Surrey, UK
 

oh thanks,
this is modified code:

<td class="label"><?=$_data['label']?></td>
<
td class="data"><?if($_data['value']=="1"):?><font style="font-size: 8pt;">√</font><?else:?> <?=$_data['value']?><?endif;?></td>
i think this is better
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top