- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/products/LC_Page_Products_Detail.php
r22608 r22796 35 35 * @version $Id:LC_Page_Products_Detail.php 15532 2007-08-31 14:39:46Z nanasess $ 36 36 */ 37 class LC_Page_Products_Detail extends LC_Page_Ex 38 { 37 class LC_Page_Products_Detail extends LC_Page_Ex { 39 38 40 39 /** 商品ステータス */ … … 67 66 * @return void 68 67 */ 69 function init() 70 { 68 function init() { 71 69 parent::init(); 72 70 $masterData = new SC_DB_MasterData_Ex(); … … 82 80 * @return void 83 81 */ 84 function process() 85 { 82 function process() { 86 83 parent::process(); 87 84 $this->action(); … … 94 91 * @return void 95 92 */ 96 function action() 97 { 93 function action() { 98 94 // 会員クラス 99 95 $objCustomer = new SC_Customer_Ex(); … … 140 136 141 137 $this->tpl_javascript .= 'classCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories[$product_id]) . ';'; 142 $this->tpl_javascript .= 'function lnOnLoad() 143 {' . $this->js_lnOnload . '}'; 138 $this->tpl_javascript .= 'function lnOnLoad(){' . $this->js_lnOnload . '}'; 144 139 $this->tpl_onload .= 'lnOnLoad();'; 145 140 … … 242 237 * @return void 243 238 */ 244 function destroy() 245 { 239 function destroy() { 246 240 parent::destroy(); 247 241 } 248 242 249 243 /* プロダクトIDの正当性チェック */ 250 function lfCheckProductId($admin_mode,$product_id) 251 { 244 function lfCheckProductId($admin_mode,$product_id) { 252 245 // 管理機能からの確認の場合は、非公開の商品も表示する。 253 246 if (isset($admin_mode) && $admin_mode == 'on') { … … 270 263 271 264 /* ファイル情報の初期化 */ 272 function lfInitFile($objUpFile) 273 { 265 function lfInitFile($objUpFile) { 274 266 $objUpFile->addFile('詳細-メイン画像', 'main_image', array('jpg'), IMAGE_SIZE); 275 267 for ($cnt = 1; $cnt <= PRODUCTSUB_MAX; $cnt++) { … … 280 272 281 273 /* 規格選択セレクトボックスの作成 */ 282 function lfMakeSelect() 283 { 274 function lfMakeSelect() { 284 275 return 'fnSetClassCategories(' 285 276 . 'document.form1, ' … … 289 280 290 281 /* 規格選択セレクトボックスの作成(モバイル) */ 291 function lfMakeSelectMobile(&$objPage, $product_id,$request_classcategory_id1) 292 { 282 function lfMakeSelectMobile(&$objPage, $product_id,$request_classcategory_id1) { 293 283 294 284 $classcat_find1 = false; … … 353 343 354 344 /* パラメーター情報の初期化 */ 355 function lfInitParam(&$objFormParam) 356 { 345 function lfInitParam(&$objFormParam) { 357 346 $objFormParam->addParam('規格1', 'classcategory_id1', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 358 347 $objFormParam->addParam('規格2', 'classcategory_id2', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); … … 371 360 372 361 /* 商品規格情報の取得 */ 373 function lfGetProductsClass($product_id) 374 { 362 function lfGetProductsClass($product_id) { 375 363 $objProduct = new SC_Product_Ex(); 376 364 return $objProduct->getProductsClassFullByProductId($product_id); … … 378 366 379 367 /* 登録済み関連商品の読み込み */ 380 function lfPreGetRecommendProducts($product_id) 381 { 368 function lfPreGetRecommendProducts($product_id) { 382 369 $objProduct = new SC_Product_Ex(); 383 370 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 403 390 404 391 /* 入力内容のチェック */ 405 function lfCheckError($mode,&$objFormParam,$tpl_classcat_find1 = null ,$tpl_classcat_find2 = null) 406 { 392 function lfCheckError($mode,&$objFormParam,$tpl_classcat_find1 = null ,$tpl_classcat_find2 = null) { 407 393 408 394 switch ($mode) { … … 436 422 437 423 //商品ごとのレビュー情報を取得する 438 function lfGetReviewData($id) 439 { 424 function lfGetReviewData($id) { 440 425 $objQuery =& SC_Query_Ex::getSingletonInstance(); 441 426 //商品ごとのレビュー情報を取得する … … 454 439 * @return $subImageFlag 455 440 */ 456 function lfSetFile($objUpFile,$arrProduct,&$arrFile) 457 { 441 function lfSetFile($objUpFile,$arrProduct,&$arrFile) { 458 442 // DBからのデータを引き継ぐ 459 443 $objUpFile->setDBFileList($arrProduct); … … 475 459 * @return void 476 460 */ 477 function lfRegistFavoriteProduct($favorite_product_id,$customer_id) 478 { 461 function lfRegistFavoriteProduct($favorite_product_id,$customer_id) { 479 462 // ログイン中のユーザが商品をお気に入りにいれる処理 480 463 if (!SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', $favorite_product_id, 'del_flg = 0 AND status = 1')) { … … 506 489 * @return void 507 490 */ 508 function doCart() 509 { 491 function doCart() { 510 492 $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam, 511 493 $this->tpl_classcat_find1, … … 517 499 $objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity')); 518 500 519 // 開いているカテゴリーツリーを維持するためのパラメーター 520 $arrQueryString = array( 521 'product_id' => $this->objFormParam->getValue('product_id'), 522 ); 523 524 SC_Response_Ex::sendRedirect(CART_URLPATH, $arrQueryString); 501 502 SC_Response_Ex::sendRedirect(CART_URLPATH); 525 503 SC_Response_Ex::actionExit(); 526 504 } … … 533 511 * @return void 534 512 */ 535 function doAddFavorite(&$objCustomer) 536 { 513 function doAddFavorite(&$objCustomer) { 537 514 // ログイン中のユーザが商品をお気に入りにいれる処理 538 515 if ($objCustomer->isLoginSuccess() === true && $this->objFormParam->getValue('favorite_product_id') > 0) { … … 556 533 * @return void 557 534 */ 558 function doAddFavoriteSphone($objCustomer) 559 { 535 function doAddFavoriteSphone($objCustomer) { 560 536 // ログイン中のユーザが商品をお気に入りにいれる処理(スマートフォン用) 561 537 if ($objCustomer->isLoginSuccess() === true && $this->objFormParam->getValue('favorite_product_id') > 0) { … … 581 557 * @return void 582 558 */ 583 function doDefault() 584 { 559 function doDefault() { 585 560 // カート「戻るボタン」用に保持 586 561 $netURL = new Net_URL(); … … 592 567 * @return void 593 568 */ 594 function doMobileSelect() 595 { 569 function doMobileSelect() { 596 570 // 規格1が設定されている場合 597 571 if ($this->tpl_classcat_find1) { … … 609 583 * @return type 610 584 */ 611 function doMobileSelect2() 612 { 585 function doMobileSelect2() { 613 586 $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam,$this->tpl_classcat_find1,$this->tpl_classcat_find2); 614 587 … … 635 608 * @return void 636 609 */ 637 function doMobileSelectItem() 638 { 610 function doMobileSelectItem() { 639 611 $objProduct = new SC_Product_Ex(); 640 612 … … 678 650 * @return void 679 651 */ 680 function doMobileCart() 681 { 652 function doMobileCart() { 682 653 // この段階でエラーが出る場合は、数量の入力エラーのはず 683 654 if (count($this->arrErr)) { … … 691 662 * @return void 692 663 */ 693 function doMobileDefault() 694 { 664 function doMobileDefault() { 695 665 $this->tpl_mainpage = 'products/detail.tpl'; 696 666 }
Note: See TracChangeset
for help on using the changeset viewer.