Changeset 17537


Ignore:
Timestamp:
2008/08/17 07:14:54 (16 years ago)
Author:
Seasoft
Message:

管理画面 - 商品管理 - 商品マスタ
複数の規格を有する商品の表示を改善。
(注意) view の再作成を要します。

Location:
branches/comu-ver2
Files:
4 edited

Legend:

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

    r17365 r17537  
    220220      <img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$image_path|sfRmDupSlash}-->&amp;width=65&amp;height=65"> 
    221221      </td> 
    222       <td rowspan="2"><!--{$arrProducts[cnt].product_code|escape|default:"-"}--></td> 
     222      <td rowspan="2"><!--{$arrProducts[cnt].product_code_min|escape}--> 
     223        <!--{if $arrProducts[cnt].product_code_min != $arrProducts[cnt].product_code_max}--> 
     224          <br />~ <!--{$arrProducts[cnt].product_code_max|escape}--> 
     225        <!--{/if}--> 
     226      </td> 
     227      <!--{* 価格 *}--> 
    223228      <td rowspan="2" class="right"> 
    224         <!--{* 価格 *}--> 
    225         <!--{if $arrProducts[cnt].price02 != ""}--> 
    226         <!--{$arrProducts[cnt].price02|number_format}--> 
    227         <!--{else}--> 
    228         - 
     229        <!--{$arrProducts[cnt].price02_min|number_format}--> 
     230        <!--{if $arrProducts[cnt].price02_min != $arrProducts[cnt].price02_max}--> 
     231          <br />~ <!--{$arrProducts[cnt].price02_max|number_format}--> 
    229232        <!--{/if}--> 
    230233      </td> 
    231234      <td><!--{$arrProducts[cnt].name|escape}--></td> 
     235      <!--{* 在庫 *}--> 
     236      <!--{* XXX 複数規格でかつ、全ての在庫数量が等しい場合は先頭に「各」と入れたれたら良いと思う。 *}--> 
    232237      <td rowspan="2"> 
    233         <!--{* 在庫 *}--> 
    234         <!--{if $arrProducts[cnt].stock_unlimited == '1'}--> 
    235         無制限 
    236         <!--{else}--> 
    237         <!--{$arrProducts[cnt].stock|escape|default:"-"}--> 
     238        <!--{if $arrProducts[cnt].stock_unlimited_min}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_min|number_format}--><!--{/if}--> 
     239        <!--{if $arrProducts[cnt].stock_unlimited_min != $arrProducts[cnt].stock_unlimited_max || $arrProducts[cnt].stock_min != $arrProducts[cnt].stock_max}--> 
     240          <br />~ <!--{if $arrProducts[cnt].stock_unlimited_max}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_max|number_format}--><!--{/if}--> 
    238241        <!--{/if}--> 
    239242      </td> 
  • branches/comu-ver2/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php

    r16938 r17537  
    378378           create_date, 
    379379           deliv_fee, 
     380           update_date, 
    380381           rank 
    381382           ,(SELECT rank AS category_rank 
     
    403404                   T0.deliv_fee, 
    404405                   T00.category_id, 
    405                    T00.rank 
     406                   T0.rank, 
     407                   T0.update_date 
    406408              FROM dtb_products AS T0 
    407409         LEFT JOIN dtb_product_categories AS T00 
  • branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r17263 r17537  
    273273                case 'delete_all': 
    274274                    // 検索結果をすべて削除 
    275                     $where = "product_id IN (SELECT product_id FROM vw_products_nonclass AS noncls  WHERE $where)"; 
     275                    $where = "product_id IN (SELECT product_id FROM vw_products_allclass AS allcls  WHERE $where)"; 
    276276                    $sqlval['del_flg'] = 1; 
    277277                    $objQuery->update("dtb_products", $sqlval, $where, $arrval); 
     
    280280                default: 
    281281                    // 読み込む列とテーブルの指定 
    282                     $col = "product_id, name, category_id, main_list_image, status, product_code, price01, price02, stock, stock_unlimited"; 
    283                     $from = "vw_products_nonclass AS noncls "; 
     282                    $col = "product_id, name, category_id, main_list_image, status, product_code_min, product_code_max, price02_min, price02_max, stock_min, stock_max, stock_unlimited_min, stock_unlimited_max"; 
     283                    $from = "vw_products_allclass AS allcls "; 
    284284 
    285285                    // 行数の取得 
     
    317317                    // 検索結果の取得 
    318318                    $this->arrProducts = $objQuery->select($col, $from, $where, $arrval); 
    319  
     319                     
    320320                    // 各商品ごとのカテゴリIDを取得 
    321321                    if (count($this->arrProducts) > 0) { 
  • branches/comu-ver2/html/install/sql/create_view.sql

    r16546 r17537  
    7777            T5.sale_unlimited, 
    7878            T5.create_date, 
    79             T5.deliv_fee 
     79            T5.deliv_fee, 
     80            T5.update_date 
    8081       FROM 
    8182             ((SELECT T1.product_id, 
     
    9798                      T1.deliv_fee, 
    9899                      T2.category_id, 
    99                       T1.rank 
     100                      T1.rank, 
     101                      T1.update_date 
    100102                 FROM dtb_products AS T1 
    101103            LEFT JOIN dtb_product_categories AS T2 
Note: See TracChangeset for help on using the changeset viewer.