Changeset 18777 for branches/version-2_5-dev/data/class/pages/shopping
- Timestamp:
- 2010/08/06 14:52:59 (16 years ago)
- Location:
- branches/version-2_5-dev/data/class/pages/shopping
- Files:
-
- 4 edited
-
LC_Page_Shopping.php (modified) (6 diffs)
-
LC_Page_Shopping_Confirm.php (modified) (2 diffs)
-
LC_Page_Shopping_Deliv.php (modified) (6 diffs)
-
LC_Page_Shopping_Payment.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping.php
r18772 r18777 77 77 $objCustomer = new SC_Customer(); 78 78 $objCookie = new SC_Cookie(); 79 $objDb = new SC_Helper_DB_Ex(); 79 80 $this->objFormParam = new SC_FormParam(); // フォーム用 80 81 $this->lfInitParam(); // パラメータ情報の初期化 … … 85 86 $this->tpl_uniqid = $uniqid; 86 87 88 //ダウンロード商品判定 89 $this->cartdown = $objDb->chkCartDown($objCartSess); 90 87 91 // ログインチェック 88 92 if($objCustomer->isLoginSuccess()) { 89 // すでにログインされている場合は、お届け先設定画面に転送 90 $this->sendRedirect($this->getLocation("./deliv.php"), array()); 93 // すでにログインされている場合 94 if ($this->cartdown == 2) { 95 // 会員情報の住所を受注一時テーブルに書き込む 96 $objDb->sfRegistDelivData($uniqid, $objCustomer); 97 // 正常に登録されたことを記録しておく 98 $objSiteSess->setRegistFlag(); 99 //カート内が全てダウンロード商品の場合は支払方法設定画面に転送 100 $this->sendRedirect($this->getLocation("./payment.php"), array()); 101 } else { 102 // お届け先設定画面に転送 103 $this->sendRedirect($this->getLocation("./deliv.php"), array()); 104 } 91 105 exit; 92 106 } … … 103 117 case 'nonmember_confirm': 104 118 $this->lfSetNonMember($this); 119 //非会員のダウンロード商品を含んだ買い物はNG 120 if($this->cartdown != 0){ 121 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, "ダウンロード商品を含むお買い物は、会員登録が必要です。<br/>お手数ですが、会員登録をお願いします。"); 122 } 105 123 // ※breakなし 106 124 case 'confirm': … … 133 151 case 'nonmember': 134 152 $this->lfSetNonMember($this); 153 //非会員のダウンロード商品を含んだ買い物はNG 154 if($this->cartdown != 0){ 155 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, "ダウンロード商品を含むお買い物は、会員登録が必要です。<br/>お手数ですが、会員登録をお願いします。"); 156 } 135 157 // ※breakなし 136 158 default: … … 198 220 $this->objFormParam = new SC_FormParam(); // フォーム用 199 221 $helperMobile = new SC_Helper_Mobile_Ex(); 222 $objDb = new SC_Helper_DB_Ex(); 200 223 $this->lfInitParam(); // パラメータ情報の初期化 201 224 $this->objFormParam->setParam($_POST); // POST値の取得 … … 206 229 $this->tpl_uniqid = $uniqid; 207 230 231 //ダウンロード商品判定 232 $this->cartdown = $objDb->chkCartDown($objCartSess); 233 208 234 // ログインチェック 209 235 if($objCustomer->isLoginSuccess(true)) { 210 // すでにログインされている場合は、お届け先設定画面に転送 211 $this->sendRedirect($this->getLocation('./deliv.php'), true); 236 // すでにログインされている場合 237 if ($this->cartdown == 2) { 238 // 会員情報の住所を受注一時テーブルに書き込む 239 $objDb->sfRegistDelivData($uniqid, $objCustomer); 240 // 正常に登録されたことを記録しておく 241 $objSiteSess->setRegistFlag(); 242 //カート内が全てダウンロード商品の場合は支払方法設定画面に転送 243 $this->sendRedirect($this->getLocation("./payment.php"), array()); 244 } else { 245 // お届け先設定画面に転送 246 $this->sendRedirect($this->getLocation("./deliv.php"), array()); 247 } 212 248 exit; 213 249 } -
branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
r18701 r18777 80 80 $this->tpl_uniqid = $uniqid; 81 81 82 //ダウンロード商品判定 83 $this->cartdown = $objDb->chkCartDown($objCartSess); 84 82 85 // カート集計処理 83 86 $objDb->sfTotalCart($this, $objCartSess); … … 194 197 $this->tpl_uniqid = $uniqid; 195 198 199 //ダウンロード商品判定 200 $this->cartdown = $objDb->chkCartDown($objCartSess); 201 196 202 // カート集計処理 197 203 $objDb->sfTotalCart($this, $objCartSess); -
branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php
r18701 r18777 74 74 $objCampaignSess = new SC_CampaignSession(); 75 75 $objCustomer = new SC_Customer(); 76 $objDb = new SC_Helper_DB_Ex(); 76 77 // クッキー管理クラス 77 78 $objCookie = new SC_Cookie(COOKIE_EXPIRE); … … 93 94 $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess); 94 95 $this->tpl_uniqid = $uniqid; 96 97 //ダウンロード商品判定 98 $this->cartdown = $objDb->chkCartDown($objCartSess); 95 99 96 100 if (!isset($_POST['mode'])) $_POST['mode'] = ""; … … 127 131 SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR); 128 132 } 133 } 134 //ダウンロード商品判定 135 if($this->cartdown==2){ 136 // 会員情報の住所を受注一時テーブルに書き込む 137 $objDb->sfRegistDelivData($uniqid, $objCustomer); 138 // 正常に登録されたことを記録しておく 139 $objSiteSess->setRegistFlag(); 140 // ダウンロード商品有りの場合は、支払方法画面に転送 141 $this->sendRedirect($this->getLocation("./payment.php"), array()); 142 exit; 129 143 } 130 144 } else { … … 239 253 $objCartSess = new SC_CartSession(); 240 254 $objCustomer = new SC_Customer(); 255 $objDb = new SC_Helper_DB_Ex(); 241 256 // クッキー管理クラス 242 257 $objCookie = new SC_Cookie(COOKIE_EXPIRE); … … 258 273 $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess); 259 274 $this->tpl_uniqid = $uniqid; 275 276 //ダウンロード商品判定 277 $this->cartdown = $objDb->chkCartDown($objCartSess); 260 278 261 279 if (!isset($_POST['mode'])) $_POST['mode'] = ""; … … 293 311 SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR); 294 312 } 313 } 314 //ダウンロード商品判定 315 if($this->cartdown==2){ 316 // 会員情報の住所を受注一時テーブルに書き込む 317 $objDb->sfRegistDelivData($uniqid, $objCustomer); 318 // 正常に登録されたことを記録しておく 319 $objSiteSess->setRegistFlag(); 320 // ダウンロード商品有りの場合は、支払方法画面に転送 321 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), array()); 322 exit; 295 323 } 296 324 } else { -
branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php
r18701 r18777 86 86 $this->tpl_uniqid = $uniqid; 87 87 88 //ダウンロード商品判定 89 $this->cartdown = $objDb->chkCartDown($objCartSess); 90 88 91 // 会員ログインチェック 89 92 if($this->objCustomer->isLoginSuccess()) { … … 91 94 $this->tpl_user_point = $this->objCustomer->getValue('point'); 92 95 //戻り先URL 93 $this->tpl_back_url = URL_DELIV_TOP; 96 if ($this->cartdown == 2) { 97 // ダウンロード商品のみの場合はカート画面へ戻る 98 $this->tpl_back_url = URL_CART_TOP; 99 } else { 100 $this->tpl_back_url = URL_DELIV_TOP; 101 } 94 102 } else { 95 103 $this->tpl_back_url = URL_SHOP_TOP . "?from=nonmember"; … … 203 211 $this->tpl_uniqid = $uniqid; 204 212 213 //ダウンロード商品判定 214 $this->cartdown = $objDb->chkCartDown($objCartSess); 215 205 216 // 会員ログインチェック 206 217 if($this->objCustomer->isLoginSuccess(true)) { … … 236 247 // 正常な推移であることを記録しておく 237 248 $objSiteSess->setRegistFlag(); 238 $this->sendRedirect(MOBILE_URL_SHOP_TOP, true); 249 if ($this->cartdown == 2) { 250 // ダウンロード商品のみの場合はカート画面へ戻る 251 $this->sendRedirect($this->getLocation(MOBILE_URL_CART_TOP), true); 252 } else { 253 $this->sendRedirect(MOBILE_URL_SHOP_TOP, true); 254 } 239 255 exit; 240 256 } 257 } 258 259 // ダウンロード商品のみで、モードがお届け日時指定の場合はモードを変更 260 if ($this->cartdown == 2 && $_POST['mode'] == 'deliv_date') { 261 $_POST['mode'] = 'confirm'; 241 262 } 242 263 … … 341 362 $objQuery = new SC_Query(); 342 363 $objQuery->setOrder("rank DESC"); 364 365 //削除されていない支払方法を取得 366 $where = "del_flg = 0 AND deliv_id IN (SELECT deliv_id FROM dtb_deliv WHERE del_flg = 0) "; 367 //ダウンロード商品の有無判定 368 if($this->cartdown != 0){ 369 //ダウンロード商品を含む場合は、クレジット決済以外は選択できない。 370 $where .= "AND payment_id = " . CREDIT_PAYMENT; 371 } 372 343 373 // 削除されていない支払方法を取得 344 $arrRet = $objQuery->select("payment_id, payment_method, rule, upper_rule, note, payment_image", "dtb_payment", "del_flg = 0 AND deliv_id IN (SELECT deliv_id FROM dtb_deliv WHERE del_flg = 0) "); 374 $arrRet = $objQuery->select("payment_id, payment_method, rule, upper_rule, note, payment_image", "dtb_payment", $where); 375 345 376 // 配列初期化 346 377 $data = array(); 347 378 // 選択可能な支払方法を判定 348 379 foreach($arrRet as $data) { 380 //ダウンロード販売に対する注意追加 381 if($this->cartdown != 0){ 382 $data['payment_method'] = $data['payment_method'] . " (ダウンロード商品を含む場合、クレジット決済のみ選択可能です)"; 383 } 349 384 // 下限と上限が設定されている 350 385 if (strlen($data['rule']) != 0 && strlen($data['upper_rule']) != 0) {
Note: See TracChangeset
for help on using the changeset viewer.
