Ignore:
Timestamp:
2010/10/13 18:03:46 (12 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/util/SC_Utils.php

    r18820 r18852  
    313313        // ユーザユニークIDの取得 
    314314        $uniqid = $objSiteSess->getUniqId(); 
    315         // 購入ボタンを押した時のカート内容がコピーされていない場合のみコピーする。 
    316         $objCartSess->saveCurrentCart($uniqid); 
    317         // POSTのユニークIDとセッションのユニークIDを比較(ユニークIDがPOSTされていない場合はスルー) 
    318         $ret = $objSiteSess->checkUniqId(); 
    319         if($ret != true) { 
    320             // エラーページの表示 
    321             SC_Utils_Ex::sfDispSiteError(CANCEL_PURCHASE, $objSiteSess); 
    322         } 
    323  
    324         // カート内が空でないか || 購入ボタンを押してから変化がないか 
    325         $quantity = $objCartSess->getTotalQuantity(); 
    326         $ret = $objCartSess->checkChangeCart(); 
    327         if($ret == true || !($quantity > 0)) { 
    328             // カート情報表示に強制移動する 
    329             // FIXME false を返して, Page クラスで遷移させるべき... 
    330             if (defined("MOBILE_SITE")) { 
    331                 header("Location: ". MOBILE_URL_CART_TOP 
    332                        . "?" . session_name() . "=" . session_id()); 
    333             } else { 
    334                 header("Location: ".URL_CART_TOP); 
    335             } 
    336             exit; 
     315 
     316        $cartkeys = $objCartSess->getKeys(); 
     317 
     318        foreach ($cartKeys as $cartKey) { 
     319            // 購入ボタンを押した時のカート内容がコピーされていない場合のみコピーする。 
     320            $objCartSess->saveCurrentCart($uniqid, $cartKey); 
     321            // POSTのユニークIDとセッションのユニークIDを比較(ユニークIDがPOSTされていない場合はスルー) 
     322            $ret = $objSiteSess->checkUniqId(); 
     323            if($ret != true) { 
     324                // エラーページの表示 
     325                SC_Utils_Ex::sfDispSiteError(CANCEL_PURCHASE, $objSiteSess); 
     326            } 
     327 
     328            // カート内が空でないか || 購入ボタンを押してから変化がないか 
     329            $quantity = $objCartSess->getTotalQuantity($cartKey); 
     330            $ret = $objCartSess->checkChangeCart($cartKey); 
     331            if($ret == true || !($quantity > 0)) { 
     332                // カート情報表示に強制移動する 
     333                // FIXME false を返して, Page クラスで遷移させるべき... 
     334                if (defined("MOBILE_SITE")) { 
     335                    header("Location: ". MOBILE_URL_CART_TOP 
     336                           . "?" . session_name() . "=" . session_id()); 
     337                } else { 
     338                    header("Location: ".URL_CART_TOP); 
     339                } 
     340                exit; 
     341            } 
    337342        } 
    338343        return $uniqid; 
Note: See TracChangeset for help on using the changeset viewer.