Changeset 20312


Ignore:
Timestamp:
2011/02/22 04:53:09 (10 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:20311
bzr:committer:
Kentaro Ohkouchi <nanasess@fsm.ne.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/class/SC_CartSession.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_CartSession.php
data/class/pages/mypage/LC_Page_Mypage_Order.php 16238@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fmypage%2FLC_Page_Mypage_Order.php
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
bzr:mapping-version:
v4
bzr:merge:

nanasess@fsm.ne.jp-20110221195031-0vy4un7rchp3l9vz
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
nanasess@fsm.ne.jp-20110221195303-74zqydzg575y50uh
bzr:revno:
3040
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 nanasess@fsm.ne.jp-20110221195031-0vy4un7rchp3l9vz
data/Smarty/templates/default/products/list.tpl nanasess@fsm.ne.jp-20110221195031-0vy4un7rchp3l9vz
data/class/SC_CartSession.php nanasess@fsm.ne.jp-20110221195031-0vy4un7rchp3l9vz
data/class/pages/mypage/LC_Page_Mypage_Order.php nanasess@fsm.ne.jp-20110221195031-0vy4un7rchp3l9vz
data/class/pages/products/LC_Page_Products_Detail.php nanasess@fsm.ne.jp-20110221195031-0vy4un7rchp3l9vz
data/class/pages/products/LC_Page_Products_List.php nanasess@fsm.ne.jp-20110221195031-0vy4un7rchp3l9vz
bzr:timestamp:
2011-02-22 04:53:03.749000072 +0900
bzr:user-agent:
bzr2.2.2+bzr-svn1.0.4
svn:original-date:
2011-02-21T19:53:03.749000Z
Message:

#936(商品種別を指定せずにカートインすると変な動作をする)

  • SC_CartSession::addProduct() の引数を商品規格IDと数量に修正

#982([フロント]商品)

  • 商品一覧で JavaScript? エラーが発生していたのを修正
Location:
branches/version-2_5-dev/data
Files:
6 edited

Legend:

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

    r20290 r20312  
    150150    } else { 
    151151        eleDynamic.value = '' 
    152         eleDynamic.style.display = 'none'; 
    153152    } 
    154153    // 商品種別 
     
    163162    } else { 
    164163        eleDynamic.value = '' 
    165         eleDynamic.style.display = 'none'; 
    166164    } 
    167165} 
  • branches/version-2_5-dev/data/Smarty/templates/default/products/list.tpl

    r20290 r20312  
    111111    } else { 
    112112        eleDefault.style.display = ''; 
    113         eleDynamic.style.display = 'none'; 
    114113        eleDynamic.innerHTML = ''; 
    115114    } 
  • branches/version-2_5-dev/data/class/SC_CartSession.php

    r20112 r20312  
    225225 
    226226    // カートへの商品追加 
    227     function addProduct($id, $quantity, $productTypeId) { 
     227    function addProduct($product_class_id, $quantity) { 
     228        $objProduct = new SC_Product(); 
     229        $arrProduct = $objProduct->getProductsClass($product_class_id); 
     230        $productTypeId = $arrProduct['product_type_id']; 
    228231        $find = false; 
    229232        $max = $this->getMax($productTypeId); 
    230233        for($i = 0; $i <= $max; $i++) { 
    231234 
    232             if($this->cartSession[$productTypeId][$i]['id'] == $id) { 
     235            if($this->cartSession[$productTypeId][$i]['id'] == $product_class_id) { 
    233236                $val = $this->cartSession[$productTypeId][$i]['quantity'] + $quantity; 
    234237                if(strlen($val) <= INT_LEN) { 
     
    239242        } 
    240243        if(!$find) { 
    241             $this->cartSession[$productTypeId][$max+1]['id'] = $id; 
     244            $this->cartSession[$productTypeId][$max+1]['id'] = $product_class_id; 
    242245            $this->cartSession[$productTypeId][$max+1]['quantity'] = $quantity; 
    243246            $this->cartSession[$productTypeId][$max+1]['cart_no'] = $this->getNextCartID($productTypeId); 
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_Order.php

    r20162 r20312  
    9494        if ($order_count != 1) return array(); 
    9595 
    96         $col    = "product_class_id, quantity, product_type_id"; 
     96        $col    = "product_class_id, quantity"; 
    9797        $table  = "dtb_order_detail LEFT JOIN dtb_products_class USING(product_class_id)"; 
    9898        $where  = "order_id = ?"; 
     
    109109 
    110110            $objCartSess->addProduct($order_row['product_class_id'], 
    111                                      $order_row['quantity'], 
    112                                      $order_row['product_type_id']); 
     111                                     $order_row['quantity']); 
    113112        } 
    114113    } 
  • branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_Detail.php

    r20270 r20312  
    169169                        $classcategory_id2 = '0'; 
    170170                    } 
    171                     $objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity'), $product_type); 
     171                    $objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity')); 
    172172 
    173173                    // カート「戻るボタン」用に保持 
  • branches/version-2_5-dev/data/class/pages/products/LC_Page_Products_List.php

    r20289 r20312  
    154154 
    155155        $objJson = new Services_JSON(); 
    156         $this->tpl_javascript .= 'var productsClassCategories = ' . $objJson->encode($objProduct->classCategories) . ';\n'; 
     156        $this->tpl_javascript .= 'var productsClassCategories = ' . $objJson->encode($objProduct->classCategories) . ';'; 
    157157 
    158158        //onloadスクリプトを設定 
    159159        foreach ($this->arrProducts as $arrProduct) { 
    160             $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});\n"; 
     160            $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});"; 
    161161        } 
    162162 
     
    185185        } 
    186186 
    187         $this->tpl_javascript .= 'function fnOnLoad(){' . $js_fnOnLoad . '}'."\n"; 
     187        $this->tpl_javascript .= 'function fnOnLoad(){' . $js_fnOnLoad . '}'; 
    188188        $this->tpl_onload .= 'fnOnLoad(); '; 
    189189 
     
    479479                $arrProducts[$key]['quantity'] = $arrForm['quantity']; 
    480480                $arrProducts[$key]['arrErr'] = $arrErr; 
    481                 $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProducts[$key]['product_id']}, '{$arrForm['classcategory_id2']}');\n"; 
     481                $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProducts[$key]['product_id']}, '{$arrForm['classcategory_id2']}');"; 
    482482            } 
    483483        } 
     
    506506        $product_type = $arrForm['product_type']; 
    507507        $objCartSess = new SC_CartSession(); 
    508         $objCartSess->addProduct($product_class_id, $arrForm['quantity'], $product_type); 
     508        $objCartSess->addProduct($product_class_id, $arrForm['quantity']); 
    509509 
    510510        // カート「戻るボタン」用に保持 
Note: See TracChangeset for help on using the changeset viewer.