Drukowana wersja tematu

Kliknij tu, aby zobaczyć temat w orginalnym formacie

Forum PHP.pl _ Gotowe rozwiązania _ Modyfikacja szablonu prestashop

Napisany przez: duszek 10.01.2019, 11:41:57

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


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"

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)