Jump to content

Label drop-down attributes


thisisjp

Recommended Posts

Hi,

 

Currently I have three drop-down menus that display the attributes I have created in the backoffice (see attachment)post-1348753-0-10325500-1483623848_thumb.png

 

I would like to label these drop-down menus individually like thispost-1348753-0-98785100-1483624723_thumb.png, however I am struggeling to do so. Hopefully someone on here could help me out. My guess is that this needs to be done in the product.tpl file. 

 

Oh and is there any way to delete the search function from the drop-down menu (see attachment #2)?post-1348753-0-52399200-1483623855_thumb.png

 

My guess it has to be added/changed somewhere along these lines (this is from the product.tpl file)

-----------------------------------

 

    <!-- attributes -->
    <div id="attributes"> 
    <div class="clearfix"></div>
    {foreach from=$groups key=id_attribute_group item=group}
    {if isset($group.attributes) && $group.attributes|@count}  
    <fieldset class="attribute_fieldset item-select">
    <p class="hidden" {if $group.group_type != 'color' && $group.group_type != 'radio'}for="group_{$id_attribute_group|intval}"{/if}>*{$group.name|escape:'html':'UTF-8'} </p>
    {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="form-control attribute_select no-print">
    {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:'html':'UTF-8'}">{$group_attribute|escape:'html':'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}
    {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
    <li{if $group.default == $id_attribute} class="selected"{/if}>
    <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">
    {if $img_color_exists}
    <img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" />
    {/if}
    </a>
    </li>
    {if ($group.default == $id_attribute)}
    {$default_colorpicker = $id_attribute}
    {/if}
    {/foreach}
    </ul>
    <input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}" />
    {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|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} />
    <span>{$group_attribute|escape:'html':'UTF-8'}</span>
    </li>
    {/foreach}
    </ul>
    {/if}
    </div> <!-- end attribute_list -->
    </fieldset>  
    {/if}
    {/foreach}
    </div> <!-- end attributes -->

 

--------------------

 

Thanks in advance,

JP

Edited by thisisjp (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...