Changeset 17191


Ignore:
Timestamp:
2008/03/28 16:36:01 (16 years ago)
Author:
pineray
Message:

管理画面の商品マスタで検索結果の一覧にある各商品のカテゴリを複数カテゴリ対応に修正

Location:
branches/comu-ver2/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/Smarty/templates/default/admin/products/index.tpl

    r16582 r17191  
    346346                            <!--{* カテゴリ名 *}--> 
    347347                            <div id="disp_cat<!--{$smarty.section.cnt.iteration}-->" style="display:<!--{$cat_flg}-->"> 
    348                             <!--{assign var=key value=$arrProducts[cnt].category_id}--> 
    349                             <!--{$arrCatList[$key]|sfTrim}--> 
     348              <!--{foreach from=$arrProducts[cnt].categories item=category_id name=categories}--> 
     349                            <!--{$arrCatList[$category_id]|sfTrim}--> 
     350              <!--{if !$smarty.foreach.categories.last}--><br /><!--{/if}--> 
     351              <!--{/foreach}--> 
    350352                            </div> 
    351353 
  • branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r17163 r17191  
    316316                    // 検索結果の取得 
    317317                    $this->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
     318 
     319                    // 各商品ごとのカテゴリIDを取得 
     320                    if (count($this->arrProducts) > 0) { 
     321                        foreach ($this->arrProducts as $key => $val) { 
     322                            $this->arrProducts[$key]["categories"] = $objDb->sfGetCategoryId($val["product_id"]); 
     323                            $objDb->g_category_on = false; 
     324                        } 
     325                    } 
    318326                } 
    319327            } 
Note: See TracChangeset for help on using the changeset viewer.