Ignore:
Timestamp:
2007/07/20 15:58:59 (17 years ago)
Author:
nanasess
Message:

r15064 から svn cp
とりあえず暫定コミット.

  • UTF-8 に変更
  • slib.php, glib.php のクラス化
  • LC_Page の抽象化(一部)
Location:
branches/feature-module-update
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update

    • Property svn:ignore set to
      .cache

      .settings

      .projectOptions
  • branches/feature-module-update/html/mobile/cart/index.php

    r12157 r15078  
    1717    var $tpl_message; 
    1818    function LC_Page() { 
    19         /** ɬ¤º»ØÄꤹ¤ë **/ 
    20         $this->tpl_css = '/css/layout/cartin/index.css';    // ¥á¥¤¥óCSS¥Ñ¥¹ 
    21         /** ɬ¤º»ØÄꤹ¤ë **/ 
    22         $this->tpl_mainpage = 'cart/index.tpl';     // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È 
    23         $this->tpl_title = "Ž¶ŽºŽÞ¤ÎÃæ¤ò¸«¤ë"; 
     19        /** 必ず指定する **/ 
     20        $this->tpl_css = '/css/layout/cartin/index.css';    // メインCSSパス 
     21        /** 必ず指定する **/ 
     22        $this->tpl_mainpage = 'cart/index.tpl';     // メインテンプレート 
     23        $this->tpl_title = "カゴの中を見る"; 
    2424    } 
    2525} 
    2626 
    27 // Ç㤤ʪ¤ò³¤±¤ë¾ì¹ç 
     27// 買い物を続ける場合 
    2828if($_REQUEST['continue']) { 
    2929    header("Location: " . gfAddSessionId(MOBILE_URL_SITE_TOP) ); 
     
    3737$objSiteInfo = $objView->objSiteInfo; 
    3838$objCustomer = new SC_Customer(); 
    39 // ´ðËܾðÊó¤Î¼èÆÀ 
     39// 基本情報の取得 
    4040$arrInfo = $objSiteInfo->data; 
    4141 
    42 // ¾¦ÉʹØÆþÃæ¤Ë¥«¡¼¥ÈÆâÍƤ¬Êѹ¹¤µ¤ì¤¿¡£ 
     42// 商品購入中にカート内容が変更された。 
    4343if($objCartSess->getCancelPurchase()) { 
    44     $objPage->tpl_message = "¾¦ÉʹØÆþÃæ¤ËŽ¶Ž°ŽÄÆâÍƤ¬Êѹ¹¤µ¤ì¤Þ¤·¤¿¤Î¤ÇŽ¤¤ª¼ê¿ô¤Ç¤¹¤¬¹ØÆþ¼ê³¤­¤ò¤ä¤êľ¤·¤Æ²¼¤µ¤¤Ž¡"; 
     44    $objPage->tpl_message = "商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。"; 
    4545} 
    4646 
    4747switch($_POST['mode']) { 
    4848case 'confirm': 
    49     // ¥«¡¼¥ÈÆâ¾ðÊó¤Î¼èÆÀ 
     49    // カート内情報の取得 
    5050    $arrRet = $objCartSess->getCartList(); 
    5151    $max = count($arrRet); 
    5252    $cnt = 0; 
    5353    for ($i = 0; $i < $max; $i++) { 
    54         // ¾¦Éʵ¬³Ê¾ðÊó¤Î¼èÆÀ 
     54        // 商品規格情報の取得 
    5555        $arrData = sfGetProductsClass($arrRet[$i]['id']); 
    56         // DB¤Ë¸ºß¤¹¤ë¾¦ÉÊ 
     56        // DBに存在する商品 
    5757        if($arrData != "") { 
    5858            $cnt++; 
    5959        } 
    6060    } 
    61     // ¥«¡¼¥È¾¦Éʤ¬1·ï°Ê¾å¸ºß¤¹¤ë¾ì¹ç 
     61    // カート商品が1件以上存在する場合 
    6262    if($cnt > 0) { 
    63         // Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯ 
     63        // 正常に登録されたことを記録しておく 
    6464        $objSiteSess->setRegistFlag(); 
    6565        $pre_uniqid = $objSiteSess->getUniqId(); 
    66         // Ãíʸ°ì»þID¤Îȯ¹Ô 
     66        // 注文一時IDの発行 
    6767        $objSiteSess->setUniqId(); 
    6868        $uniqid = $objSiteSess->getUniqId(); 
    69         // ¥¨¥é¡¼¥ê¥È¥é¥¤¤Ê¤É¤Ç´û¤Ëuniqid¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢ÀßÄê¤ò°ú¤­·Ñ¤° 
     69        // エラーリトライなどで既にuniqidが存在する場合は、設定を引き継ぐ 
    7070        if($pre_uniqid != "") { 
    7171            $sqlval['order_temp_id'] = $uniqid; 
     
    7474            $objQuery->update("dtb_order_temp", $sqlval, $where, array($pre_uniqid)); 
    7575        } 
    76         // ¥«¡¼¥È¤ò¹ØÆþ¥â¡¼¥É¤ËÀßÄê 
     76        // カートを購入モードに設定 
    7777        $objCartSess->saveCurrentCart($uniqid); 
    78         // ¹ØÆþ¥Ú¡¼¥¸¤Ø 
     78        // 購入ページへ 
    7979        header("Location: " . gfAddSessionId(MOBILE_URL_SHOP_TOP)); 
    8080        exit; 
     
    100100} 
    101101 
    102 // ¥«¡¼¥È½¸·×½èÍý 
     102// カート集計処理 
    103103$objPage = sfTotalCart($objPage, $objCartSess, $arrInfo); 
    104104$objPage->arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo, $objCustomer); 
     
    106106$objPage->arrInfo = $arrInfo; 
    107107 
    108 // ¥í¥°¥¤¥óȽÄê 
     108// ログイン判定 
    109109if($objCustomer->isLoginSuccess()) { 
    110110    $objPage->tpl_login = true; 
     
    113113} 
    114114 
    115 // Á÷ÎÁ̵ÎÁ¤Þ¤Ç¤Î¶â³Û¤ò·×»» 
     115// 送料無料までの金額を計算 
    116116$tpl_deliv_free = $objPage->arrInfo['free_rule'] - $objPage->tpl_total_pretax; 
    117117$objPage->tpl_deliv_free = $tpl_deliv_free; 
    118118 
    119 // Á°ÊǤÎURL¤ò¼èÆÀ 
     119// 前頁のURLを取得 
    120120$objPage->tpl_prev_url = $objCartSess->getPrevURL(); 
    121121 
Note: See TracChangeset for help on using the changeset viewer.