2014-01-24 3 views
0

prestashop에 대한 작업.테이블에 제품 속성 표시 Prestashop

나는 그래서 용지 크기를 가지고 상단에이 http://www.solopress.com/leaflet-printing/bond-leaflet.html

같은 테이블 형식으로 다음을 표시해야 제품에 대한 속성을 설정하고 각 행은 용지의 수량입니다. 내 백엔드에서

나는/A5/A6 500분의 250 등 등 및 크기 A4 대한 속성 수량이 등

내가 드롭 다운 메뉴에서 속성을 당긴로 나열 할 수있는 방법이 있나요 가격이 장바구니에 담기 버튼이있는 테이블?

도움이 될만한 코드 나 입력 사항은 유용 할 것입니다.

감사합니다.

답변

1

이것은 분명히 대답이 아니지만 문제 자체에 대해 의견을 제시해야합니다.

텍스트가 명확하지 않지만 새로운 속성 값을 생성하고이를 조합 태그 아래에 지정했다고 가정합니다.

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'} :&nbsp;</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

관련 문제