Jump to content

Remplacer les menus deroulants dans la fiche Produit


CENIN
 Share

Recommended Posts

Bonjour a tous,

 

 

Je cherche desesperement a remplacer les menus deroulants qui gere les attributs de mes declinaisons dans ma fiche produit

 

par des palettes couleurs comme celle que propose PrestaShop mais que pour un seul attribut alors que moi j en ai 3

 

Pour info : PrestaShop genere un doublon car la palette est generee egalement en menu deroulant

Share this post


Link to post
Share on other sites

Bonjour,

 

j ai un peu avancé mais pas progressé :rolleyes: :rolleyes: :rolleyes: :rolleyes:

 

pour mon probleme j essaye de fusionner, mixer cette boucle

<div id="color_picker">
  <p>{l s='Pick a color:' js=1}</p>
  <div class="clear"></div>
  <ul id="color_to_pick_list">
  {foreach from=$colors key='id_attribute' item='color'}
<li><a id="color_{$id_attribute|intval}" class="color_pick" style="background: {$color.value};" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li>
  {/foreach}
  </ul>
  <div class="clear"></div>
 </div>

 

avec cette boucle

 

<!-- attributes -->
  <div id="attributes">
  {foreach from=$groups key=id_attribute_group item=group}
  {if $group.attributes|@count}
  <p>
<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>
{assign var="groupName" value="group_$id_attribute_group"}
<select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{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}

 

mais sans aucun succes pour l instant ...

Merci d avance de votre aide

Edited by CENIN (see edit history)

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More