Jump to content

color_to_pick_list and drop_down of attribute


Recommended Posts

Hi,

 

 

version 1.5.4.1, on the product page there isn't color_picker the attributes + attributes the drop-down list.

 

I modified the product.tpl file to put the product sheet as before. but the link between the two Elements not work.

 

Have you ever fixed this problem? just be an idea?

 

thank you very much for your help.

 

I am French. Please excuse me for my English I

 

Micke

 

My code in product.tpl :

 

<div class="product_attributes">

{if isset($groups)}

<!-- attributes -->

<div id="attributes">

{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();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">

{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 $colors|@count > 0}$('#wrapResetImages').show('slow');{/if}">

{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')}

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<input type="radio" class="attribute_radio" name="{$groupName}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} onclick="findCombination();getProductAttribute();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if}">

{$group_attribute|escape:'htmlall':'UTF-8'}<br/>

{/foreach}

{/if}

</div>

</fieldset>

{/if}

{/foreach}

</div>

{/if}

 

 

{if ($group.group_type == 'color')}

<label class="attribute_label_liste" for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>

<select name="{$groupName}" id="liste_group_{$id_attribute_group|intval}" class="attribute_select_liste" 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>

{/if}

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...