Witam,

Domyślnie prestashop działa na tej zasadzie że generuje kombinacje produktu w trybie każdy z każdym.
Jednak jeżeli generujemy kombinacje oddzielnie to nie są one od siebie zależne, więc tutaj pojawia się moje pytanie jak zmodyfikować kod przedstawiony niżej, aby kombinacje wyświetlały się niezależnie od siebie?

  1. <div class="product-variants">
  2. {foreach from=$groups key=id_attribute_group item=group}
  3. <div class="clearfix product-variants-item">
  4. <span class="control-label">{$group.name}</span>
  5. {if $group.group_type == 'select'}
  6. id="group_{$id_attribute_group}"
  7. data-product-attribute="{$id_attribute_group}"
  8. name="group[{$id_attribute_group}]">
  9. {foreach from=$group.attributes key=id_attribute item=group_attribute}
  10. <option value="{$id_attribute}" title="{$group_attribute.name}"{if $group_attribute.selected} selected="selected"{/if}>{$group_attribute.name}</option>
  11. {/foreach}
  12. </select>
  13. {elseif $group.group_type == 'color'}
  14. <ul id="group_{$id_attribute_group}" class="aaa">
  15. {foreach from=$group.attributes key=id_attribute item=group_attribute}
  16. <li class="pull-xs-left input-container">
  17. <input class="input-color" type="radio" data-product-attribute="{$id_attribute_group}" name="group[{$id_attribute_group}]" value="{$id_attribute}"{if $group_attribute.selected} checked="checked"{/if}>
  18. {if $group_attribute.html_color_code}class="color" style="background-color: {$group_attribute.html_color_code}" {/if}
  19. {if $group_attribute.texture}class="color texture" style="background-image: url({$group_attribute.texture})" {/if}
  20. ><span class="sr-only">{$group_attribute.name}</span></span>
  21. </li>
  22. {/foreach}
  23. </ul>
  24. {elseif $group.group_type == 'radio'}
  25. <ul id="group_{$id_attribute_group}">
  26. {foreach from=$group.attributes key=id_attribute item=group_attribute}
  27. <li class="input-container pull-xs-left btn-{$id_attribute}">
  28. <input class="input-radio" type="radio" data-product-attribute="{$id_attribute_group}" name="group[{$id_attribute_group}]" value="{$id_attribute}"{if $group_attribute.selected} checked="checked"{/if}>
  29. <span class="radio-label">{$group_attribute.name}</span>
  30. </li>
  31. {/foreach}
  32. </ul>
  33. {/if}
  34. </div>
  35. {/foreach}
  36. </div>


Czyli gdy wyświetlam listę "select" i chcę aby nie powiązane opcje "radio" z w opcjach select się wyświetlały, nawet jak wspomniałem nie sa powiązane. Teraz działa to tak, że jak coś nie istnieje w powiązaniu z "select" to nie zostanie wygenerowane np. w opcji "radio"