Ignore:
Timestamp:
2010/10/13 18:03:46 (14 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:18851
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/Smarty/templates/default/cart/index.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fcart%2Findex.tpl
data/Smarty/templates/default/list.tpl 15747@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Flist.tpl
data/Smarty/templates/default/shopping/confirm.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fshopping%2Fconfirm.tpl
data/class/SC_CartSession.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_CartSession.php
data/class/SC_Product.php 18277@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2FSC_Product.php
data/class/helper/SC_Helper_DB.php 15176@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_DB.php
data/class/pages/cart/LC_Page_Cart.php 15179@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fcart%2FLC_Page_Cart.php
data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php 15367@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Ffrontparts%2Fbloc%2FLC_Page_FrontParts_Bloc_Cart.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
data/class/pages/shopping/LC_Page_Shopping_Complete.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Complete.php
data/class/pages/shopping/LC_Page_Shopping_Confirm.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Confirm.php
data/class/util/SC_Utils.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Futil%2FSC_Utils.php
data/install.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Finstall.php
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20101013090342-ipwymntv4wfnpwcf
bzr:revno:
2332
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/default/cart/index.tpl ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/Smarty/templates/default/list.tpl ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/Smarty/templates/default/shopping/confirm.tpl ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/class/SC_CartSession.php ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/class/SC_Product.php ohkouchi@loop-az.jp-20101013084914-tqtme0o2qlpunxyz
data/class/helper/SC_Helper_DB.php ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/class/pages/cart/LC_Page_Cart.php ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php ohkouchi@loop-az.jp-20101013084914-tqtme0o2qlpunxyz
data/class/pages/products/LC_Page_Products_List.php ohkouchi@loop-az.jp-20101013084914-tqtme0o2qlpunxyz
data/class/pages/shopping/LC_Page_Shopping_Complete.php ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/class/pages/shopping/LC_Page_Shopping_Confirm.php ohkouchi@loop-az.jp-20101013090124-oqet9229jtkdpn09
data/class/util/SC_Utils.php ohkouchi@loop-az.jp-20101013084914-tqtme0o2qlpunxyz
bzr:timestamp:
2010-10-13 18:03:42.963999987 +0900
bzr:user-agent:
bzr2.2.0+bzr-svn1.0.3
svn:original-date:
2010-10-13T09:03:42.964000Z
Message:

商品種別によってカートを分ける(#823)

  • SC_CartSession をリファクタリング
  • 商品情報を SC_CartSession で取得するように変更
  • SC_Helper_DB::sfTotalCart() の実装を SC_CartSession へ移動
  • SC_Product で, 規格分類名を name に格納していたのを classcategory_name へ変更
  • カート関連の処理を修正
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/cart/LC_Page_Cart.php

    r18833 r18852  
    6969     */ 
    7070    function process() { 
    71         global $objCampaignSess; 
    7271 
    7372        $objView = new SC_SiteView(false); 
     
    7978        $objDb = new SC_Helper_DB_Ex(); 
    8079        $objProduct = new SC_Product(); 
    81         // 商品購入中にカート内容が変更された。 
    82         if($objCartSess->getCancelPurchase()) { 
    83             $this->tpl_message = "商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。"; 
     80 
     81        $i = 0; 
     82        $this->cartKeys = $objCartSess->getKeys(); 
     83        foreach ($this->cartKeys as $key) { 
     84            // 商品購入中にカート内容が変更された。 
     85            if($objCartSess->getCancelPurchase($key)) { 
     86                $this->tpl_message = "商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。"; 
     87            } 
     88 
     89            // カートの商品規格を取得 
     90            $cartItems = $objCartSess->getCartList($key); 
     91            foreach (array_keys($cartItems) as $itemKey) { 
     92                $cartItem =& $cartItems[$itemKey]; 
     93                if (!SC_Utils_Ex::isBlank($cartItem)) { 
     94                    $this->cartItems[$key][$i] =& $cartItem; 
     95                    $i++; 
     96                } 
     97            } 
    8498        } 
    8599 
     
    88102        switch($_POST['mode']) { 
    89103        case 'up': 
    90             $objCartSess->upQuantity($_POST['cart_no']); 
     104            $objCartSess->upQuantity($_POST['cart_no'], $_POST['cartKey']); 
    91105            $this->reload(); // PRG pattern 
    92106            break; 
    93107        case 'down': 
    94             $objCartSess->downQuantity($_POST['cart_no']); 
     108            $objCartSess->downQuantity($_POST['cart_no'], $_POST['cartKey']); 
    95109            $this->reload(); // PRG pattern 
    96110            break; 
    97111        case 'delete': 
    98             $objCartSess->delProduct($_POST['cart_no']); 
     112            $objCartSess->delProduct($_POST['cart_no'], $_POST['cartKey']); 
    99113            $this->reload(); // PRG pattern 
    100114            break; 
    101115        case 'confirm': 
    102116            // カート内情報の取得 
    103             $cartKey = $_POST['cartKey']; // TODO 
    104             $arrRet = $objCartSess->getCartList($cartKey); 
    105             $max = count($arrRet); 
    106             $cnt = 0; 
    107             for ($i = 0; $i < $max; $i++) { 
    108                 // 商品規格情報の取得 
    109                 $this->arrData = $objProduct->getProductsClass($arrRet[$i]['id']); 
    110                 // DBに存在する商品 
    111                 if($this->arrData != "") { 
    112                     $cnt++; 
    113                 } 
    114             } 
     117            $cartKey = $_POST['cartKey']; 
     118            $cartList = $objCartSess->getCartList($cartKey); 
    115119            // カート商品が1件以上存在する場合 
    116             if($cnt > 0) { 
     120            if(count($cartList) > 0) { 
    117121                // 正常に登録されたことを記録しておく 
    118122                $objSiteSess->setRegistFlag(); 
     
    141145        // 基本情報の取得 
    142146        $this->arrInfo = $objSiteInfo->data; 
    143  
    144         $this->cartKeys = $objCartSess->getKeys(); 
    145147        foreach ($this->cartKeys as $key) { 
    146148            // カート集計処理 
    147             $objDb->sfTotalCart($this, $objCartSess, $key); 
    148             $this->arrData = $objDb->sfTotalConfirm($this->arrData, $this, $objCartSess, null, $objCustomer, $key); 
     149            $this->tpl_message = $objCartSess->checkProducts($key); 
     150            $this->tpl_total_pretax[$key] = $objCartSess->getAllProductsTotal($key); 
     151            $this->tpl_total_tax[$key] = $objCartSess->getAllProductsTax($key); 
     152            // ポイント合計 
     153            $this->tpl_total_point[$key] = $objCartSess->getAllProductsPoint($key); 
     154 
     155            $this->arrData = $objDb->sfTotalConfirm($this->cartItems[$key], $this, $objCartSess, null, $objCustomer, $key); 
    149156            // 送料無料までの金額を計算 
    150157            $this->tpl_deliv_free[$key] = $this->arrInfo['free_rule'] - $this->tpl_total_pretax[$key]; 
    151  
    152  
    153158        } 
    154159 
     
    159164            $this->tpl_name = $objCustomer->getValue('name01'); 
    160165        } 
    161  
    162166 
    163167        // 前頁のURLを取得 
Note: See TracChangeset for help on using the changeset viewer.