Changeset 16235
- Timestamp:
- 2007/10/02 19:42:05 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/pages/products/LC_Page_Products_Detail.php
r16226 r16235 256 256 /** 257 257 * Page のプロセス(モバイル). 258 * 259 * FIXME 要リファクタリング 258 260 * 259 261 * @return void … … 325 327 326 328 // 規格選択セレクトボックスの作成 327 $this->lfMakeSelect ($tmp_id);329 $this->lfMakeSelectMobile($this, $tmp_id); 328 330 329 331 // 商品IDをFORM内に保持する。 … … 589 591 } 590 592 593 /* 規格選択セレクトボックスの作成 594 * FIXME 要リファクタリング 595 */ 596 function lfMakeSelectMobile(&$objPage, $product_id) { 597 598 $objDb = new SC_Helper_DB_Ex(); 599 $classcat_find1 = false; 600 $classcat_find2 = false; 601 // 在庫ありの商品の有無 602 $stock_find = false; 603 604 // 規格名一覧 605 $arrClassName = $objDb->sfGetIDValueList("dtb_class", "class_id", "name"); 606 // 規格分類名一覧 607 $arrClassCatName = $objDb->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); 608 // 商品規格情報の取得 609 $arrProductsClass = $this->lfGetProductsClass($product_id); 610 611 // 規格1クラス名の取得 612 $objPage->tpl_class_name1 = $arrClassName[$arrProductsClass[0]['class_id1']]; 613 // 規格2クラス名の取得 614 $objPage->tpl_class_name2 = $arrClassName[$arrProductsClass[0]['class_id2']]; 615 616 // すべての組み合わせ数 617 $count = count($arrProductsClass); 618 619 $classcat_id1 = ""; 620 621 $arrSele1 = array(); 622 $arrSele2 = array(); 623 $arrList = array(); 624 625 $list_id = 0; 626 $arrList[0] = "\tlist0 = new Array('選択してください'"; 627 $arrVal[0] = "\tval0 = new Array(''"; 628 629 for ($i = 0; $i < $count; $i++) { 630 // 在庫のチェック 631 if($arrProductsClass[$i]['stock'] <= 0 && $arrProductsClass[$i]['stock_unlimited'] != '1') { 632 continue; 633 } 634 635 $stock_find = true; 636 637 // 規格1のセレクトボックス用 638 if($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']){ 639 $arrList[$list_id].=");\n"; 640 $arrVal[$list_id].=");\n"; 641 $classcat_id1 = $arrProductsClass[$i]['classcategory_id1']; 642 $arrSele1[$classcat_id1] = $arrClassCatName[$classcat_id1]; 643 } 644 645 // 規格2のセレクトボックス用 646 if($arrProductsClass[$i]['classcategory_id1'] == $_POST['classcategory_id1'] and $classcat_id2 != $arrProductsClass[$i]['classcategory_id2']) { 647 $classcat_id2 = $arrProductsClass[$i]['classcategory_id2']; 648 $arrSele2[$classcat_id2] = $arrClassCatName[$classcat_id2]; 649 } 650 651 $list_id++; 652 653 // セレクトボックス表示値 654 if($arrList[$list_id] == "") { 655 $arrList[$list_id] = "\tlist".$list_id." = new Array('選択してください', '".$arrClassCatName[$classcat_id2]."'"; 656 } else { 657 $arrList[$list_id].= ", '".$arrClassCatName[$classcat_id2]."'"; 658 } 659 660 // セレクトボックスPOST値 661 if($arrVal[$list_id] == "") { 662 $arrVal[$list_id] = "\tval".$list_id." = new Array('', '".$classcat_id2."'"; 663 } else { 664 $arrVal[$list_id].= ", '".$classcat_id2."'"; 665 } 666 } 667 668 //$arrList[$list_id].=");\n"; 669 $arrVal[$list_id].=");\n"; 670 671 // 規格1 672 $objPage->arrClassCat1 = $arrSele1; 673 $objPage->arrClassCat2 = $arrSele2; 674 675 // 規格1が設定されている 676 if($arrProductsClass[0]['classcategory_id1'] != '0') { 677 $classcat_find1 = true; 678 } 679 680 // 規格2が設定されている 681 if($arrProductsClass[0]['classcategory_id2'] != '0') { 682 $classcat_find2 = true; 683 } 684 685 $objPage->tpl_classcat_find1 = $classcat_find1; 686 $objPage->tpl_classcat_find2 = $classcat_find2; 687 $objPage->tpl_stock_find = $stock_find; 688 } 689 591 690 /* パラメータ情報の初期化 */ 592 691 function lfInitParam() {
Note: See TracChangeset
for help on using the changeset viewer.