Changeset 20463


Ignore:
Timestamp:
2011/03/02 18:13:03 (10 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20110302073538-c7n1c2l02udcbhn9
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

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/Smarty/templates/sphone/products/detail.tpl 19775@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_5-dev%2Fdata%2FSmarty%2Ftemplates%2Fsphone%2Fproducts%2Fdetail.tpl
data/Smarty/templates/sphone/products/list.tpl 19775@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_5-dev%2Fdata%2FSmarty%2Ftemplates%2Fsphone%2Fproducts%2Flist.tpl
data/class/pages/products/LC_Page_Products_Detail.php 15154@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fproducts%2FLC_Page_Products_Detail.php
data/class/pages/products/LC_Page_Products_List.php 15154@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fproducts%2FLC_Page_Products_List.php
html/js/products.js products.js-20110223205405-tr2pdhnwxtjiqrzr-1
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110302091246-0py2u14857eo8czr
bzr:revno:
3190
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/default/products/detail.tpl ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
data/Smarty/templates/default/products/list.tpl ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
data/Smarty/templates/sphone/products/detail.tpl ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
data/Smarty/templates/sphone/products/list.tpl ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
data/class/pages/products/LC_Page_Products_Detail.php ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
data/class/pages/products/LC_Page_Products_List.php ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
html/js/products.js ohkouchi@loop-az.jp-20110302091109-hmi52jxntrz3e31z
bzr:timestamp:
2011-03-02 18:12:46.151999950 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-03-02T09:12:46.152000Z
Message:

#1059(商品詳細 商品規格「選択してください」でもカートインされる)

  • その他不要な処理を削除
Location:
branches/version-2_5-dev
Files:
7 edited

Legend:

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

    r20408 r20463  
    183183    <input type="hidden" name="product_id" value="<!--{$tpl_product_id}-->" /> 
    184184    <input type="hidden" name="product_class_id" value="<!--{$tpl_product_class_id}-->" id="product_class_id" /> 
    185     <input type="hidden" name="product_type" value="<!--{$tpl_product_type}-->" id="product_type" /> 
    186185    <input type="hidden" name="favorite_product_id" value="" /> 
    187186 
  • branches/version-2_5-dev/data/Smarty/templates/default/products/list.tpl

    r20408 r20463  
    5454    fnSetVal("product_id", productForm["product_id"].value); 
    5555    fnSetVal("product_class_id", productForm["product_class_id"].value); 
    56     fnSetVal("product_type", productForm["product_type"].value); 
    5756    fnSubmit(); 
    5857} 
     
    8079        <input type="hidden" name="classcategory_id2" value="" /> 
    8180        <input type="hidden" name="product_class_id" value="" /> 
    82         <input type="hidden" name="product_type" value="" /> 
    8381        <input type="hidden" name="quantity" value="" /> 
    8482        <!--{* ▲注文関連 *}--> 
     
    202200                   <input type="hidden" name="product_id" value="<!--{$id|h}-->" /> 
    203201                   <input type="hidden" name="product_class_id" id="product_class_id<!--{$id|h}-->" value="<!--{$tpl_product_class_id[$id]}-->" /> 
    204                    <input type="hidden" name="product_type" id="product_type<!--{$id|h}-->" value="<!--{$tpl_product_type[$id]}-->" /> 
    205202 
    206203                   <div class="cart_area clearfix"> 
  • branches/version-2_5-dev/data/Smarty/templates/sphone/products/detail.tpl

    r20462 r20463  
    212212                <input type="hidden" name="product_id" value="<!--{$tpl_product_id}-->" /> 
    213213                <input type="hidden" name="product_class_id" value="<!--{$tpl_product_class_id}-->" id="product_class_id" /> 
    214                 <input type="hidden" name="product_type" value="<!--{$tpl_product_type}-->" id="product_type" /> 
    215214                <input type="hidden" name="favorite_product_id" value="" /> 
    216215                 
  • branches/version-2_5-dev/data/Smarty/templates/sphone/products/list.tpl

    r20407 r20463  
    5656        <input type="hidden" name="classcategory_id2" value="" /> 
    5757        <input type="hidden" name="product_class_id" value="" /> 
    58         <input type="hidden" name="product_type" value="" /> 
    5958        <input type="hidden" name="quantity" value="" /> 
    6059        <!--{* ▲注文関連 *}--> 
  • branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_Detail.php

    r20457 r20463  
    146146        switch($this->mode) { 
    147147            case 'cart': 
    148                 $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam); 
     148                $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam, 
     149                                                    $this->tpl_classcat_find1, 
     150                                                    $this->tpl_classcat_find2); 
    149151                if (count($this->arrErr) == 0) { 
    150152                    $objCartSess = new SC_CartSession_Ex(); 
    151                     $classcategory_id1 = $this->objFormParam->getValue('classcategory_id1'); 
    152                     $classcategory_id2 = $this->objFormParam->getValue('classcategory_id2'); 
    153153                    $product_class_id = $this->objFormParam->getValue('product_class_id'); 
    154                     $product_type = $this->objFormParam->getValue('product_type'); 
    155  
    156                     // 規格1が設定されていない場合 
    157                     if(!$this->tpl_classcat_find1) { 
    158                         $classcategory_id1 = '0'; 
    159                     } 
    160  
    161                     // 規格2が設定されていない場合 
    162                     if(!$this->tpl_classcat_find2) { 
    163                         $classcategory_id2 = '0'; 
    164                     } 
     154 
    165155                    $objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity')); 
    166156 
     
    257247 
    258248        $this->subImageFlag = $this->lfSetFile($this->objUpFile,$this->arrProduct,$this->arrFile); 
    259         // 支払方法の取得 
    260         $this->arrPayment = $this->lfGetPayment(); 
    261249        //レビュー情報の取得 
    262250        $this->arrReview = $this->lfGetReviewData($product_id); 
     
    331319        // 規格分類名一覧 
    332320        $arrClassCatName = SC_Helper_DB_Ex::sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); 
    333         /* 
    334          * FIXME 
    335          * パフォーマンスが出ないため, 
    336          * SC_Product::getProductsClassByProductIds() を使用した実装に変更 
    337          */ 
    338321        // 商品規格情報の取得 
    339322        $arrProductsClass = $this->lfGetProductsClass($product_id); 
     
    400383        $objFormParam->addParam("商品ID", "product_id", INT_LEN, "n", array("EXIST_CHECK", "ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 
    401384        $objFormParam->addParam("お気に入り商品ID", "favorite_product_id", INT_LEN, "n", array("ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 
    402         $objFormParam->addParam("商品規格ID", "product_class_id", INT_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK")); 
    403         $objFormParam->addParam("商品種別", "product_type", INT_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK")); 
     385        $objFormParam->addParam("商品規格ID", "product_class_id", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 
    404386        // 値の取得 
    405387        $objFormParam->setParam($_REQUEST); 
     
    497479        $arrReview = $objQuery->select($col, $from, $where, $arrval); 
    498480        return $arrReview; 
    499     } 
    500  
    501     //支払方法の取得 
    502     //payment_id    1:クレジット 2:ショッピングローン 
    503     function lfGetPayment() { 
    504         $objQuery =& SC_Query::getSingletonInstance(); 
    505         $col = "payment_id, rule, payment_method"; 
    506         $from = "dtb_payment"; 
    507         $where = "del_flg = 0"; 
    508         $order = "payment_id"; 
    509         $objQuery->setOrder($order); 
    510         $arrPaymentId = $objQuery->select($col, $from, $where); 
    511         return $arrPaymentId; 
    512481    } 
    513482 
  • branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_List.php

    r20444 r20463  
    169169            $arrErr = $this->lfCheckError($target_product_id,$this->arrForm,$this->tpl_classcat_find1,$this->tpl_classcat_find2); 
    170170            if (count($arrErr) == 0) { 
    171                 $this->lfAddCart($this->arrForm,$this->tpl_classcat_find1,$this->tpl_classcat_find2,$target_product_id,$_SERVER['HTTP_REFERER']); 
     171                $this->lfAddCart($this->arrForm, $_SERVER['HTTP_REFERER']); 
    172172                SC_Response_Ex::sendRedirect(CART_URLPATH); 
    173173                exit; 
     
    331331            $objErr->doFunc(array("規格2", 'classcategory_id2', INT_LEN), array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 
    332332        } 
     333 
     334        $objErr->doFunc(array("商品規格ID", 'product_class_id', INT_LEN), array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 
    333335        $objErr->doFunc(array("数量", 'quantity', INT_LEN), array("EXIST_CHECK", "ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); 
    334336 
     
    487489     * @return void 
    488490     */    
    489     function lfAddCart($arrForm,$tpl_classcat_find1,$tpl_classcat_find2,$target_product_id,$referer){ 
    490         $classcategory_id1 = $arrForm['classcategory_id1']; 
    491         $classcategory_id2 = $arrForm['classcategory_id2']; 
    492         // 規格1が設定されていない場合 
    493         if (!$tpl_classcat_find1[$target_product_id]) { 
    494             $classcategory_id1 = '0'; 
    495         } 
    496         // 規格2が設定されていない場合 
    497         if (!$tpl_classcat_find2[$target_product_id]) { 
    498             $classcategory_id2 = '0'; 
    499         } 
    500  
    501         // 規格IDを取得 
     491    function lfAddCart($arrForm, $referer){ 
    502492        $product_class_id = $arrForm['product_class_id']; 
    503         $product_type = $arrForm['product_type']; 
    504493        $objCartSess = new SC_CartSession_Ex(); 
    505494        $objCartSess->addProduct($product_class_id, $arrForm['quantity']); 
  • branches/version-2_5-dev/html/js/products.js

    r20366 r20463  
    5151                $sele2.append(option); 
    5252            } 
    53         } 
    54         if ($sele1.val()) { 
    55             checkStock($form, product_id, $sele1.val(), $sele2.val()); 
     53            checkStock($form, product_id, $sele1.val() ? $sele1.val() : '', 
     54                       $sele2.val() ? $sele2.val() : ''); 
    5655        } 
    5756    } 
     
    8281        && typeof classcat2['product_code'] != 'undefined') { 
    8382        $product_code_default.hide(); 
     83        $product_code_dynamic.show(); 
    8484        $product_code_dynamic.text(classcat2['product_code']); 
     85    } else { 
     86        $product_code_default.show(); 
     87        $product_code_dynamic.hide(); 
    8588    } 
    8689     
     
    142145    var $product_class_id_dynamic = $form.find('[id^=product_class_id]'); 
    143146    if (classcat2 
    144         && typeof classcat2['product_type'] != 'undefined' 
    145         && String(classcat2['product_type']).length >= 1) { 
     147        && typeof classcat2['product_class_id'] != 'undefined' 
     148        && String(classcat2['product_class_id']).length >= 1) { 
    146149 
    147150        $product_class_id_dynamic.val(classcat2['product_class_id']); 
     151    } else { 
     152        $product_class_id_dynamic.val(''); 
    148153    } 
    149154} 
Note: See TracChangeset for help on using the changeset viewer.