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?
<div class="product-variants"> {foreach from=$groups key=id_attribute_group item=group}
<div class="clearfix product-variants-item"> <span class="control-label">{$group.name}
</span> {if $group.group_type == 'select'}
id="group_{$id_attribute_group}"
data-product-attribute="{$id_attribute_group}"
name="group[{$id_attribute_group}]">
{foreach from=$group.attributes key=id_attribute item=group_attribute}
<option value="{$id_attribute}" title="{$group_attribute.name}"{if $group_attribute.selected} selected="selected"{/if}>{$group_attribute.name}
</option> {/foreach}
{elseif $group.group_type == 'color'}
<ul id="group_{$id_attribute_group}" class="aaa"> {foreach from=$group.attributes key=id_attribute item=group_attribute}
<li class="pull-xs-left input-container"> <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}> {if $group_attribute.html_color_code}class="color" style="background-color: {$group_attribute.html_color_code}" {/if}
{if $group_attribute.texture}class="color texture" style="background-image: url({$group_attribute.texture})" {/if}
><span class="sr-only">{$group_attribute.name}
</span></span> {/foreach}
{elseif $group.group_type == 'radio'}
<ul id="group_{$id_attribute_group}"> {foreach from=$group.attributes key=id_attribute item=group_attribute}
<li class="input-container pull-xs-left btn-{$id_attribute}"> <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}> <span class="radio-label">{$group_attribute.name}
</span> {/foreach}
{/if}
{/foreach}
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"