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