Changeset 19993


Ignore:
Timestamp:
2011/01/19 23:34:04 (10 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19992
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/Smarty/templates/admin/products/complete.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fproducts%2Fcomplete.tpl
data/Smarty/templates/admin/products/product_class.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fproducts%2Fproduct_class.tpl
data/Smarty/templates/admin/products/product_class_complete.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fproducts%2Fproduct_class_complete.tpl
data/Smarty/templates/admin/products/product_class_confirm.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fproducts%2Fproduct_class_confirm.tpl
data/Smarty/templates/default/products/detail.tpl 19775@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_5-dev%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fproducts%2Fdetail.tpl
data/Smarty/templates/default/products/list.tpl 19775@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_5-dev%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fproducts%2Flist.tpl
data/class/helper/SC_Helper_Purchase.php sc_helper_purchase.p-20101020100530-jyaoa7ch9pdfjqzp-1
data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php 15559@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fproducts%2FLC_Page_Admin_Products_ProductClass.php
html/user_data/packages/admin/css/admin_contents.css 18900@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_5-dev%2Fhtml%2Fuser_data%2Fpackages%2Fadmin%2Fcss%2Fadmin_contents.css
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110119143400-y3x781u6k7nxuu9c
bzr:revno:
2722
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/admin/products/complete.tpl ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
data/Smarty/templates/admin/products/product_class.tpl ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
data/Smarty/templates/admin/products/product_class_complete.tpl ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
data/Smarty/templates/admin/products/product_class_confirm.tpl ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
data/class/helper/SC_Helper_Purchase.php ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
html/user_data/packages/admin/css/admin_contents.css ohkouchi@loop-az.jp-20110119143115-v4oyz2sza3zwz8oh
bzr:timestamp:
2011-01-19 23:34:00.638999939 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-01-19T14:34:00.639000Z
Message:

#781(規格のデータベースを木構造に)

  • 管理画面規格管理, フロント商品一覧/詳細を修正

#792(ダウンロード販売機能)

  • 規格管理画面からアップロードできなかったのを修正
Location:
branches/version-2_5-dev
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/Smarty/templates/admin/products/complete.tpl

    r19965 r19993  
    3535        <div class="btn-area"> 
    3636            <ul> 
    37                 <li><a class="btn-action" href="./product.php"><span class="btn-prev">検索結果へ戻る</span></a></li> 
     37                <!--{* TODO <li><a class="btn-action" href="./"><span class="btn-prev">検索結果へ戻る</span></a></li> *}--> 
    3838                <li><a class="btn-action" href="./product.php"><span class="btn-next">続けて登録を行う</span></a></li> 
    3939                <li><a class="btn-action" href="?" onclick="fnModeSubmit('pre_edit', 'product_id', '<!--{$arrForm.product_id}-->'); return false;"><span class="btn-next">この商品の規格を登録する</span></a></li> 
  • branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class.tpl

    r19965 r19993  
    114114      <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)<span class="attention">*</span></th> 
    115115      <th>商品種別<span class="attention">*</span></th> 
    116       <th><label for="allPaymentIds">支払方法</label><span class="attention">*</span> <input type="checkbox" name="allPaymentIds" onclick="fnAllCheck(this, 'input[name^=payment_ids]')" /></th> 
     116      <th><span class="attention">*</span> <input type="checkbox" name="allPaymentIds" id="allPaymentIds" onclick="fnAllCheck(this, 'input[name^=payment_ids]')" /><label for="allPaymentIds">支払方法</label></th> 
    117117      <th>ダウンロード<br>ファイル名<span class="red"><br>上限<!--{$smarty.const.STEXT_LEN}-->文字</span></th> 
    118118      <th>ダウンロード商品用<br>ファイル</th> 
     
    151151      <!--{assign var=key value="price02:`$smarty.section.cnt.iteration`"}--> 
    152152      <td class="center"><input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key]}-->" size="6" class="box6" maxlength="<!--{$smarty.const.PRICE_LEN}-->" <!--{if $arrErr[$key] != ""}--><!--{sfSetErrorStyle}--><!--{/if}-->></td> 
    153       <td> 
     153      <td class="class-product-type"> 
    154154        <!--{assign var=key value="product_type_id:`$smarty.section.cnt.iteration`"}--> 
    155         <input type="radio" name="<!--{$key}-->" value="<!--{$smarty.const.PRODUCT_TYPE_NORMAL}-->" <!--{if $arrForm[$key] == "1"}-->checked<!--{/if}-->/>通常<br> 
    156         <input type="radio" name="<!--{$key}-->" value="<!--{$smarty.const.PRODUCT_TYPE_DOWNLOAD}-->" <!--{if $arrForm[$key] == "2"}-->checked<!--{/if}--> />ダウンロード 
     155        <!--{html_radios name=$key options=$arrProductType selected=$arrForm[$key] separator='<br />'}--> 
    157156      </td> 
    158157      <td class="class-payment center"> 
    159158        <!--{assign var=key value="payment_ids:`$smarty.section.cnt.iteration`"}--> 
    160         <span class="attention"><!--{$arrErr[$key]}--></span> 
    161159        <!--{html_checkboxes name=$key options=$arrPayments selected=$arrForm[$key] separator='<br />'}--> 
    162160      </td> 
     
    167165      </td> 
    168166      <!--{assign var=key value="down_realfilename:`$smarty.section.cnt.iteration`"}--> 
    169       <td> 
    170         <span class="attention"><!--{$arrErr[$key]}--></span> 
     167      <td><span class="attention"><!--{$arrErr[$key]}--></span> 
    171168          <!--{if $arrForm[$key] != ""}--> 
    172169            <!--{$arrForm[$key]|h}--><input type="hidden" name="<!--{$key}-->" value="<!--{$arrForm[$key]|h}-->"> 
    173             <a href="" onclick="fnModeSubmit('delete_down', 'down_key', '<!--{$key}-->'); return false;">[ファイルの取り消し]</a><br> 
     170            <a href="" onclick="fnFormModeSubmit('form1', 'delete_down', 'down_key', '<!--{$key}-->'); return false;">[ファイルの取り消し]</a><br> 
    174171          <!--{/if}--> 
    175172          <input type="file" name="<!--{$key}-->" size="10" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /><br /> 
    176           <a class="btn-normal" href="javascript:;" name="btn" onclick="fnModeSubmit('upload_down', 'down_key', '<!--{$key}-->'); return false;">アップロード</a> 
     173          <a class="btn-normal" href="javascript:;" name="btn" onclick="fnFormModeSubmit('form1', 'upload_down', 'down_key', '<!--{$key}-->'); return false;">アップロード</a> 
    177174      </td> 
    178175    </tr> 
  • branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class_complete.tpl

    r18873 r19993  
    2525<input type="hidden" name="mode" value="" /> 
    2626<input type="hidden" name="product_id" value="" /> 
    27 <div id="products" class="contents-main"> 
    28   <div class="message"> 
    29     登録が完了いたしました。<br /> 
    30     <a href="./product.php">→続けて登録を行う</a> 
    31   </div> 
    32 </div> 
     27    <div id="complete"> 
     28        <div class="complete-top"></div> 
     29        <div class="contents"> 
     30            <div class="message"> 
     31                登録が完了致しました。 
     32            </div> 
     33        </div> 
     34        <div class="btn-area-top"></div> 
     35        <div class="btn-area"> 
     36            <ul> 
     37                <li><a class="btn-action" href="./product.php"><span class="btn-next">続けて登録を行う</span></a></li> 
     38            </ul> 
     39        </div> 
     40        <div class="btn-area-bottom"></div> 
     41    </div> 
    3342</form> 
  • branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class_confirm.tpl

    r19954 r19993  
    7979      <td class="right"><!--{$arrForm[$key]}--></td> 
    8080      <!--{assign var=key value="product_type_id:`$smarty.section.cnt.iteration`"}--> 
    81       <!--{assign var=inkey value="`$arrForm[$key]`"}--> 
    82       <td class="right"><!--{$arrDown[$inkey]}--></td> 
     81      <td class="right"> 
     82      <!--{foreach from=$arrForm[$key] item=product_type_id}--> 
     83        <!--{$arrProductType[$product_type_id]|h}--> 
     84      <!--{/foreach}--> 
     85      </td> 
    8386      <!--{assign var=key value="payment_ids:`$smarty.section.cnt.iteration`"}--> 
    8487      <td> 
     
    101104  <div class="btn-area"> 
    102105    <ul> 
    103       <li><a class="btn-action" href="javascript:;" onclick="fnModeSubmit('confirm_return','',''); return false"><span class="btn-prev">前へ戻る</span></a></li> 
     106      <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', 'confirm_return','',''); return false"><span class="btn-prev">前へ戻る</span></a></li> 
    104107    <!--{if $tpl_check > 0}--> 
    105108      <li><a class="btn-action" href="javascript:;" onclick="document.form1.submit(); return false;"><span class="btn-next">この内容で登録する</span></a></li> 
  • branches/version-2_5-dev/data/Smarty/templates/default/products/detail.tpl

    r19983 r19993  
    5252function fnCheckStock(form) { 
    5353    classcat_id1 = form.classcategory_id1.value; 
    54     classcat_id2 = form.classcategory_id2 ? form.classcategory_id2.value : 0; 
     54    classcat_id2 = form.classcategory_id2 ? form.classcategory_id2.value : ''; 
    5555    classcat2 = classCategories[classcat_id1][classcat_id2]; 
    5656 
  • branches/version-2_5-dev/data/Smarty/templates/default/products/list.tpl

    r19983 r19993  
    8080    product_id = form.product_id.value; 
    8181    classcat_id1 = form.classcategory_id1.value; 
    82     classcat_id2 = form.classcategory_id2 ? form.classcategory_id2.value : 0; 
     82    classcat_id2 = form.classcategory_id2 ? form.classcategory_id2.value : ''; 
    8383    classcat2 = productsClassCategories[product_id][classcat_id1][classcat_id2]; 
    8484     
  • branches/version-2_5-dev/data/class/helper/SC_Helper_Purchase.php

    r19975 r19993  
    489489    function getDeliv($productTypeId) { 
    490490        $objQuery =& SC_Query::getSingletonInstance(); 
    491         return $objQuery->get("deliv_id", "dtb_deliv", "product_type_id = ?", 
     491        $result = $objQuery->get("deliv_id", "dtb_deliv", "product_type_id = ?", 
    492492                                 array($productTypeId)); 
     493        // XXX ダウンロード商品の場合の dtb_shipping の扱い 
     494        return is_null($result) ? 0 : $result; 
    493495    } 
    494496 
  • branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php

    r19805 r19993  
    5454        $this->tpl_subno = 'product'; 
    5555        $this->tpl_subtitle = '商品登録(商品規格)'; 
     56        $masterData = new SC_DB_MasterData_Ex(); 
     57        $this->arrProductType = $masterData->getMasterData("mtb_product_type"); 
    5658        $this->arrPayments = SC_Helper_DB_Ex::sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); 
    5759    } 
     
    6163        while (isset($_POST['classcategory_id1:' . $i])) { 
    6264            //ファイル系処理 
    63             $this->objDownFile->addFile("ダウンロード販売用ファイル". ":" . $i, 'down_realfilename'. ":" . $i, explode(",", DOWNLOAD_EXTENSION),DOWN_SIZE, true, 0, 0); 
     65            $this->objDownFile->addFile("ダウンロード販売用ファイル", 'down_realfilename'. ":" . $i, explode(",", DOWNLOAD_EXTENSION),DOWN_SIZE, true, 0, 0); 
    6466            $i++; 
    6567        } 
     
    9698        // Downファイル管理クラス 
    9799        $this->objDownFile = new SC_UploadFile(DOWN_TEMP_REALDIR, DOWN_SAVE_REALDIR); 
    98  
     100        $this->lfInitDownFile(); 
    99101        switch ($_POST['mode']) { 
    100102        case 'edit': 
     
    103105            // エラーチェック 
    104106            $this->arrErr = $this->lfProductClassError($this->arrForm); 
    105             if ($this->arrErr == null){ 
    106             //if (SC_Utils_Ex::isBlank($this->arrErr)) { 
     107            if (empty($this->arrErr)){ 
    107108                $this->tpl_mainpage = 'products/product_class_confirm.tpl'; 
    108109                $this->lfProductConfirmPage(); // 確認ページ表示 
    109110            } else { 
    110                 $this->doPreEdit(false,true); 
     111                $this->doPreEdit(false ,true); 
    111112                // Hiddenからのデータを引き継ぐ 
    112113                $this->objDownFile->setHiddenFileList($_POST); 
     
    115116                // Form用に配列を渡す。 
    116117                $this->arrForm = array_merge((array)$this->arrForm, (array)$this->objDownFile->getFormKikakuDownFile()); 
     118                $this->doDisp(); 
    117119            } 
    118120            break; 
     
    133135        // ダウンロード商品ファイルアップロード 
    134136        case 'upload_down': 
    135             $this->doPreEdit(); 
     137            $this->doPreEdit(true); 
    136138            // Hiddenからのデータを引き継ぐ 
    137139            $this->objDownFile->setHiddenKikakuFileList($_POST); 
     
    144146            // Form用に配列を渡す。 
    145147            $this->arrForm = array_merge((array)$this->arrForm, (array)$this->objDownFile->getFormKikakuDownFile()); 
     148            $this->doDisp(); 
    146149            break; 
    147150        // ダウンロードファイルの削除 
    148151        case 'delete_down': 
    149             $this->doPreEdit(); 
     152            $this->doPreEdit(true); 
    150153            // Hiddenからのデータを引き継ぐ 
    151154            $this->objDownFile->setHiddenKikakuFileList($_POST); 
     
    156159            // Form用に配列を渡す。 
    157160            $this->arrForm = array_merge((array)$this->arrForm, (array)$this->objDownFile->getFormKikakuDownFile()); 
     161            $this->doDisp(); 
    158162            break; 
    159163        case 'confirm_return': 
     
    170174            // Form用に配列を渡す。 
    171175            $this->arrForm = array_merge((array)$this->arrForm, (array)$this->objDownFile->getFormKikakuDownFile()); 
     176            $this->doDisp(); 
    172177            break; 
    173178        case 'complete': 
     
    220225            $exists[$val['product_class_id']] = $val; 
    221226        } 
    222  
    223227        $i = 1; 
    224         while (isset($arrList['classcategory_id1:' . $i])) { 
     228        while (isset($arrList['check:' . $i])) { 
    225229            $pVal = array(); 
    226230            $pVal['product_id'] = $product_id;; 
     
    365369                } 
    366370 
     371                // 商品種別チェック 
     372                if (empty($array['product_type_id:' . $no])) { 
     373                    $objErr->arrErr['product_type_id:' . $no] = "※ 商品種別は、いずれかを選択してください。<br />"; 
     374                } 
     375 
    367376                // 支払方法チェック 
    368377                if (empty($array['payment_ids:' . $no])) { 
     
    388397            } 
    389398            if(count($objErr->arrErr) > 0) { 
    390                 $objErr->arrErr["error:".$no] = $objErr->arrErr["product_code:".$no]; 
    391                 $objErr->arrErr["error:".$no].= $objErr->arrErr["price01:".$no]; 
    392                 $objErr->arrErr["error:".$no].= $objErr->arrErr["price02:".$no]; 
    393                 $objErr->arrErr["error:".$no].= $objErr->arrErr["stock:".$no]; 
     399                $objErr->arrErr["error:".$no] = $objErr->arrErr["product_type_id:".$no]; 
     400                $objErr->arrErr["error:".$no] .= $objErr->arrErr["payment_ids:".$no]; 
     401                $objErr->arrErr["error:".$no] .= $objErr->arrErr["product_code:".$no]; 
     402                $objErr->arrErr["error:".$no] .= $objErr->arrErr["price01:".$no]; 
     403                $objErr->arrErr["error:".$no] .= $objErr->arrErr["price02:".$no]; 
     404                $objErr->arrErr["error:".$no] .= $objErr->arrErr["stock:".$no]; 
     405                $objErr->arrErr["error:".$no] .= $objErr->arrErr["stock:".$no]; 
     406                $objErr->arrErr["error:".$no] .= $objErr->arrErr["down_filename:".$no]; 
     407                $objErr->arrErr["error:".$no] .= $objErr->arrErr["down_realfilename:".$no]; 
     408 
    394409            } 
    395410            $no++; 
     
    427442        $this->arrForm['select_class_id1'] = $_POST['select_class_id1']; 
    428443        $this->arrForm['select_class_id2'] = $_POST['select_class_id2']; 
    429  
    430         $this->arrErr = $this->lfClassError(); 
    431         if (SC_Utils_Ex::isBlank($this->arrErr)) { 
     444        $dispError = $this->lfClassError(); 
     445        if (SC_Utils_Ex::isBlank($dispError)) { 
    432446            $this->arrClassCat = $this->getAllClassCategory($_POST['select_class_id1'], $_POST['select_class_id2']); 
    433447 
     
    441455            } 
    442456        } 
     457        $this->arrErr = array_merge((array) $this->arrErr, $dispError); 
    443458        $this->tpl_onload.= "fnCheckAllStockLimit('$total', '" . DISABLED_RGB . "');"; 
    444459    } 
  • branches/version-2_5-dev/html/user_data/packages/admin/css/admin_contents.css

    r19965 r19993  
    10121012#products label { 
    10131013    white-space: nowrap; 
     1014} 
     1015#products .class-product-type label { 
     1016   white-space: normal; 
    10141017} 
    10151018#products .list-info{ 
Note: See TracChangeset for help on using the changeset viewer.