이것은 분명히 대답이 아니지만 문제 자체에 대해 의견을 제시해야합니다.
텍스트가 명확하지 않지만 새로운 속성 값을 생성하고이를 조합 태그 아래에 지정했다고 가정합니다.
product.tpl 파일에 필요한 테이블 구조를 만들고 특정 attrbitues를 멋진 forach 루프로 표시해야합니다.
기본적으로 속성의 그룹 유형에는 선택, 색상, 라디오가 있습니다. 새 속성을 추가 할 수는 있지만 데이터베이스 자체에는 변경 사항이 없습니다 (관리자 패널을 통해 속성을 추가 할 수 있는지 여부는 알 수 없음). 그룹 유형은 동일하게 유지됩니다. 여기
당신이 볼 수있는 목록에 결과를 표시합니다
{foreach from=$groups key=id_attribute_group item=group}
{if $group.attributes|@count}
<fieldset class="attribute_fieldset span5">
<div id="attribute_label_container">
<label class="attribute_label" for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} : </label>
</div>
{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();">
{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 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" />
{/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')}
<ul>
{foreach from=$group.attributes key=id_attribute item=group_attribute}
<li>
<input type="radio" class="attribute_radio" name="{$groupName}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} onclick="findCombination();getProductAttribute();" />
<span>{$group_attribute|escape:'htmlall':'UTF-8'}</span>
</li>
{/foreach}
</ul>
{/if}
</div>
</fieldset>
{/if}
{/foreach}
도움이 될 product.tpl 파일에서 코드입니다. 테이블 구조로 표시하려면 올바른 group_type IF 내용을 편집하십시오.
도움이되기를 바랍니다.
BR 's