Jump to content

Selector de colores: no aparecen los colores


Recommended Posts

Hola a todos!

 

pues eso .. así de claro .. no consigo que aparezcan los colores en los atributos del producto ... solo aparecen en desplegable. He cambiado la configuración del atributo "Color" para que no aparezca como despleglabe, pero no funciona.

 

a alguien le ha pasado los mismo?

 

PS 1.5.3.0

www.decoyarte.com

 

Gracias

Link to comment
Share on other sites

  • 2 weeks later...

Hola!
 
ha cambiado el product.tpl archivo

en este archivo es necesario cambiar el código para

 

<div id="attributes">
                <div class="clear"></div>
                {foreach from=$groups key=id_attribute_group item=group}
                    {if $group.attributes|@count}
                        <fieldset class="attribute_fieldset">
                            <label class="attribute_label" for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} : </label>
                            {assign var="groupName" value="group_$id_attribute_group"}
                            <div class="attribute_list">
                            {if ($group.group_type == 'select')}
                                <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="attribute_select" onchange="findCombination();getProductAttribute();">
                                    {foreach from=$group.attributes key=id_attribute item=group_attribute}
                                        <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option>
                                    {/foreach}
                                </select>
                            {elseif ($group.group_type == 'color')}
                                <ul id="color_to_pick_list" class="clearfix">
                                    {assign var="default_colorpicker" value=""}
                                    {foreach from=$group.attributes key=id_attribute item=group_attribute}
                                    <li{if $group.default == $id_attribute} class="selected"{/if}>
                                        <a id="color_{$id_attribute|intval}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}" style="background: {$colors.$id_attribute.value};" title="{$colors.$id_attribute.name}" onclick="colorPickerClick(this);getProductAttribute();">
                                            {if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
                                                <img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$colors.$id_attribute.name}" width="20" height="20" /><br />
                                            {/if}
                                        </a>
                                    </li>
                                    {if ($group.default == $id_attribute)}
                                        {$default_colorpicker = $id_attribute}
                                    {/if}
                                    {/foreach}
                                </ul>
                                <input type="hidden" class="color_pick_hidden" name="{$groupName}" value="{$default_colorpicker}" />
                            {elseif ($group.group_type == 'radio')}
                                <ul>
                                    {foreach from=$group.attributes key=id_attribute item=group_attribute}
                                        <li>
                                            <input type="radio" class="attribute_radio" name="{$groupName}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} onclick="findCombination();getProductAttribute();" />
                                            <span>{$group_attribute|escape:'htmlall':'UTF-8'}</span>
                                        </li>
                                    {/foreach}
                                </ul>
                            {/if}
                            </div>
                        </fieldset>
                    {/if}
                {/foreach}
                </div>

 

 

Bueno, un poco de edición posterior - css

Link to comment
Share on other sites

Hola

 

sí, product.tpl

 

 

 

agregar código css - en el archivo product.css

 

#attributes .attribute_list ul{

list-style:none
}
 
#attributes .attribute_list ul li{
clear:both
}
 
#attributes .attribute_list input.attribute_radio{float: left;margin-left: 3px;}
#attributes .attribute_list span{float: left;margin-bottom: 5px;margin-left: 3px;}
 
.ie7 #attributes .attribute_list span{margin-top:1px}
 
#attributes .attribute_list #color_to_pick_list {
list-style-type:none;
width:125px;
}
 
#attributes .attribute_list #color_to_pick_list li {
float:left;
margin:0 8px 8px 0;
padding:1px;
border:1px solid #ccc;
clear:none
}
 
#attributes .attribute_list #color_to_pick_list li.selected {
border:1px solid #000;
}
 
#attributes .attribute_list #color_to_pick_list a.color_pick {
display:block;
height:20px;
width:20px;
}
Link to comment
Share on other sites

  • 2 weeks later...
  • nadie locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...