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

Multiselect change from comma
 
xcandyman
Jr. Member
 
Total Posts:  2
Joined:  2008-07-17
 

Hi,

Currently multiselect attributes are seperated by a comma when displayed on the frontend is this possible to be changed and where can it be changed?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
PantherMedia
Member
 
Total Posts:  52
Joined:  2010-01-28
 

ok this isnt the best hack, I tried to implement an if statement but couldnt get it to work. so if you have commas in any attribute value, it will make a line break out of it. this is the attributes.phtml file

<?php if($_additional $this->getAdditionalData()): ?>
<table class="data-table" id="product-attribute-specs-table">
    <
col width="30%" />
    <
col width="70%" />
    
<?php foreach ($_additional as $_data): ?>
    
<tr>
        <
th class="label"><?php echo $this->__($_data['label']?></th>
        <
td class="data">        
<?php
        $_comma 
",";
        
$_list "<br>";
        echo 
str_replace($_comma,$_list,$_helper->productAttribute($_product$_data['value']$_data['code']))    ?> 

        
</td>
    </
tr>
    
<?php endforeach; ?>
</table>
<
script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
<?php 
endif;?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
PantherMedia
Member
 
Total Posts:  52
Joined:  2010-01-28
 

ok this isnt the best hack, I tried to implement an if statement but couldnt get it to work. so if you have commas in any attribute value, it will make a line break out of it. this is the attributes.phtml file

<?php if($_additional $this->getAdditionalData()): ?>
<table class="data-table" id="product-attribute-specs-table">
    <
col width="30%" />
    <
col width="70%" />
    
<?php foreach ($_additional as $_data): ?>
    
<tr>
        <
th class="label"><?php echo $this->__($_data['label']?></th>
        <
td class="data">        
<?php
        $_comma 
",";
        
$_list "<br>";
        echo 
str_replace($_comma,$_list,$_helper->productAttribute($_product$_data['value']$_data['code']))    ?> 

        
</td>
    </
tr>
    
<?php endforeach; ?>
</table>
<
script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
<?php 
endif;?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
PantherMedia
Member
 
Total Posts:  52
Joined:  2010-01-28
 

ok this isnt the best hack, I tried to implement an if statement but couldnt get it to work. so if you have commas in any attribute value, it will make a line break out of it. this is the attributes.phtml file

<?php if($_additional $this->getAdditionalData()): ?>
<table class="data-table" id="product-attribute-specs-table">
    <
col width="30%" />
    <
col width="70%" />
    
<?php foreach ($_additional as $_data): ?>
    
<tr>
        <
th class="label"><?php echo $this->__($_data['label']?></th>
        <
td class="data">        
<?php
        $_comma 
",";
        
$_list "<br>";
        echo 
str_replace($_comma,$_list,$_helper->productAttribute($_product$_data['value']$_data['code']))    ?> 

        
</td>
    </
tr>
    
<?php endforeach; ?>
</table>
<
script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
<?php 
endif;?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
PantherMedia
Member
 
Total Posts:  52
Joined:  2010-01-28
 

ok this isnt the best hack, I tried to implement an if statement but couldnt get it to work. so if you have commas in any attribute value, it will make a line break out of it. this is the attributes.phtml file

<?php if($_additional $this->getAdditionalData()): ?>
<table class="data-table" id="product-attribute-specs-table">
    <
col width="30%" />
    <
col width="70%" />
    
<?php foreach ($_additional as $_data): ?>
    
<tr>
        <
th class="label"><?php echo $this->__($_data['label']?></th>
        <
td class="data">        
<?php
        $_comma 
",";
        
$_list "<br>";
        echo 
str_replace($_comma,$_list,$_helper->productAttribute($_product$_data['value']$_data['code']))    ?> 

        
</td>
    </
tr>
    
<?php endforeach; ?>
</table>
<
script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
<?php 
endif;?>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top